Add patch to fix some lit test failures

This commit is contained in:
Tom Stellard 2022-06-27 23:51:05 +00:00
parent 71e6437042
commit 941133aae9
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,42 @@
From 14d3021c10d0853a3ae9931b610afca6d385201e Mon Sep 17 00:00:00 2001
From: Yuanfang Chen <yuanfang.chen@sony.com>
Date: Mon, 27 Jun 2022 16:12:45 -0700
Subject: [PATCH] [lit][test] relaxed GTEST_TOTAL_SHARDS checking for some
googletests
For machines with a small number of cores, GTEST_TOTAL_SHARDS may be
lower than 6.
---
llvm/utils/lit/tests/googletest-crash.py | 2 +-
llvm/utils/lit/tests/googletest-format.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/utils/lit/tests/googletest-crash.py b/llvm/utils/lit/tests/googletest-crash.py
index d647d44afbcb..9034ac6394b2 100644
--- a/llvm/utils/lit/tests/googletest-crash.py
+++ b/llvm/utils/lit/tests/googletest-crash.py
@@ -7,7 +7,7 @@
# CHECK: *** TEST 'googletest-crash :: [[PATH]][[FILE]]/0{{.*}} FAILED ***
# CHECK-NEXT: Script(shard):
# CHECK-NEXT: --
-# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 {{.*}}[[FILE]]
+# CHECK-NEXT: GTEST_OUTPUT=json:[[JSON:[^[:space:]]*\.json]] GTEST_SHUFFLE=0 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 {{.*}}[[FILE]]
# CHECK-NEXT: --
# CHECK-EMPTY:
# CHECK-NEXT: [----------] 4 test from FirstTest
diff --git a/llvm/utils/lit/tests/googletest-format.py b/llvm/utils/lit/tests/googletest-format.py
index 2dedaa5d76d4..b66e8998cb84 100644
--- a/llvm/utils/lit/tests/googletest-format.py
+++ b/llvm/utils/lit/tests/googletest-format.py
@@ -13,7 +13,7 @@
# CHECK: *** TEST 'googletest-format :: [[PATH]][[FILE]]/0{{.*}} FAILED ***
# CHECK-NEXT: Script(shard):
# CHECK-NEXT: --
-# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS=6 GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]]
+# CHECK-NEXT: GTEST_OUTPUT=json:{{[^[:space:]]*}} GTEST_SHUFFLE=1 GTEST_TOTAL_SHARDS={{[1-6]}} GTEST_SHARD_INDEX=0 GTEST_RANDOM_SEED=123 {{.*}}[[FILE]]
# CHECK-NEXT: --
# CHECK-EMPTY:
# CHECK-NEXT: Script:
--
2.27.0

View file

@ -114,6 +114,8 @@ Source4: lit.fedora.cfg.py
Patch1: 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch Patch1: 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch
Patch2: 0002-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch Patch2: 0002-Disable-CrashRecoveryTest.DumpStackCleanup-test-on-a.patch
Patch3: 0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch Patch3: 0003-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch
# 14d3021c10d0853a3ae9931b610afca6d385201e
Patch4: 0001-lit-test-relaxed-GTEST_TOTAL_SHARDS-checking-for-som.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++