aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.travis.yml3
-rw-r--r--project/Dependencies.scala2
-rwxr-xr-xtravis-test.sh40
3 files changed, 42 insertions, 3 deletions
diff --git a/.travis.yml b/.travis.yml
index b5f3ffe5..c86459a2 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: scala
script:
- - sbt ++$TRAVIS_SCALA_VERSION 'set concurrentRestrictions in Global += Tags.limit(Tags.Compile, 2)' compile test:compile
- - sbt ++$TRAVIS_SCALA_VERSION -Dakka.test.timefactor=1.5 'set concurrentRestrictions in Global += Tags.limit(Tags.Test, 1)' test
+ - ./travis-test.sh
scala:
- 2.11.5
jdk:
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 394fb9f2..787c62ec 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -32,7 +32,7 @@ object Dependencies {
val sprayJson = "io.spray" %% "spray-json" % "1.3.1"
val sprayJsonLenses = "net.virtual-void" %% "json-lenses" % "0.6.0"
- val scalatest = "org.scalatest" %% "scalatest" % "2.2.1"
+ val scalatest = "org.scalatest" %% "scalatest" % "2.2.4"
val logback = "ch.qos.logback" % "logback-classic" % "1.0.13"
val aspectJ = "org.aspectj" % "aspectjweaver" % aspectjVersion
val newrelic = "com.newrelic.agent.java" % "newrelic-agent" % "3.11.0"
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