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

Side by Side Diff: test/fuzzer/testcfg.py

Issue 1738943004: Adding Wasm + Wasm-asm variant fuzzer. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: fix Created 4 years, 9 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
« no previous file with comments | « test/fuzzer/fuzzer.isolate ('k') | test/fuzzer/wasm.cc » ('j') | 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 6
7 from testrunner.local import testsuite 7 from testrunner.local import testsuite
8 from testrunner.objects import testcase 8 from testrunner.objects import testcase
9 9
10 10
11 class FuzzerVariantGenerator(testsuite.VariantGenerator): 11 class FuzzerVariantGenerator(testsuite.VariantGenerator):
12 # Only run the fuzzer with standard variant. 12 # Only run the fuzzer with standard variant.
13 def FilterVariantsByTest(self, testcase): 13 def FilterVariantsByTest(self, testcase):
14 return self.standard_variant 14 return self.standard_variant
15 15
16 def GetFlagSets(self, testcase, variant): 16 def GetFlagSets(self, testcase, variant):
17 return testsuite.FAST_VARIANT_FLAGS[variant] 17 return testsuite.FAST_VARIANT_FLAGS[variant]
18 18
19 19
20 class FuzzerTestSuite(testsuite.TestSuite): 20 class FuzzerTestSuite(testsuite.TestSuite):
21 SUB_TESTS = ( 'json', 'parser', 'regexp', ) 21 SUB_TESTS = ( 'json', 'parser', 'regexp', 'wasm', 'wasm_asmjs', )
22 22
23 def __init__(self, name, root): 23 def __init__(self, name, root):
24 super(FuzzerTestSuite, self).__init__(name, root) 24 super(FuzzerTestSuite, self).__init__(name, root)
25 25
26 def ListTests(self, context): 26 def ListTests(self, context):
27 tests = [] 27 tests = []
28 for subtest in FuzzerTestSuite.SUB_TESTS: 28 for subtest in FuzzerTestSuite.SUB_TESTS:
29 shell = '%s_fuzzer' % subtest 29 shell = '%s_fuzzer' % subtest
30 for fname in os.listdir(os.path.join(self.root, subtest)): 30 for fname in os.listdir(os.path.join(self.root, subtest)):
31 if not os.path.isfile(os.path.join(self.root, subtest, fname)): 31 if not os.path.isfile(os.path.join(self.root, subtest, fname)):
32 continue 32 continue
33 test = testcase.TestCase(self, '%s/%s' % (subtest, fname), 33 test = testcase.TestCase(self, '%s/%s' % (subtest, fname),
34 override_shell=shell) 34 override_shell=shell)
35 tests.append(test) 35 tests.append(test)
36 tests.sort() 36 tests.sort()
37 return tests 37 return tests
38 38
39 def GetFlagsForTestCase(self, testcase, context): 39 def GetFlagsForTestCase(self, testcase, context):
40 suite, name = testcase.path.split('/') 40 suite, name = testcase.path.split('/')
41 return [os.path.join(self.root, suite, name)] 41 return [os.path.join(self.root, suite, name)]
42 42
43 def _VariantGeneratorFactory(self): 43 def _VariantGeneratorFactory(self):
44 return FuzzerVariantGenerator 44 return FuzzerVariantGenerator
45 45
46 46
47 def GetSuite(name, root): 47 def GetSuite(name, root):
48 return FuzzerTestSuite(name, root) 48 return FuzzerTestSuite(name, root)
OLDNEW
« no previous file with comments | « test/fuzzer/fuzzer.isolate ('k') | test/fuzzer/wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698