From 8da977e0a1aa35d4edb951e5f4ba9ddeaf53d4be Mon Sep 17 00:00:00 2001 From: Foo Date: Mon, 1 May 2017 04:03:24 +0300 Subject: [PATCH 1/2] Insert travim_fold calls to enter_suite and exit_suite --- tests/shlib/common.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/shlib/common.sh b/tests/shlib/common.sh index a95d8044..f16a1559 100644 --- a/tests/shlib/common.sh +++ b/tests/shlib/common.sh @@ -16,9 +16,20 @@ if test -z "$FAILED" ; then FAILURES_FILE="$ROOT/tests/failures" fi +ANSI_CLEAR="\033[0K" + +travis_fold() { + local action="$1" + local name="$2" + name="$(echo -n "$name" | tr '\n\0' '--' | sed -r 's/[^A-Za-z0-9]+/-/g')" + name="$(echo -n "$name" | sed -r 's/-$//')" + echo -en "travis_fold:${action}:${name}\r${ANSI_CLEAR}" +} + enter_suite() { local suite_name="$1" ; shift export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE}/$suite_name" + travis_fold start "$POWERLINE_CURRENT_SUITE" } exit_suite() { @@ -29,6 +40,7 @@ exit_suite() { echo "Suite ${POWERLINE_CURRENT_SUITE} failed, summary:" echo "${FAIL_SUMMARY}" fi + travis_fold end "$POWERLINE_CURRENT_SUITE" export POWERLINE_CURRENT_SUITE="${POWERLINE_CURRENT_SUITE%/*}" if test "$1" != "--continue" ; then exit $FAILED From bf29fa95373ee7594ba75a8baa56ba59b3b5c6cf Mon Sep 17 00:00:00 2001 From: Foo Date: Mon, 1 May 2017 04:28:01 +0300 Subject: [PATCH 2/2] Save version to the proper location --- tests/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/install.sh b/tests/install.sh index b83b529a..7ecf3b88 100755 --- a/tests/install.sh +++ b/tests/install.sh @@ -17,7 +17,7 @@ checkout_cached_dir() { fi if ! test -d "$target" ; then git clone --depth=1 "$url" "$target" - git rev-parse HEAD > .version + git rev-parse HEAD > "$target/.version" rm -rf "$target"/.git fi }