Skip to content

Commit a4b0100

Browse files
committed
[llvm-config] Make tests more resiliant
In some modes llvm-config issues an error if a requested library is not available on the system. The in-tree lit tests do not add explicit dependencies on all component libraries, instead relying on the transitive dependencies of tools and other libraries. This can result in some configurations where a component library may not be used by any of the test dependencies, so it may not be generated before the tests run. This occurs when optional components of the LLVM build are excluded, or not included. In the case where a component library is not generated two test caess are currently failing. One which tests the shared library boolean flag, and one which tests the system library requirements. Neither test require the full set of LLVM libraries to be specifed, so in both cases I've limited the requested library set to Support to make the tests more robust.
1 parent 933e7e2 commit a4b0100

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

llvm/test/tools/llvm-config/booleans.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ CHECK-BUILD-SYSTEM: {{cmake|gn}}
2121
CHECK-BUILD-SYSTEM-NOT: error:
2222
CHECK-BUILD-SYSTEM-NOT: warning
2323

24-
RUN: llvm-config --shared-mode 2>&1 | FileCheck --check-prefix=CHECK-SHARED-MODE %s
24+
RUN: llvm-config --shared-mode 2>&1 Support | FileCheck --check-prefix=CHECK-SHARED-MODE %s
2525
CHECK-SHARED-MODE: {{static|shared}}
2626
CHECK-SHARED-MODE-NOT: error:
2727
CHECK-SHARED-MODE-NOT: warning

llvm/test/tools/llvm-config/system-libs.test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
RUN: llvm-config --link-static --system-libs 2>&1 | FileCheck %s
1+
RUN: llvm-config --link-static --system-libs Support 2>&1 | FileCheck %s
22
REQUIRES: static-libs
33
UNSUPPORTED: system-windows
44
CHECK: -l

0 commit comments

Comments
 (0)