blob: b368a7457819f91f7516a197ad44ae2a4dab0bf8 [file] [log] [blame]
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04001#!/usr/bin/env bash
Alexander Afanasyev33ce4c32014-10-24 11:19:45 -07002set -e
Davide Pesavento2349e282020-03-24 14:28:03 -04003source .jenkins.d/util.sh
4
5export WAF_JOBS=${WAF_JOBS:-1}
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -04006
Davide Pesaventoe6e125e2019-10-08 18:08:36 -04007nanos() {
8 # Cannot use date(1) because macOS does not support %N format specifier
Davide Pesaventod776a932020-03-20 18:42:36 -04009 python3 -c 'import time; print(int(time.time() * 1e9))'
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040010}
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040011
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040012for file in .jenkins.d/*; do
Alexander Afanasyeve7490032014-12-11 12:40:53 -080013 [[ -f $file && -x $file ]] || continue
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040014
15 if [[ -n $TRAVIS ]]; then
16 label=$(basename "$file" | sed -E 's/[[:digit:]]+-(.*)\..*/\1/')
17 echo -ne "travis_fold:start:${label}\r"
18 echo -ne "travis_time:start:${label}\r"
19 start=$(nanos)
20 fi
21
22 echo "\$ $file"
Alexander Afanasyeve7490032014-12-11 12:40:53 -080023 "$file"
Davide Pesaventoe6e125e2019-10-08 18:08:36 -040024
25 if [[ -n $TRAVIS ]]; then
26 finish=$(nanos)
27 echo -ne "travis_time:end:${label}:start=${start},finish=${finish},duration=$((finish-start)),event=${label}\r"
28 echo -ne "travis_fold:end:${label}\r"
29 fi
Alexander Afanasyeva87e0a82014-10-21 14:09:19 -040030done