]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
travis: minor cleanup
authorRuediger Meier <ruediger.meier@ga-group.nl>
Mon, 15 Feb 2016 17:15:58 +0000 (18:15 +0100)
committerRuediger Meier <ruediger.meier@ga-group.nl>
Thu, 18 Feb 2016 11:53:03 +0000 (12:53 +0100)
 - print env for debugging
 - remove unused builddir stuff
 - avoid non-portable find/xargs usage

Signed-off-by: Ruediger Meier <ruediger.meier@ga-group.nl>
.travis-functions.sh
.travis.yml

index bef4597564b824f59b3f2a604162b60fae26bd04..3315a915938c650ea8ec9bcd79c7daa3e64ffaae 100755 (executable)
@@ -11,23 +11,14 @@ if [ ! -f "configure.ac" ]; then
        return 1 || exit 1
 fi
 
-# some config settings
-MAKE="make -j4"
+## some config settings
+# travis docs say we get 1.5 CPUs
+MAKE="make -j2"
 DUMP_CONFIG_LOG="short"
 
-# We could test (exotic) out-of-tree build dirs using relative or abs paths.
-# After sourcing this script we are living in build dir. Tasks for source dir
-# have to use $SOURCE_DIR.
-SOURCE_DIR="."
-BUILD_DIR="."
-CONFIGURE="$SOURCE_DIR/configure"
-
-mkdir -p "$BUILD_DIR"
-cd "$BUILD_DIR" || return 1 || exit 1
-
-function configure_travis
+function xconfigure
 {
-       "$CONFIGURE" "$@"
+       ./configure "$@"
        err=$?
        if [ "$DUMP_CONFIG_LOG" = "short" ]; then
                grep -B1 -A10000 "^## Output variables" config.log | grep -v "_FALSE="
@@ -41,7 +32,7 @@ function check_nonroot
 {
        local opts="$MAKE_CHECK_OPTS"
 
-       configure_travis \
+       xconfigure \
                --disable-use-tty-group \
                --with-python \
                --enable-all-programs \
@@ -56,7 +47,7 @@ function check_root
 {
        local opts="$MAKE_CHECK_OPTS --parallel=1"
 
-       configure_travis \
+       xconfigure \
                --with-python \
                --enable-all-programs \
                || return
@@ -68,7 +59,7 @@ function check_root
 
 function check_dist
 {
-       configure_travis \
+       xconfigure \
                || return
        $MAKE distcheck || return
 }
@@ -98,14 +89,12 @@ function travis_install_script
 
 function travis_before_script
 {
-       pushd "$SOURCE_DIR" || return
        set -o xtrace
 
        ./autogen.sh
        ret=$?
 
        set +o xtrace
-       popd
        return $ret
 }
 
@@ -142,10 +131,10 @@ function travis_after_script
        local tmp
 
        # find diff dir from check as well as from distcheck
-       diff_dir=$(find -type d -a -name "diff" | grep "tests/diff" | head -n 1)
+       diff_dir=$(find . -type d -name "diff" | grep "tests/diff" | head -n 1)
        if [ -d "$diff_dir" ]; then
                tmp=$(find "$diff_dir" -type f | sort)
                echo -en "dump test diffs:\n${tmp}\n"
-               echo "$tmp" | xargs -r cat
+               echo "$tmp" | xargs cat
        fi
 }
index 85a753d39f8e5b8d11dd3d804a61ae060cc740e6..e27adc4d7bf9296611c326c41a5873a133e8d7bd 100644 (file)
@@ -19,6 +19,8 @@ branches:
     - /^travis.*/
 
 before_install:
+  # print some host info
+  - env | grep -v "encrypted" | LC_ALL=C sort
   - $CC --version
   - which $CC
   # workaround clang not system wide, fail on sudo make install