blob: ea8834dec6b2eedd491a8524da551cedfa629081 [file] [log] [blame]
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -07001#!/usr/bin/env bash
2set -e
3
Davide Pesavento56c68a32020-03-12 19:26:21 -04004export WAF_JOBS=${WAF_JOBS:-1}
5
Davide Pesavento4bd4f712019-10-09 01:02:45 -04006nanos() {
7 # Cannot use date(1) because macOS does not support %N format specifier
8 python -c 'import time; print(int(time.time() * 1e9))'
9}
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -070010
Davide Pesavento4bd4f712019-10-09 01:02:45 -040011for file in .jenkins.d/*; do
Alexander Afanasyev6077b392014-12-11 22:56:23 -080012 [[ -f $file && -x $file ]] || continue
Davide Pesavento4bd4f712019-10-09 01:02:45 -040013
14 if [[ -n $TRAVIS ]]; then
15 label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
16 echo -ne "travis_fold:start:${label}\r"
17 echo -ne "travis_time:start:${label}\r"
18 start=$(nanos)
19 fi
20
21 echo "\$ $file"
Alexander Afanasyev6077b392014-12-11 22:56:23 -080022 "$file"
Davide Pesavento4bd4f712019-10-09 01:02:45 -040023
24 if [[ -n $TRAVIS ]]; then
25 finish=$(nanos)
26 echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
27 echo -ne "travis_fold:end:${label}\r"
28 fi
Alexander Afanasyev4d4e7252014-10-25 12:21:53 -070029done