aboutsummaryrefslogtreecommitdiff
path: root/tests/runner.py
diff options
context:
space:
mode:
Diffstat (limited to 'tests/runner.py')
-rw-r--r--tests/runner.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/runner.py b/tests/runner.py
index 4739f29d..f76602c7 100644
--- a/tests/runner.py
+++ b/tests/runner.py
@@ -154,6 +154,7 @@ if 'benchmark' not in sys.argv:
## Does a complete test - builds, runs, checks output, etc.
def do_test(self, src, expected_output, args=[], output_nicerizer=None, output_processor=None, no_build=False, main_file=None, js_engines=None, post_build=None, basename='src.cpp'):
print 'Running test:', inspect.stack()[1][3].replace('test_', ''), '[%s,%s,%s]' % (COMPILER.split(os.sep)[-1], 'llvm-optimizations' if LLVM_OPTS else '', 'reloop&optimize' if RELOOP else '')
+ if main_file is not None and main_file[-2:] == '.c': basename = 'src.c'
dirname = self.get_dir()
filename = os.path.join(dirname, basename)
if not no_build:
@@ -1274,6 +1275,22 @@ if 'benchmark' not in sys.argv:
src = open(path_from_root(['tests', 'fasta.cpp']), 'r').read()
self.do_test(src, j, [str(i)], lambda x: x.replace('\n', '*'), no_build=i>1)
+ def zzztest_gl(self):
+ # Switch to gcc from g++ - we don't compile properly otherwise (why?)
+ global COMPILER
+ if COMPILER != LLVM_GCC: return
+ COMPILER = LLVM_GCC.replace('g++', 'gcc')
+
+ def post(filename):
+ src = open(filename, 'r').read().replace(
+ '// {{PRE_RUN_ADDITIONS}}',
+ '''Module["__CANVAS__"] = {
+ getContext: function() {},
+ };'''
+ )
+ open(filename, 'w').write(src)
+ self.do_test(path_from_root(['tests', 'gl']), '*?*', main_file='sdl_ogl.c', post_build=post)
+
def test_cubescript(self):
# XXX Warning: Running this in SpiderMonkey can lead to an extreme amount of memory being
# used, see Mozilla bug 593659.