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
	)

[(10, 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""', '"""harness-options.json"""'], {}), False, 'import os\n'), (11, 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""', '"""harness-options-bak.json"""'], {}), False, 'import os\n'), (12, 'shutil.move', 'shutil.move', (['original_harness_options', 'backup_harness_options'], {}), False, 'import shutil\n'), (14, 'codecs.open', 'codecs.open', (['backup_harness_options'], {'encoding': '"""utf8"""'}), False, 'import codecs\n'), (15, 'json.load', 'json.load', (['harness_file'], {}), False, 'import json\n'), (18, 'os.path.join', 'os.path.join', (['"""development"""', '"""firefox"""'], {}), False, 'import os\n')]