From ff0b9dd30e8b7c12e6219fadc680b7b2ba15730b Mon Sep 17 00:00:00 2001 From: Michael Achenbach Date: Fri, 5 Apr 2019 15:08:57 +0200 Subject: [PATCH] [test] Expose variant flags in json output For standard test failures, the variant name is enough to deduce the full command line of the test. This is used to create the flako command line on the infra side. Test failures from numfuzz have additional variant_flags, calculated by the fuzzer, which don't match a variant name. Exposing those in the test results will enable printing a proper flako command line on infra side for numfuzz cases. Bug: v8:8971 Change-Id: Ie47d42a0b34037da458b474f2a9ab38f1a5d238a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1554689 Reviewed-by: Sergiy Belozorov Commit-Queue: Michael Achenbach Cr-Commit-Position: refs/heads/master@{#60656} --- tools/testrunner/testproc/progress.py | 1 + tools/unittests/testdata/expected_test_results1.json | 9 ++++++--- tools/unittests/testdata/expected_test_results2.json | 6 ++++-- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/tools/testrunner/testproc/progress.py b/tools/testrunner/testproc/progress.py index 29ad5c797b..96f6417292 100644 --- a/tools/testrunner/testproc/progress.py +++ b/tools/testrunner/testproc/progress.py @@ -307,6 +307,7 @@ class JsonTestProgressIndicator(ProgressIndicator): "random_seed": test.random_seed, "target_name": test.get_shell(), "variant": test.variant, + "variant_flags": test.variant_flags, }) def finished(self): diff --git a/tools/unittests/testdata/expected_test_results1.json b/tools/unittests/testdata/expected_test_results1.json index 7f6742e4cc..7fdc85edce 100644 --- a/tools/unittests/testdata/expected_test_results1.json +++ b/tools/unittests/testdata/expected_test_results1.json @@ -23,7 +23,8 @@ "stderr": "", "stdout": "--test strawberries --random-seed=123 --nohard-abort\n", "target_name": "d8_mocked.py", - "variant": "default" + "variant": "default", + "variant_flags": [] }, { "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort", @@ -45,7 +46,8 @@ "stderr": "", "stdout": "--test strawberries --random-seed=123 --nohard-abort\n", "target_name": "d8_mocked.py", - "variant": "default" + "variant": "default", + "variant_flags": [] }, { "command": "/usr/bin/python out/Release/d8_mocked.py --test strawberries --random-seed=123 --nohard-abort", @@ -67,7 +69,8 @@ "stderr": "", "stdout": "--test strawberries --random-seed=123 --nohard-abort\n", "target_name": "d8_mocked.py", - "variant": "default" + "variant": "default", + "variant_flags": [] } ], "slowest_tests": [ diff --git a/tools/unittests/testdata/expected_test_results2.json b/tools/unittests/testdata/expected_test_results2.json index 95224befdd..a2618e022f 100644 --- a/tools/unittests/testdata/expected_test_results2.json +++ b/tools/unittests/testdata/expected_test_results2.json @@ -22,7 +22,8 @@ "stderr": "", "stdout": "bananaflakes --random-seed=123 --nohard-abort\n", "target_name": "d8_mocked.py", - "variant": "default" + "variant": "default", + "variant_flags": [] }, { "command": "/usr/bin/python out/Release/d8_mocked.py bananaflakes --random-seed=123 --nohard-abort", @@ -43,7 +44,8 @@ "stderr": "", "stdout": "bananaflakes --random-seed=123 --nohard-abort\n", "target_name": "d8_mocked.py", - "variant": "default" + "variant": "default", + "variant_flags": [] } ], "slowest_tests": [