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, 28, 10, 90), 'os.path.join', 'os.path.join', ({(10, 41, 10, 54): '"""development"""', (10, 56, 10, 65): '"""firefox"""', (10, 67, 10, 89): '"""harness-options.json"""'}, {}), "('development', 'firefox', 'harness-options.json')", False, 'import os\n'), ((11, 26, 11, 92), 'os.path.join', 'os.path.join', ({(11, 39, 11, 52): '"""development"""', (11, 54, 11, 63): '"""firefox"""', (11, 65, 11, 91): '"""harness-options-bak.json"""'}, {}), "('development', 'firefox', 'harness-options-bak.json')", False, 'import os\n'), ((12, 1, 12, 62), 'shutil.move', 'shutil.move', ({(12, 13, 12, 37): 'original_harness_options', (12, 39, 12, 61): 'backup_harness_options'}, {}), '(original_harness_options, backup_harness_options)', False, 'import shutil\n'), ((14, 6, 14, 58), 'codecs.open', 'codecs.open', (), '', False, 'import codecs\n'), ((15, 19, 15, 42), 'json.load', 'json.load', ({(15, 29, 15, 41): 'harness_file'}, {}), '(harness_file)', False, 'import json\n'), ((18, 19, 18, 57), 'os.path.join', 'os.path.join', ({(18, 32, 18, 45): '"""development"""', (18, 47, 18, 56): '"""firefox"""'}, {}), "('development', 'firefox')", False, 'import os\n')]