diff options
author | alon@honor <none@none> | 2010-09-22 19:31:37 -0700 |
---|---|---|
committer | alon@honor <none@none> | 2010-09-22 19:31:37 -0700 |
commit | 283667603bcd9641b7b4183d881c5f311243eb14 (patch) | |
tree | 2ca038f348a14d488bfc422d037b349ab6379348 | |
parent | dabe220dcb8f6d82f13a3a5577a375d6b9c7d3f5 (diff) |
fix bug with automatic tests not running both compiler frontends
-rw-r--r-- | tests/runner.py | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/tests/runner.py b/tests/runner.py index f96ffed7..84ff4bf6 100644 --- a/tests/runner.py +++ b/tests/runner.py @@ -725,6 +725,11 @@ class T(unittest.TestCase): src = open(path_from_root(['tests', 'fannkuch.cpp']), 'r').read() self.do_test(src, 'Pfannkuchen(%d) = %d.' % (i,j), [str(i)], no_build=i>1) + def zzztest_raytrace(self): + src = open(path_from_root(['tests', 'raytrace.cpp']), 'r').read() + output = open(path_from_root(['tests', 'raytrace.ppm']), 'r').read() + self.do_test(src, output, ['3']) + def test_fasta(self): results = [ (1,'''GG*ctt*tgagc*'''), (20,'''GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg*tacgtgtagcctagtgtttgtgttgcgttatagtctatttgtggacacagtatggtcaaa*tgacgtcttttgatctgacggcgttaacaaagatactctg*'''), (50,'''GGCCGGGCGCGGTGGCTCACGCCTGTAATCCCAGCACTTTGGGAGGCCGAGGCGGGCGGA*TCACCTGAGGTCAGGAGTTCGAGACCAGCCTGGCCAACAT*cttBtatcatatgctaKggNcataaaSatgtaaaDcDRtBggDtctttataattcBgtcg*tactDtDagcctatttSVHtHttKtgtHMaSattgWaHKHttttagacatWatgtRgaaa*NtactMcSMtYtcMgRtacttctWBacgaa*agatactctgggcaacacacatacttctctcatgttgtttcttcggacctttcataacct*ttcctggcacatggttagctgcacatcacaggattgtaagggtctagtggttcagtgagc*ggaatatcattcgtcggtggtgttaatctatctcggtgtagcttataaatgcatccgtaa*gaatattatgtttatttgtcggtacgttcatggtagtggtgtcgccgatttagacgtaaa*ggcatgtatg*''') ] @@ -738,15 +743,15 @@ class T(unittest.TestCase): assert PARSER_ENGINE != SPIDERMONKEY_ENGINE self.do_test(path_from_root(['tests', 'sauer']), '*\nTemp is 33\n9\n5\nhello, everyone\n*', main_file='command.cpp') -# Test compilation with all the frontend compilers we have -for compiler_name, compiler_path in COMPILERS.iteritems(): +# Generate tests for all our compilers +def make_test(compiler): class TT(T): def setUp(self): global COMPILER - COMPILER=compiler_path - exec('T_' + compiler_name + ' = TT') - del TT - + COMPILER=compiler + return TT +for name in COMPILERS.keys(): + exec('T_' + name + ' = make_test(COMPILERS["' + name + '"])') del T # T is just a shape for the specific subclasses, we don't test it itself if __name__ == '__main__': |