]>
git.ipfire.org Git - thirdparty/util-linux.git/blob - .travis-functions.sh
4 # .travis-functions.sh:
5 # - helper functions to be sourced from .travis.yml
6 # - designed to respect travis' environment but testing locally is possible
9 if [ ! -f "configure.ac" ]; then
10 echo ".travis-functions.sh must be sourced from source dir" >&2
14 ## some config settings
15 # travis docs say we get 1.5 CPUs
17 DUMP_CONFIG_LOG
="short"
23 if [ "$DUMP_CONFIG_LOG" = "short" ]; then
24 grep -B1 -A10000 "^## Output variables" config.log |
grep -v "_FALSE="
25 elif [ "$DUMP_CONFIG_LOG" = "full" ]; then
31 function check_nonroot
33 local opts
="$MAKE_CHECK_OPTS"
36 --disable-use-tty-group \
38 --enable-all-programs \
42 $MAKE check TS_OPTS
="$opts" ||
return
43 $MAKE install DESTDIR
=/tmp
/dest ||
return
48 local opts
="$MAKE_CHECK_OPTS --parallel=1"
52 --enable-all-programs \
55 $MAKE check TS_COMMAND
="true" ||
return
56 sudo
-E $MAKE check TS_OPTS
="$opts" ||
return
57 sudo
$MAKE install ||
return
64 $MAKE distcheck ||
return
67 function travis_install_script
69 # install some packages from Ubuntu's default sources
70 sudo apt-get
-qq update ||
return
71 sudo apt-get
install -qq >/dev
/null \
82 # install/upgrade custom stuff from non-official sources
83 sudo add-apt-repository
-y ppa
:malcscott
/socat ||
return
84 sudo apt-get
-qq update ||
return
85 sudo apt-get
install -qq >/dev
/null \
90 function travis_before_script
101 function travis_script
106 case "$MAKE_CHECK" in
117 echo "error, check environment (travis.yml)" >&2
122 # We exit here with case-switch return value!
128 function travis_after_script
133 # find diff dir from check as well as from distcheck
134 diff_dir
=$
(find .
-type d
-name "diff" |
grep "tests/diff" |
head -n 1)
135 if [ -d "$diff_dir" ]; then
136 tmp
=$
(find "$diff_dir" -type f |
sort)
137 echo -en "dump test diffs:\n${tmp}\n"
138 echo "$tmp" |
xargs cat