diff options
author | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-06 19:42:40 +0200 |
---|---|---|
committer | Vasilis Kalintiris <ehostunreach@gmail.com> | 2013-12-07 19:35:49 +0200 |
commit | 4b67f2ccbff8be080c4f3a8384c5cfd4fd1f4f31 (patch) | |
tree | ab26578964fcbdc38cf48b6ffc89cf09f27c7e75 /tests/runner.py | |
parent | eb083723747a90cb6ab9853fec8d6e8ef54748bc (diff) |
Run test with single source input and output files
This commit allows us to run a test when it requires only
a single source and expected output file.
Diffstat (limited to 'tests/runner.py')
-rwxr-xr-x | tests/runner.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py index 34435383..8a5e1129 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -418,6 +418,12 @@ process(sys.argv[1]) ''' return (main, supp) + def do_run_from_file(self, src, expected_output, args=[], output_nicerizer=None, output_processor=None, no_build=False, main_file=None, additional_files=[], js_engines=None, post_build=None, basename='src.cpp', libraries=[], includes=[], force_c=False, build_ll_hook=None, extra_emscripten_args=[]): + self.do_run(open(src).read(), open(expected_output).read(), + args, output_nicerizer, output_processor, no_build, main_file, + additional_files, js_engines, post_build, basename, libraries, + includes, force_c, build_ll_hook, extra_emscripten_args) + ## Does a complete test - builds, runs, checks output, etc. def do_run(self, src, expected_output, args=[], output_nicerizer=None, output_processor=None, no_build=False, main_file=None, additional_files=[], js_engines=None, post_build=None, basename='src.cpp', libraries=[], includes=[], force_c=False, build_ll_hook=None, extra_emscripten_args=[]): if force_c or (main_file is not None and main_file[-2:]) == '.c': |