Skip to content

Commit 33601f4

Browse files
committed
[llvm-lit][test] Fix regex to capture scientific notation
We were seeing an intermittent local test failure of utils\lit\tests\test-output.py in which the elapsed time output was being given in scientific notation. Python automatically represents small floating-point values in scientific notation so I have altered these tests regex to capture output in that format. Differential Revision: https://reviews.llvm.org/D136469
1 parent 620cff0 commit 33601f4

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/utils/lit/tests/test-output-micro.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939
# CHECK-NEXT: },
4040
# CHECK-NEXT: {
4141
# CHECK-NEXT: "code": "PASS",
42-
# CHECK-NEXT: "elapsed": {{[0-9.]+}},
42+
# CHECK-NEXT: "elapsed": {{[-+0-9.eE]+}},
4343
# CHECK-NEXT: "metrics": {
4444
# CHECK-NEXT: "value0": 1,
4545
# CHECK-NEXT: "value1": 2.3456

llvm/utils/lit/tests/test-output.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# CHECK-NEXT: "tests": [
88
# CHECK-NEXT: {
99
# CHECK-NEXT: "code": "PASS",
10-
# CHECK-NEXT: "elapsed": {{[0-9.]+}},
10+
# CHECK-NEXT: "elapsed": {{[-+0-9.eE]+}},
1111
# CHECK-NEXT: "metrics": {
1212
# CHECK-NEXT: "value0": 1,
1313
# CHECK-NEXT: "value1": 2.3456

0 commit comments

Comments
 (0)