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/+/3598887 Reviewed-by: Michael Achenbach <machenbach@chromium.org> Commit-Queue: Almothana Athamneh <almuthanna@chromium.org> Cr-Commit-Position: refs/heads/main@{#80208}
This commit is contained in:
parent
353e95daa2
commit
6df1aef278
@ -336,9 +336,12 @@ i::Handle<i::JSFunction> Optimize(
|
||||
}
|
||||
|
||||
static void PrintTestList() {
|
||||
int test_num = 0;
|
||||
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[]) {
|
||||
|
@ -56,10 +56,20 @@ class TestLoader(testsuite.TestLoader):
|
||||
print(output.stderr)
|
||||
return []
|
||||
|
||||
filtered_output = [
|
||||
test for test in output.stdout.strip().split()
|
||||
if test.startswith('test-')
|
||||
]
|
||||
filtered_output = []
|
||||
test_prefix = '**>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)
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user