ehlo,

the 1st patch is prerequisite for the 2nd patch
and it also speed up build on rhel6.

The second patch simplify some magic in CI script.

LS
>From e557357fdbf58676bf0a0b1567cbf09ad37feaab Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Thu, 31 Mar 2016 11:17:01 +0200
Subject: [PATCH 1/2] AUTOMAKE: Force usage of parallel test harness

Parallel test harness[1] is enabled by default with new versions
of automake. However, automake on rhel6 (1.11.1-4) still uses
serial test harness by default even though it also contains parallel
test harness.

Downside of serial test is that output of all test are mixed together and
is not in separate log files as with parallel test harness. Another problem
is slow execution test with valgrind due to missing parallelisation. It's
approximately 4-5 minutes slower on machine with 4 CPUs.

The automake option parallel-tests is kept for backward-compatibility in new
versions of automake, since the parallel test harness is the default there.

[1] 
http://www.gnu.org/software/automake/manual/html_node/Parallel-Test-Harness.html#Parallel-Test-Harness
[2] 
http://www.gnu.org/software/automake/manual/html_node/Serial-Test-Harness.html#Serial-Test-Harness
---
 configure.ac | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index 
2c36049ca04f57fe94f359c5dc19a506dd2b9388..b4ba366d7a32a45879e9f2e9b6e84256a3ac7235
 100644
--- a/configure.ac
+++ b/configure.ac
@@ -14,7 +14,8 @@ m4_ifdef([AC_USE_SYSTEM_EXTENSIONS],
 CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE 
-D_LARGEFILE64_SOURCE"
 
 
-AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects tar-pax])
+AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects tar-pax
+                  parallel-tests])
 AM_PROG_CC_C_O
 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
 AC_DISABLE_STATIC
-- 
2.7.3

>From 8884c82c8614100fab0e0aba09083e2c3baa43e9 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lsleb...@redhat.com>
Date: Thu, 31 Mar 2016 12:34:55 +0200
Subject: [PATCH 2/2] CI: Use make check instead of make-check-wrap

make-check-wrap had to be used due to missing LOG_COMPILER
on rhel6 which is enabled with parallel test harness
---
 contrib/ci/run | 25 +++++++++++++------------
 1 file changed, 13 insertions(+), 12 deletions(-)

diff --git a/contrib/ci/run b/contrib/ci/run
index 
3fbf2c51fc16f9adc31e75948a3697f2e9207db0..2f42380afd6df2d98a262be7e4ef6d653a0ae032
 100755
--- a/contrib/ci/run
+++ b/contrib/ci/run
@@ -201,21 +201,22 @@ function build_debug()
                                 --with-test-dir="$test_dir"
 
     # Not building "tests" due to https://fedorahosted.org/sssd/ticket/2350
-    stage make-tests        make-check-wrap -j $CPU_NUM check -- true
+    stage make-tests        make -j $CPU_NUM check
 
     status=0
     CK_FORK=no \
         stage make-check-valgrind \
-                make-check-wrap -j $CPU_NUM check -- \
-                                libtool --mode=execute \
-                                    valgrind-condense 99 \
-                                    "$valgrind_test_pattern" -- \
-                                    --trace-children=yes \
-                                    --trace-children-skip='*/bin/*,*/sbin/*' \
-                                    --leak-check=full \
-                                    --gen-suppressions=all \
-                                    --suppressions="$CI_DIR/sssd.supp" \
-                                    --verbose ||
+                make -j $CPU_NUM check -- \
+                     LOG_COMPILER=libtool \
+                     LOG_FLAGS="--mode=execute \
+                                valgrind-condense 99 \
+                                \"$valgrind_test_pattern\" -- \
+                                --trace-children=yes \
+                                --trace-children-skip='*/bin/*,*/sbin/*' \
+                                --leak-check=full \
+                                --gen-suppressions=all \
+                                --suppressions=\"$CI_DIR/sssd.supp\" \
+                                --verbose" ||
             status=$?
     mv "$test_dir" ci-test-dir
     ((status == 0))
@@ -279,7 +280,7 @@ function build_coverage()
 
     # Build everything, including tests
     # Not building "tests" due to https://fedorahosted.org/sssd/ticket/2350
-    stage make-tests        make-check-wrap -j $CPU_NUM check -- true
+    stage make-tests        make -j $CPU_NUM check
 
     stage lcov-pre          lcov --capture --initial --directory . \
                                  --base-directory "$BASE_DIR" \
-- 
2.7.3

_______________________________________________
sssd-devel mailing list
sssd-devel@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/sssd-devel@lists.fedorahosted.org

Reply via email to