summaryrefslogtreecommitdiff
path: root/.ci/travis.sh
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-07-13 18:29:25 -0400
committerStefan Schmidt <s.schmidt@samsung.com>2018-07-26 08:55:59 +0200
commitc06be53b0389a2c5d4d8cad89e53dbfe184b4298 (patch)
tree70603f5e0c491c926c3d46045ba328573bebc0f7 /.ci/travis.sh
parentd568c6f1251048e0e3378beccbf9d915ce12fa28 (diff)
ci: add folding for travis logs
make the build a bit nicer to read the build output is still insanely verbose, so this isn't super useful as the 'pretty' view still takes so long to load that it's almost always better to just read the raw text log Differential Revision: https://phab.enlightenment.org/D6616
Diffstat (limited to '.ci/travis.sh')
-rwxr-xr-x.ci/travis.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/.ci/travis.sh b/.ci/travis.sh
new file mode 100755
index 0000000000..6ae67e2e82
--- /dev/null
+++ b/.ci/travis.sh
@@ -0,0 +1,24 @@
1#!/bin/sh
2
3# https://github.com/travis-ci/travis-rubies/blob/9f7962a881c55d32da7c76baefc58b89e3941d91/build.sh#L38-L44
4
5travis_fold() {
6 echo -e "travis_fold:start:$1\033[33;1m$2\033[0m"
7}
8travis_endfold() {
9 echo -e "\ntravis_fold:end:$1\r"
10}
11
12travis_time_start() {
13 travis_timer_id=$(printf %08x $(( RANDOM * RANDOM )))
14 travis_start_time=$(travis_nanoseconds)
15 echo -en "travis_time:start:$travis_timer_id\r${ANSI_CLEAR}"
16}
17
18travis_time_finish() {
19 local result=$?
20 travis_end_time=$(travis_nanoseconds)
21 local duration=$(($travis_end_time-$travis_start_time))
22 echo -en "\ntravis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration\r${ANSI_CLEAR}"
23 return $result
24}