From 33601f4255402c5cffbefc836f35678d368906de Mon Sep 17 00:00:00 2001 From: gbreynoo Date: Tue, 25 Oct 2022 15:29:58 +0100 Subject: [PATCH] [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 --- llvm/utils/lit/tests/test-output-micro.py | 2 +- llvm/utils/lit/tests/test-output.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/utils/lit/tests/test-output-micro.py b/llvm/utils/lit/tests/test-output-micro.py index 2f49cfbfb126..9c855b3cdcac 100644 --- a/llvm/utils/lit/tests/test-output-micro.py +++ b/llvm/utils/lit/tests/test-output-micro.py @@ -39,7 +39,7 @@ # CHECK-NEXT: }, # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": {{[0-9.]+}}, +# CHECK-NEXT: "elapsed": {{[-+0-9.eE]+}}, # CHECK-NEXT: "metrics": { # CHECK-NEXT: "value0": 1, # CHECK-NEXT: "value1": 2.3456 diff --git a/llvm/utils/lit/tests/test-output.py b/llvm/utils/lit/tests/test-output.py index b6640be96547..d0d01202330f 100644 --- a/llvm/utils/lit/tests/test-output.py +++ b/llvm/utils/lit/tests/test-output.py @@ -7,7 +7,7 @@ # CHECK-NEXT: "tests": [ # CHECK-NEXT: { # CHECK-NEXT: "code": "PASS", -# CHECK-NEXT: "elapsed": {{[0-9.]+}}, +# CHECK-NEXT: "elapsed": {{[-+0-9.eE]+}}, # CHECK-NEXT: "metrics": { # CHECK-NEXT: "value0": 1, # CHECK-NEXT: "value1": 2.3456 -- 2.34.1