Commit 6df1aef2 authored by Al Muthanna Athamina's avatar Al Muthanna Athamina Committed by V8 LUCI CQ

Add prefix to cctests when listed to make retrieving them more robust

Bug: v8:12802
Change-Id: I4e12edc71ce110f603026f2b9a446af8965f9510
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3598887Reviewed-by: 's avatarMichael Achenbach <machenbach@chromium.org>
Commit-Queue: Almothana Athamneh <almuthanna@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80208}
parent 353e95da
...@@ -336,9 +336,12 @@ i::Handle<i::JSFunction> Optimize( ...@@ -336,9 +336,12 @@ i::Handle<i::JSFunction> Optimize(
} }
static void PrintTestList() { static void PrintTestList() {
int test_num = 0;
for (const auto& entry : g_cctests.Get()) { for (const auto& entry : g_cctests.Get()) {
printf("%s\n", entry.first.c_str()); printf("**>Test: %s\n", entry.first.c_str());
test_num++;
} }
printf("\nTotal number of tests: %d\n", test_num);
} }
int main(int argc, char* argv[]) { int main(int argc, char* argv[]) {
......
...@@ -56,10 +56,20 @@ class TestLoader(testsuite.TestLoader): ...@@ -56,10 +56,20 @@ class TestLoader(testsuite.TestLoader):
print(output.stderr) print(output.stderr)
return [] return []
filtered_output = [ filtered_output = []
test for test in output.stdout.strip().split() test_prefix = '**>Test: '
if test.startswith('test-') test_total_prefix = 'Total number of tests: '
] tests_total = 0
for line in output.stdout.strip().splitlines():
if line.startswith(test_prefix):
filtered_output.append(line[len(test_prefix):])
if line.startswith(test_total_prefix):
tests_total = int(line[len(test_total_prefix):])
assert (len(filtered_output) > 0)
assert (len(filtered_output) == tests_total)
return sorted(filtered_output) return sorted(filtered_output)
......
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