On (31/03/16 15:06), Nikolai Kondrashov wrote:
>Hi Lukas,
>
>On 03/31/2016 02:41 PM, Lukas Slebodnik wrote:
>>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.
>
>The idea is fine with me and is welcome. Thank you, Lukas :)
>I have a couple of comments, though.
>
>>-AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects tar-pax])
>>+AM_INIT_AUTOMAKE([-Wall -Wno-portability foreign subdir-objects tar-pax
>>+                  parallel-tests])
>
>This is obviously fine.
>
>>      # Not building "tests" due tohttps://fedorahosted.org/sssd/ticket/2350
>>-    stage make-tests        make-check-wrap -j $CPU_NUM check -- true
>>+    stage make-tests        make -j $CPU_NUM check
>
>This changes the behavior to not only build the tests but to also run them.
>Is that intentional? If not, then the fix should be adding
>"LOG_COMPILER=true".
>
You are right.
I missed that change.

BTW bew version with "LOG_COMPILER=true" is more obvious
than old version "-- true"


>>      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 tohttps://fedorahosted.org/sssd/ticket/2350
>>-    stage make-tests        make-check-wrap -j $CPU_NUM check -- true
>>+    stage make-tests        make -j $CPU_NUM check
>
>Same here.
>
Done

>Also, if we're removing all the uses of make-check-wrap, then we should also
>remove the "make-check-wrap" file itself.
>
Removed

Updated version is attached.

http://sssd-ci.duckdns.org/logs/job/40/35/summary.html

BTW Feel free to propose better indentation if needed.

LS
>From e557357fdbf58676bf0a0b1567cbf09ad37feaab Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <[email protected]>
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 df01632e14a0cde72212abd02effe056de84ace3 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <[email protected]>
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
---
 Makefile.am                |  1 -
 contrib/ci/make-check-wrap | 52 ----------------------------------------------
 contrib/ci/run             | 25 +++++++++++-----------
 3 files changed, 13 insertions(+), 65 deletions(-)
 delete mode 100755 contrib/ci/make-check-wrap

diff --git a/Makefile.am b/Makefile.am
index 
e2d2c38aea59389d8c0d5887b42e22e30b6b8222..8d2f588f4b71671bd257da48c817e9a3c7d0c147
 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -369,7 +369,6 @@ dist_noinst_SCRIPTS = \
     contrib/fedora/bashrc_sssd \
     contrib/fedora/make_srpm.sh \
     contrib/ci/clean \
-    contrib/ci/make-check-wrap \
     contrib/ci/rpm-spec-builddeps \
     contrib/ci/run \
     contrib/ci/valgrind-condense \
diff --git a/contrib/ci/make-check-wrap b/contrib/ci/make-check-wrap
deleted file mode 100755
index 
4ad323e5f50fa61ee325a152892c263d0b02517c..0000000000000000000000000000000000000000
--- a/contrib/ci/make-check-wrap
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-#
-# Build a make check target, prepending test commands with specified command
-# and arguments.
-# Args: [make_arg...] [-- wrap_cmd wrap_arg...]
-#
-# Copyright (C) 2014 Red Hat
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program.  If not, see <http://www.gnu.org/licenses/>.
-
-set -o nounset -o pipefail -o errexit
-
-declare -a argv=("make")
-declare arg
-
-while [ $# != 0 ]; do
-    arg="$1"
-    shift
-    if [ "$arg" == "--" ]; then
-        break
-    fi
-    argv+=("$arg")
-done
-
-if [ $# != 0 ]; then
-    # If Makefile supports LOG_COMPILER
-    if grep -q -w LOG_COMPILER Makefile; then
-        printf -v arg 'LOG_COMPILER=%q' $1
-        argv+=("$arg")
-        shift
-        if [ $# != 0 ]; then
-            printf -v arg ' %q' "$@"
-            argv+=("LOG_FLAGS=$arg")
-        fi
-    else
-        printf -v arg ' %q' "$@"
-        argv+=("AUX_TESTS_ENVIRONMENT=$arg")
-    fi
-fi
-
-"${argv[@]}"
diff --git a/contrib/ci/run b/contrib/ci/run
index 
3fbf2c51fc16f9adc31e75948a3697f2e9207db0..3c8f502f82f6a3c7ca7021e4f8d55759e78542a2
 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 LOG_COMPILER=true
 
     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 LOG_COMPILER=true
 
     stage lcov-pre          lcov --capture --initial --directory . \
                                  --base-directory "$BASE_DIR" \
-- 
2.7.3

_______________________________________________
sssd-devel mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to