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

Unified Diff: test/fuzzer/testcfg.py

Issue 1604203002: Add a library suitable for libfuzzer with a small unit test runner shell (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: updates Created 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « test/fuzzer/parser/hello-world ('k') | tools/run-tests.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/fuzzer/testcfg.py
diff --git a/test/fuzzer/testcfg.py b/test/fuzzer/testcfg.py
new file mode 100644
index 0000000000000000000000000000000000000000..40e5e10b1dfca0e57b343646501e8e48d487e66b
--- /dev/null
+++ b/test/fuzzer/testcfg.py
@@ -0,0 +1,36 @@
+# Copyright 2016 the V8 project authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+import os
+
+from testrunner.local import testsuite
+from testrunner.objects import testcase
+
+
+class FuzzerTestSuite(testsuite.TestSuite):
+ SUB_TESTS = ( 'parser', )
+
+ def __init__(self, name, root):
+ super(FuzzerTestSuite, self).__init__(name, root)
+
+ def ListTests(self, context):
+ tests = []
+ for subtest in FuzzerTestSuite.SUB_TESTS:
+ shell = '%s_fuzzer' % subtest
+ for fname in os.listdir(os.path.join(self.root, subtest)):
+ if not os.path.isfile(os.path.join(self.root, subtest, fname)):
+ continue
+ test = testcase.TestCase(self, '%s/%s' % (subtest, fname),
+ override_shell=shell)
+ tests.append(test)
+ tests.sort()
+ return tests
+
+ def GetFlagsForTestCase(self, testcase, context):
+ suite, name = testcase.path.split('/')
+ return [os.path.join(self.root, suite, name)]
+
+
+def GetSuite(name, root):
+ return FuzzerTestSuite(name, root)
« no previous file with comments | « test/fuzzer/parser/hello-world ('k') | tools/run-tests.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698