Commit e2207c67 authored by Tamer Tas's avatar Tamer Tas Committed by Commit Bot

[fuzzer] create a test-suite for the fuzzer

Testrunner test-suite doesn't have automated tests for the Fuzzer. A significant
change for the testrunner may break the fuzzers. We don't have a way to catch
even the syntax errors for the fuzzer before landing CLs.

This CL creates a rudimentary test-suite that runs the fuzzer without any tests
to see if APIs still work as intended.

R=machenbach@chromium.org
CC=yangguo@chromium.org,sergiyb@chromium.org

No-Try: true
Bug: v8:8763
Change-Id: Ib4519ca093de2af5279964edd164cee04aae77a8
Reviewed-on: https://chromium-review.googlesource.com/c/1466301Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Tamer Tas <tmrts@chromium.org>
Cr-Commit-Position: refs/heads/master@{#59535}
parent 7b69507c
...@@ -146,6 +146,8 @@ class SystemTest(unittest.TestCase): ...@@ -146,6 +146,8 @@ class SystemTest(unittest.TestCase):
sys.path.append(TOOLS_ROOT) sys.path.append(TOOLS_ROOT)
global standard_runner global standard_runner
from testrunner import standard_runner from testrunner import standard_runner
global num_fuzzer
from testrunner import num_fuzzer
from testrunner.local import command from testrunner.local import command
from testrunner.local import pool from testrunner.local import pool
command.setup_testing() command.setup_testing()
...@@ -651,5 +653,16 @@ class SystemTest(unittest.TestCase): ...@@ -651,5 +653,16 @@ class SystemTest(unittest.TestCase):
self.assertIn('3 tests ran', result.stdout, result) self.assertIn('3 tests ran', result.stdout, result)
self.assertEqual(1, result.returncode, result) self.assertEqual(1, result.returncode, result)
def testNumFuzzer(self):
sys_args = ['--command-prefix', sys.executable, '--outdir', 'out/Release']
with temp_base() as basedir:
with capture() as (stdout, stderr):
code = num_fuzzer.NumFuzzer(basedir=basedir).execute(sys_args)
result = Result(stdout.getvalue(), stderr.getvalue(), code)
self.assertEqual(0, result.returncode, result)
if __name__ == '__main__': if __name__ == '__main__':
unittest.main() unittest.main()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment