From f3b41228ea91d9160d2d74d5a6a887df7c7c2af0 Mon Sep 17 00:00:00 2001 From: Sylvestre Ledru Date: Fri, 20 Jun 2014 13:34:31 +0000 Subject: [PATCH] Running tests respect DEB_BUILD_OPTIONS=parallel=X (Closes: #751943) --- debian/changelog | 2 ++ debian/patches/follow-parallel-var.diff | 16 ++++++++++++++++ debian/patches/series | 1 + debian/rules | 4 ++-- 4 files changed, 21 insertions(+), 2 deletions(-) create mode 100644 debian/patches/follow-parallel-var.diff diff --git a/debian/changelog b/debian/changelog index b0226e90..90a13b85 100644 --- a/debian/changelog +++ b/debian/changelog @@ -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 Thu, 19 Jun 2014 19:13:16 +0200 diff --git a/debian/patches/follow-parallel-var.diff b/debian/patches/follow-parallel-var.diff new file mode 100644 index 00000000..45af781d --- /dev/null +++ b/debian/patches/follow-parallel-var.diff @@ -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 diff --git a/debian/patches/series b/debian/patches/series index de5b00cc..3c39437c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -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 diff --git a/debian/rules b/debian/rules index a060709d..b7c88dc4 100755 --- a/debian/rules +++ b/debian/rules @@ -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