diff options
author | Diego <diegolparra@gmail.com> | 2015-11-25 00:26:41 -0300 |
---|---|---|
committer | Diego <diegolparra@gmail.com> | 2015-11-25 00:26:41 -0300 |
commit | 5a26b2a6d14e97198c2a5251415493fb250330fc (patch) | |
tree | b7c294c26fc41cbacf685a97c0f9348088fe749e /travis-test.sh | |
parent | 159f43381b2f4fd3c8039af8cc7e3272e2f9d936 (diff) | |
parent | dce4934698b5620387971589e40ace4ea84d63f8 (diff) | |
download | Kamon-5a26b2a6d14e97198c2a5251415493fb250330fc.tar.gz Kamon-5a26b2a6d14e97198c2a5251415493fb250330fc.tar.bz2 Kamon-5a26b2a6d14e97198c2a5251415493fb250330fc.zip |
Merge branch 'master' into wip/decoupling-basic-apis-from-reporters
Diffstat (limited to 'travis-test.sh')
-rwxr-xr-x | travis-test.sh | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/travis-test.sh b/travis-test.sh new file mode 100755 index 00000000..f886933b --- /dev/null +++ b/travis-test.sh @@ -0,0 +1,40 @@ +#!/usr/bin/env bash +# Licensed under the Apache License, Version 2.0 +# Adapted from https://github.com/paulp/psp-std/blob/master/bin/test + +runTests () { + sbt -Dakka.test.timefactor=1.5 \ + 'set concurrentRestrictions in Global += Tags.limit(Tags.Compile, 2)' \ + 'set testOptions in test in Global := Seq(Tests.Argument(TestFrameworks.ScalaTest, "-oUNCXHELPOQRM"))' \ + test || exit 1 + + echo "[info] $(date) - finished sbt test" +} + +stripTerminalEscapeCodes () { + sed -r "s/\x1B\[([0-9]{1,2}(;[0-9]{1,2})?)?[mGKM]//g" +} + +mkRegex () { ( IFS="|" && echo "$*" ); } + +filterOutput() { + while read line; do + if ! [[ $(echo $line | stripTerminalEscapeCodes) =~ $excludeRegex ]] ; then + echo $line + fi + done +} + +main() { + # sbt output filter + local excludeRegex=$(mkRegex \ + '\[info\] (Resolving|Loading|Updating|Packaging|Done updating)' \ + 're[-]run with [-]unchecked for details' \ + 'one warning found' + ) + + echo "[info] $(date) - starting sbt test" + (set -o pipefail && runTests |& filterOutput) +} + +main $@
\ No newline at end of file |