Running tests respect DEB_BUILD_OPTIONS=parallel=X

(Closes: #751943)
This commit is contained in:
Sylvestre Ledru 2014-06-20 13:34:31 +00:00
parent 8841be9b2b
commit f3b41228ea
4 changed files with 21 additions and 2 deletions

2
debian/changelog vendored
View File

@ -1,6 +1,8 @@
llvm-toolchain-3.4 (1:3.4.2-3) unstable; urgency=medium
* Ship the compiler-rt static libraries
* Running tests respect DEB_BUILD_OPTIONS=parallel=X
(Closes: #751943)
-- Sylvestre Ledru <sylvestre@debian.org> Thu, 19 Jun 2014 19:13:16 +0200

16
debian/patches/follow-parallel-var.diff vendored Normal file
View File

@ -0,0 +1,16 @@
Index: llvm-toolchain-3.4-3.4.2/test/Makefile
===================================================================
--- llvm-toolchain-3.4-3.4.2.orig/test/Makefile
+++ llvm-toolchain-3.4-3.4.2/test/Makefile
@@ -29,6 +29,11 @@ else
LIT_ARGS := -s -v
endif
+# NJOBS allows an override of the number of threads
+ifneq ($(NJOBS),)
+LIT_ARGS += $(NJOBS)
+endif
+
ifdef TESTSUITE
LIT_TESTSUITE := $(TESTSUITE)
else

View File

@ -40,3 +40,4 @@ scan-build-fix-clang-detection.diff
compiler-rt-path.diff
lldb-soname.diff
CVE-2014-2893.diff
follow-parallel-var.diff

4
debian/rules vendored
View File

@ -355,9 +355,9 @@ override_dh_auto_test:
# LLVM tests
ifneq (,$(findstring $(DEB_HOST_ARCH),$(ARCH_LLVM_TEST_OK)))
# Fail the build if the test fails
LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check
NJOBS="$(NJOBS)" LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check
else
LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check || true
NJOBS="$(NJOBS)" LD_LIBRARY_PATH=$(CURDIR)/$(TARGET_BUILD)/Release/lib/ $(MAKE) -C $(TARGET_BUILD) check || true
endif
# clang tests