Skip to content

Commit

Permalink
Merge pull request #1084 from twitter/fixTests
Browse files Browse the repository at this point in the history
Adds some output while assembly is building to keep travis happy
  • Loading branch information
ianoc committed Oct 23, 2014
2 parents a713cc8 + 60fd05f commit 75e9878
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 3 deletions.
20 changes: 18 additions & 2 deletions scripts/build_assembly_no_test.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
#!/bin/bash
set -e # first error should stop execution of this script

# Identify the bin dir in the distribution, and source the common include script
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
TARGET=$1

cd $BASE_DIR
sed -i'' -e 's/\/\/ test in assembly/test in assembly/g' project/Build.scala
time ./sbt ++$TRAVIS_SCALA_VERSION $TARGET/assembly &> /dev/null || ./sbt ++$TRAVIS_SCALA_VERSION $TARGET/assembly

bash -c "while true; do echo -n .; sleep 5; done" &
PROGRESS_REPORTER_PID=$!
# Turn off exit on error while we run this command that we allow fail
set +e
time ./sbt ++$TRAVIS_SCALA_VERSION $TARGET/assembly &> /dev/null

RET_CODE=$?
# Turn back on
set -e

kill $PROGRESS_REPORTER_PID >& /dev/null

if [ $RET_CODE -ne 0 ]; then
./sbt ++$TRAVIS_SCALA_VERSION $TARGET/assembly
else
exit 0
fi
6 changes: 5 additions & 1 deletion scripts/run_test.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
# Identify the bin dir in the distribution, and source the common include script
BASE_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )"/.. && pwd )"
cd $BASE_DIR
./sbt ++$TRAVIS_SCALA_VERSION $TEST_TARGET/compile $TEST_TARGET/test:compile &> /dev/null

bash -c "while true; do echo -n .; sleep 5; done" &
PROGRESS_REPORTER_PID=$!
time ./sbt ++$TRAVIS_SCALA_VERSION $TEST_TARGET/compile $TEST_TARGET/test:compile &> /dev/null
kill -9 $PROGRESS_REPORTER_PID

export JVM_OPTS="-XX:+CMSClassUnloadingEnabled -XX:+UseConcMarkSweepGC -XX:ReservedCodeCacheSize=96m -XX:+TieredCompilation -XX:MaxPermSize=128m -Xms256m -Xmx512m -Xss2m"

Expand Down

0 comments on commit 75e9878

Please sign in to comment.