From 6fac453afd4a33d608deb56528b7d48b123bd13f Mon Sep 17 00:00:00 2001 From: Jean-Marie Lemetayer Date: Sat, 3 Oct 2015 14:11:29 +0200 Subject: Manage travis-ci build in an external script This allows to: * override configuration * deal with travis-ci timing restrictions Signed-off-by: Jean-Marie Lemetayer diff --git a/.travis.sh b/.travis.sh new file mode 100644 index 0000000..90a439b --- /dev/null +++ b/.travis.sh @@ -0,0 +1,45 @@ +# Add current directory to PATH +export PATH="$(pwd):$PATH" + +# Manage the travis build +ct-ng_travis_build() +{ + # Override the log behaviour + sed -i -e 's/^.*\(CT_LOG_ERROR\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_WARN\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_INFO\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_EXTRA\).*$/\1=y/' \ + -e 's/^.*\(CT_LOG_ALL\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_DEBUG\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOG_LEVEL_MAX\).*$/\1="EXTRA"/' \ + -e 's/^.*\(CT_LOG_PROGRESS_BAR\).*$/# \1 is not set/' \ + -e 's/^.*\(CT_LOCAL_TARBALLS_DIR\).*$/\1="${HOME}\/src"/' \ + -e 's/^.*\(CT_SAVE_TARBALLS\).*$/\1=y/' \ + .config + + # Build the sample + ct-ng build.2 & + local build_pid=$! + + # Start a runner task to print a "still running" line every 5 minutes + # to avoid travis to think that the build is stuck + { + while true + do + sleep 300 + printf "Crosstool-NG is still running ...\r" + done + } & + local runner_pid=$! + + # Wait for the build to finish and get the result + wait $build_pid 2>/dev/null + local result=$? + + # Stop the runner task + kill $runner_pid + wait $runner_pid 2>/dev/null + + # Return the result + return $result +} diff --git a/.travis.yml b/.travis.yml index 93765c7..927d9bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -42,8 +42,9 @@ env: # Building the standard samples script: - - ./ct-ng $CT_SAMPLE - - CT_LOG_DEBUG=y CT_LOG_LEVEL_MAX="DEBUG" ./ct-ng build.2 + - . ./.travis.sh # Load the travis environment + - ct-ng $CT_SAMPLE # Configure the build + - ct-ng_travis_build # Build the sample # On failure displaying the last lines of the log file after_failure: -- cgit v0.10.2-6-g49f6 From f297eba8e91cd4a6d0c04015acc5f78193f09931 Mon Sep 17 00:00:00 2001 From: Jean-Marie Lemetayer Date: Sat, 3 Oct 2015 14:28:03 +0200 Subject: Increase failure log length Signed-off-by: Jean-Marie Lemetayer diff --git a/.travis.yml b/.travis.yml index 927d9bc..e175024 100644 --- a/.travis.yml +++ b/.travis.yml @@ -48,5 +48,4 @@ script: # On failure displaying the last lines of the log file after_failure: - - tail -n 200 build.log - + - tail -n 1000 build.log -- cgit v0.10.2-6-g49f6 From 6b0fa2221a782504a0f1d6907e8c492e3a09d5d1 Mon Sep 17 00:00:00 2001 From: Jean-Marie Lemetayer Date: Sat, 3 Oct 2015 14:32:29 +0200 Subject: Revert the automated build option This reverts commits: * d6413fe29fbdcd72a04b3d5820ba2e134dbaf558. * 4f266e1a8c78cec2c425b17784576db56125bbbd. Signed-off-by: Jean-Marie Lemetayer diff --git a/Makefile.in b/Makefile.in index c7494f5..895983b 100644 --- a/Makefile.in +++ b/Makefile.in @@ -46,7 +46,6 @@ all: Makefile build # Stuff found by ./configure export DATE := @DATE@ export LOCAL := @enable_local@ -export AUTOMATED := @enable_automated@ export PROG_SED := @program_transform_name@ export PACKAGE_TARNAME := @PACKAGE_TARNAME@ export VERSION := @PACKAGE_VERSION@ diff --git a/config/global/logging.in b/config/global/logging.in index 5fe794d..0c77e88 100644 --- a/config/global/logging.in +++ b/config/global/logging.in @@ -74,7 +74,7 @@ config LOG_PROGRESS_BAR bool prompt "Progress bar" default y - depends on ! LOG_ALL && ! LOG_DEBUG && ! AUTOMATED_BUILD + depends on ! LOG_ALL && ! LOG_DEBUG help If you say 'y' here, you'll be able to see the elapsed time. @@ -104,8 +104,3 @@ config LOG_FILE_COMPRESS depends on LOG_TO_FILE help Compress the log file once the toolchain is successfully built. - -config AUTOMATED_BUILD - bool - default y - depends on CONFIGURE_has_automated diff --git a/configure.ac b/configure.ac index 5670a03..adde2ab 100644 --- a/configure.ac +++ b/configure.ac @@ -67,16 +67,6 @@ AC_ARG_ENABLE( [do not install, and use current directory])]) AC_SUBST([enable_local], [${enable_local:-no}]) AC_ARG_ENABLE( - [automated], - [AS_HELP_STRING( - [--enable-automated], - [Tell ct-ng that this is an automated build])], - [if test "x$automated" = "x" -o "x$automated" = "xyes"; then - automated=y - fi]) -AC_SUBST([enable_automated], [${enable_automated:-no}]) -ACX_SET_KCONFIG_OPTION([automated]) -AC_ARG_ENABLE( [shared], [AS_HELP_STRING( [--enable-shared], -- cgit v0.10.2-6-g49f6