import os
import shutil
import codecs
import json

from cuddlefish.runner import run_app
from cuddlefish.rdf import RDFManifest

def run():
	original_harness_options = os.path.join('development', 'firefox', 'harness-options.json')
	backup_harness_options = os.path.join('development', 'firefox', 'harness-options-bak.json')
	shutil.move(original_harness_options, backup_harness_options)

	with codecs.open(backup_harness_options, encoding='utf8') as harness_file:
		harness_config = json.load(harness_file)

	run_app(
		harness_root_dir=os.path.join('development', 'firefox'), 
		harness_options=harness_config, 
		app_type="firefox", 
		verbose=True
	)

[((168, 230), 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""', '"""harness-options.json"""'], {}), "('development', 'firefox', 'harness-options.json')\n", (180, 230), False, 'import os\n'), ((257, 323), 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""', '"""harness-options-bak.json"""'], {}), "('development', 'firefox', 'harness-options-bak.json')\n", (269, 323), False, 'import os\n'), ((325, 386), 'shutil.move', 'shutil.move', (['original_harness_options', 'backup_harness_options'], {}), '(original_harness_options, backup_harness_options)\n', (336, 386), False, 'import shutil\n'), ((394, 446), 'codecs.open', 'codecs.open', (['backup_harness_options'], {'encoding': '"""utf8"""'}), "(backup_harness_options, encoding='utf8')\n", (405, 446), False, 'import codecs\n'), ((483, 506), 'json.load', 'json.load', (['harness_file'], {}), '(harness_file)\n', (492, 506), False, 'import json\n'), ((537, 575), 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""'], {}), "('development', 'firefox')\n", (549, 575), False, 'import os\n')]