aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorumarcor <unai.martinezcorral@ehu.eus>2021-01-18 18:29:34 +0100
committertgingold <tgingold@users.noreply.github.com>2021-01-19 07:40:40 +0100
commit1e5b92e6acdc4902cb548afa32d01b0f1a20b623 (patch)
treedd279f20961b7d9398e0641620bf0d282e5c411e
parentb15ba54b9f1de3a5c71d3e221b2ced4c13916530 (diff)
downloadghdl-1e5b92e6acdc4902cb548afa32d01b0f1a20b623.tar.gz
ghdl-1e5b92e6acdc4902cb548afa32d01b0f1a20b623.tar.bz2
ghdl-1e5b92e6acdc4902cb548afa32d01b0f1a20b623.zip
testsuite: remove travis block/group functions
-rwxr-xr-xtestsuite/testsuite.sh51
1 files changed, 7 insertions, 44 deletions
diff --git a/testsuite/testsuite.sh b/testsuite/testsuite.sh
index 68bf05a68..0c287a6f2 100755
--- a/testsuite/testsuite.sh
+++ b/testsuite/testsuite.sh
@@ -34,56 +34,19 @@ gend () {
:
}
-if [ -n "$TRAVIS" ]; then
- echo "INFO: set 'gstart' and 'gend' for TRAVIS"
- # This is a trimmed down copy of https://github.com/travis-ci/travis-build/blob/master/lib/travis/build/bash/*
- travis_time_start() {
- # `date +%N` returns the date in nanoseconds. It is used as a replacement for $RANDOM, which is only available in bash.
- travis_timer_id=`date +%N`
- travis_start_time=$(travis_nanoseconds)
- echo "travis_time:start:$travis_timer_id"
- }
- travis_time_finish() {
- travis_end_time=$(travis_nanoseconds)
- local duration=$(($travis_end_time-$travis_start_time))
- echo "travis_time:end:$travis_timer_id:start=$travis_start_time,finish=$travis_end_time,duration=$duration"
- }
-
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
- travis_nanoseconds() {
- date -u '+%s000000000'
- }
- else
- travis_nanoseconds() {
- date -u '+%s%N'
- }
- fi
-
+if [ -n "$CI" ]; then
+ echo "INFO: set 'gstart' and 'gend' for CI"
gstart () {
- echo "travis_fold:start:group"
- travis_time_start
+ printf '::group::'
print_start "$@"
+ SECONDS=0
}
gend () {
- travis_time_finish
- echo "travis_fold:end:group"
+ duration=$SECONDS
+ echo '::endgroup::'
+ printf "${ANSI_GRAY}took $((duration / 60)) min $((duration % 60)) sec.${ANSI_NOCOLOR}\n"
}
-else
- if [ -n "$CI" ]; then
- echo "INFO: set 'gstart' and 'gend' for CI"
- gstart () {
- printf '::group::'
- print_start "$@"
- SECONDS=0
- }
-
- gend () {
- duration=$SECONDS
- echo '::endgroup::'
- printf "${ANSI_GRAY}took $(($duration / 60)) min $(($duration % 60)) sec.${ANSI_NOCOLOR}\n"
- }
- fi
fi
#---