2013-08-14 22:21:11 +00:00
|
|
|
# Check the various features of the GoogleTest format.
|
2021-03-22 14:44:30 +03:00
|
|
|
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# RUN: not %{lit} -v --order=random %{inputs}/googletest-format > %t.out
|
2017-07-28 16:24:18 +00:00
|
|
|
# FIXME: Temporarily dump test output so we can debug failing tests on
|
|
|
|
# buildbots.
|
|
|
|
# RUN: cat %t.out
|
2013-08-14 22:21:11 +00:00
|
|
|
# RUN: FileCheck < %t.out %s
|
|
|
|
#
|
|
|
|
# END.
|
|
|
|
|
|
|
|
# CHECK: -- Testing:
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK: FAIL: googletest-format :: [[PATH:[Dd]ummy[Ss]ub[Dd]ir/]][[FILE:OneTest\.py]]/0
|
|
|
|
# CHECK: *** TEST 'googletest-format :: [[PATH]][[FILE]]/0{{.*}} FAILED ***
|
|
|
|
# CHECK-NEXT: Script(shard):
|
|
|
|
# CHECK-NEXT: --
|
2022-06-27 16:12:45 -07:00
|
|
|
# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]]
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK-NEXT: --
|
|
|
|
# CHECK-EMPTY:
|
2021-05-21 11:27:44 -07:00
|
|
|
# CHECK-NEXT: Script:
|
|
|
|
# CHECK-NEXT: --
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK-NEXT: [[FILE]] --gtest_filter=FirstTest.subTestB
|
2021-05-21 11:27:44 -07:00
|
|
|
# CHECK-NEXT: --
|
2022-04-23 19:30:00 -07:00
|
|
|
# CHECK-NEXT: I am subTest B output
|
|
|
|
# CHECK-EMPTY:
|
2013-08-14 22:21:11 +00:00
|
|
|
# CHECK-NEXT: I am subTest B, I FAIL
|
|
|
|
# CHECK-NEXT: And I have two lines of output
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK-EMPTY:
|
|
|
|
# CHECK: Script:
|
2021-05-21 11:27:44 -07:00
|
|
|
# CHECK-NEXT: --
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK-NEXT: [[FILE]] --gtest_filter=FirstTest.subTestD
|
2021-05-21 11:27:44 -07:00
|
|
|
# CHECK-NEXT: --
|
[Reland][lit] Use sharding for GoogleTest format
This helps lit unit test performance by a lot, especially on windows. The performance gain comes from launching one gtest executable for many subtests instead of one (this is the current situation).
The shards are executed by the test runner and the results are stored in the
json format supported by the GoogleTest. Later in the test reporting stage,
all test results in the json file are retrieved to continue the test results
summary etc.
On my Win10 desktop, before this patch: `check-clang-unit`: 177s, `check-llvm-unit`: 38s; after this patch: `check-clang-unit`: 37s, `check-llvm-unit`: 11s.
On my Linux machine, before this patch: `check-clang-unit`: 46s, `check-llvm-unit`: 8s; after this patch: `check-clang-unit`: 7s, `check-llvm-unit`: 4s.
Reviewed By: yln, rnk, abrachet
Differential Revision: https://reviews.llvm.org/D122251
2022-04-12 12:09:34 -07:00
|
|
|
# CHECK-NEXT: unresolved test result
|
|
|
|
# CHECK: ***
|
|
|
|
# CHECK: Unresolved Tests (1):
|
|
|
|
# CHECK-NEXT: googletest-format :: [[PATH]][[FILE]]/FirstTest/subTestD
|
|
|
|
# CHECK: ***
|
|
|
|
# CHECK-NEXT: Failed Tests (1):
|
|
|
|
# CHECK-NEXT: googletest-format :: [[PATH]][[FILE]]/FirstTest/subTestB
|
2021-05-21 11:22:31 -07:00
|
|
|
# CHECK: Skipped{{ *}}: 1
|
2021-05-21 11:20:34 -07:00
|
|
|
# CHECK: Passed{{ *}}: 3
|
2021-05-21 11:27:44 -07:00
|
|
|
# CHECK: Unresolved{{ *}}: 1
|
2021-05-21 11:20:34 -07:00
|
|
|
# CHECK: Failed{{ *}}: 1
|