Skip to content

Commit 6ad0f8e

Browse files
authored
[DTLTO][TEST] Make Clang driver tests even more robust (#159418)
Remove XFAILs for llvm-driver. DTLTO is still incompatible with llvm-driver, but these tests now pass after #159151. Modify a missed regex to use filename.py (missed in #159151). Tighten overly greedy regexes to prevent spurious failures.
1 parent 2c2fec3 commit 6ad0f8e

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

clang/test/Driver/DTLTO/dtlto.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// REQUIRES: lld
22

3-
/// https://github.com/llvm/llvm-project/issues/159125.
4-
// XFAIL: llvm-driver
5-
63
/// Check DTLTO options are forwarded to the linker.
74

85
/// Check that options are forwarded as expected with --thinlto-distributor=.
@@ -15,7 +12,7 @@
1512
// FORWARD: filename.py:[[CLANG:.*]]
1613
// FORWARD: ld.lld
1714
// FORWARD-SAME: "--thinlto-distributor=d.exe"
18-
// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}[[CLANG]]"
15+
// FORWARD-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"
1916
// FORWARD-SAME: "--thinlto-distributor-arg=a1"
2017
// FORWARD-SAME: "--thinlto-distributor-arg=a2"
2118
// FORWARD-SAME: "--thinlto-distributor-arg=a3"
@@ -39,9 +36,10 @@
3936
// RUN: FileCheck %s --input-file=%t_default.log --check-prefix=DEFAULT \
4037
// RUN: --implicit-check-not=distributor --implicit-check-not=remote-compiler
4138

39+
// DEFAULT: filename.py:[[CLANG:.*]]
4240
// DEFAULT: ld.lld
4341
// DEFAULT-SAME: "--thinlto-distributor=d.exe"
44-
// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]+}}"
42+
// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"
4543

4644
/// Check that nothing is forwarded when the compiler is not in LTO mode, and that
4745
/// appropriate unused option warnings are issued.

clang/test/Driver/DTLTO/ps5-dtlto.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
// REQUIRES: lld
22

3-
/// https://github.com/llvm/llvm-project/issues/159125.
4-
// XFAIL: llvm-driver
5-
63
/// Check DTLTO options are forwarded to the linker.
74

85
/// Check that options are forwarded as expected with --thinlto-distributor=.
@@ -15,7 +12,7 @@
1512
// FORWARD: filename.py:[[CLANG:.*]]
1613
// FORWARD: prospero-lld
1714
// FORWARD-SAME: "--thinlto-distributor=d.exe"
18-
// FORWARD-SAME: "--thinlto-remote-compiler={{.*}}[[CLANG]]"
15+
// FORWARD-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"
1916
// FORWARD-SAME: "--thinlto-distributor-arg=a1"
2017
// FORWARD-SAME: "--thinlto-distributor-arg=a2"
2118
// FORWARD-SAME: "--thinlto-distributor-arg=a3"
@@ -42,7 +39,7 @@
4239
// DEFAULT: filename.py:[[CLANG:.*]]
4340
// DEFAULT: prospero-lld
4441
// DEFAULT-SAME: "--thinlto-distributor=d.exe"
45-
// DEFAULT-SAME: "--thinlto-remote-compiler={{.*}}[[CLANG]]"
42+
// DEFAULT-SAME: "--thinlto-remote-compiler={{[^"]*}}[[CLANG]]"
4643

4744
/// Check that the arguments are forwarded unconditionally even when the
4845
/// compiler is not in LTO mode.

0 commit comments

Comments
 (0)