diff options
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/runner.py b/tests/runner.py index 4e260bf5..3611f74c 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -30,7 +30,7 @@ sys.path += [path_from_root('')] try: assert COMPILER_OPTS != None except: - raise Exception('Cannot find "COMPILER_OPTS" definition. Is ~/.emscripten set up properly? You may need to copy the template from settings.py into it.') + raise Exception('Cannot find "COMPILER_OPTS" definition. Is %s set up properly? You may need to copy the template from settings.py into it.' % EM_CONFIG) # Core test runner class, shared between normal tests and benchmarks @@ -280,7 +280,7 @@ if 'benchmark' not in str(sys.argv) and 'sanity' not in str(sys.argv): if Settings.USE_TYPED_ARRAYS: js_engines = filter(lambda engine: engine != V8_ENGINE, js_engines) # V8 issue 1822 js_engines = filter(lambda engine: engine not in self.banned_js_engines, js_engines) - if len(js_engines) == 0: return self.skip('No JS engine present to run this test with. Check ~/.emscripten and settings.py and the paths therein.') + if len(js_engines) == 0: return self.skip('No JS engine present to run this test with. Check %s and settings.py and the paths therein.' % EM_CONFIG) for engine in js_engines: engine = filter(lambda arg: arg != '-n', engine) # SpiderMonkey issue 716255 js_output = self.run_generated_code(engine, filename + '.o.js', args) @@ -5890,10 +5890,10 @@ elif 'sanity' in str(sys.argv): print print 'Running sanity checks.' - print 'WARNING: This will modify ~/.emscripten, and in theory can break it although it should be restored properly. A backup will be saved in ~/.emscripten_backup' + print 'WARNING: This will modify %s, and in theory can break it although it should be restored properly. A backup will be saved in %s_backup' % (EM_CONFIG, EM_CONFIG) print - assert os.path.exists(CONFIG_FILE), 'To run these tests, we need a (working!) ~/.emscripten file to already exist' + assert os.path.exists(CONFIG_FILE), 'To run these tests, we need a (working!) %s file to already exist' % EM_CONFIG shutil.copyfile(CONFIG_FILE, CONFIG_FILE + '_backup') def restore(): @@ -5938,7 +5938,7 @@ elif 'sanity' in str(sys.argv): def test_aaa_normal(self): # this should be the very first thing that runs. if this fails, everything else is irrelevant! for command in commands: - # Your existing ~/.emscripten should work! + # Your existing EM_CONFIG should work! restore() self.check_working(command) @@ -5949,14 +5949,14 @@ elif 'sanity' in str(sys.argv): self.assertContained('Welcome to Emscripten!', output) self.assertContained('This is the first time any of the Emscripten tools has been run.', output) - self.assertContained('A settings file has been copied to ~/.emscripten, at absolute path: %s' % CONFIG_FILE, output) + self.assertContained('A settings file has been copied to %s, at absolute path: %s' % (EM_CONFIG, CONFIG_FILE), output) self.assertContained('Please edit that file and change the paths to fit your system', output) self.assertContained('make sure LLVM_ROOT and NODE_JS are correct', output) self.assertContained('This command will now exit. When you are done editing those paths, re-run it.', output) assert output.replace('\n', '').endswith('===='), 'We should have stopped: ' + output assert (open(CONFIG_FILE).read() == open(path_from_root('settings.py')).read()), 'Settings should be copied from settings.py' - # Second run, with bad ~/.emscripten + # Second run, with bad EM_CONFIG for settings in ['blah', 'LLVM_ROOT="blah"; JS_ENGINES=[]; COMPILER_ENGINE=NODE_JS=SPIDERMONKEY_ENGINE=[]']: f = open(CONFIG_FILE, 'w') f.write(settings) @@ -5964,7 +5964,7 @@ elif 'sanity' in str(sys.argv): output = self.do(command) if 'LLVM_ROOT' not in settings: - self.assertContained('Error in evaluating ~/.emscripten', output) + self.assertContained('Error in evaluating %s' % EM_CONFIG, output) else: self.assertContained('FATAL', output) # sanity check should fail @@ -6000,7 +6000,7 @@ elif 'sanity' in str(sys.argv): SANITY_MESSAGE = 'Emscripten: Running sanity checks' SANITY_FAIL_MESSAGE = 'sanity check failed to run' - # emcc should check sanity if no ~/.emscripten_sanity + # emcc should check sanity if no ${EM_CONFIG}_sanity restore() time.sleep(0.1) assert not os.path.exists(SANITY_FILE) # restore is just the settings, not the sanity |