Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(196)

Side by Side Diff: tools/foozzie/v8_foozzie_test.py

Issue 2640043002: [foozzie] Add ignition as baseline comparison (Closed)
Patch Set: updates Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« tools/foozzie/v8_foozzie.py ('K') | « tools/foozzie/v8_foozzie.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 the V8 project authors. All rights reserved. 1 # Copyright 2016 the V8 project authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import os 5 import os
6 import subprocess 6 import subprocess
7 import sys 7 import sys
8 import unittest 8 import unittest
9 9
10 import v8_foozzie 10 import v8_foozzie
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 + otherfile.js: TypeError: undefined is not a constructor""", None 84 + otherfile.js: TypeError: undefined is not a constructor""", None
85 self.assertEquals(diff, suppress.diff(one, two)) 85 self.assertEquals(diff, suppress.diff(one, two))
86 86
87 87
88 def run_foozzie(first_d8, second_d8): 88 def run_foozzie(first_d8, second_d8):
89 return subprocess.check_output([ 89 return subprocess.check_output([
90 sys.executable, FOOZZIE, 90 sys.executable, FOOZZIE,
91 '--random-seed', '12345', 91 '--random-seed', '12345',
92 '--first-d8', os.path.join(TEST_DATA, first_d8), 92 '--first-d8', os.path.join(TEST_DATA, first_d8),
93 '--second-d8', os.path.join(TEST_DATA, second_d8), 93 '--second-d8', os.path.join(TEST_DATA, second_d8),
94 '--first-config', 'ignition',
94 '--second-config', 'ignition_staging', 95 '--second-config', 'ignition_staging',
95 os.path.join(TEST_DATA, 'fuzz-123.js'), 96 os.path.join(TEST_DATA, 'fuzz-123.js'),
96 ]) 97 ])
97 98
98 99
99 class SystemTest(unittest.TestCase): 100 class SystemTest(unittest.TestCase):
100 def testSyntaxErrorDiffPass(self): 101 def testSyntaxErrorDiffPass(self):
101 stdout = run_foozzie('test_d8_1.py', 'test_d8_2.py') 102 stdout = run_foozzie('test_d8_1.py', 'test_d8_2.py')
102 self.assertEquals('# V8 correctness - pass\n', stdout) 103 self.assertEquals('# V8 correctness - pass\n', stdout)
103 104
104 def testDifferentOutputFail(self): 105 def testDifferentOutputFail(self):
105 with open(os.path.join(TEST_DATA, 'failure_output.txt')) as f: 106 with open(os.path.join(TEST_DATA, 'failure_output.txt')) as f:
106 expected_output = f.read() 107 expected_output = f.read()
107 with self.assertRaises(subprocess.CalledProcessError) as ctx: 108 with self.assertRaises(subprocess.CalledProcessError) as ctx:
108 run_foozzie('test_d8_1.py', 'test_d8_3.py') 109 run_foozzie('test_d8_1.py', 'test_d8_3.py')
109 e = ctx.exception 110 e = ctx.exception
110 self.assertEquals(v8_foozzie.RETURN_FAIL, e.returncode) 111 self.assertEquals(v8_foozzie.RETURN_FAIL, e.returncode)
111 self.assertEquals(expected_output, e.output) 112 self.assertEquals(expected_output, e.output)
OLDNEW
« tools/foozzie/v8_foozzie.py ('K') | « tools/foozzie/v8_foozzie.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698