Skip to content

Commit

Permalink
Do not try to use smalltalkCI's pprinter
Browse files Browse the repository at this point in the history
because it is not available anymore. Also quit
image with non-zero exit code if one or more tests
failed.
  • Loading branch information
fniephaus committed Oct 21, 2016
1 parent 889c457 commit 34349df
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions .travis/test_database_integration.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ rsqueak/bundle/RSqueak.tar.gz"}"
IMAGE_DIR="${IMAGE_DIR:-}"
IMAGE_EXTRACT="${IMAGE_EXTRACT:-"./RSqueak.app/Contents/Resources"}"
IMAGE_PATH="${IMAGE_EXTRACT}/RSqueak.image"
RESULT_CMD="${RESULT_CMD:-}"
RESULT_CMD_URL="${RESULT_CMD_URL:-"https://raw.githubusercontent.com/hpi-swa/\
smalltalkCI/master/lib/junit_xml_prettfier.py"}"

realpath() {
[[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}"
Expand All @@ -28,10 +25,13 @@ cat > "${HOME}/runSQPyteTests.st" <<EOF
classesToTest := {(Smalltalk at: #SQLiteTests). (Smalltalk at: #SQPyteTests)}.
runner := SCISqueakTestRunner runClasses: classesToTest named: 'Database Integration Tests'.
SCITestReporterStdout report: runner.
exitCode := 0.
(runner totalTests = runner passingTests)
ifFalse: [ exitCode := 1 ].
Smalltalk at: #WorldState ifPresent: [:global |
global addDeferredUIMessage: [
Smalltalk at: #SmalltalkImage ifPresent: [:image |
image current snapshot: false andQuit: true ]]]
image current snapshot: false andQuitWithExitCode: exitCode ]]]
EOF

if [[ -z "${IMAGE}" ]]; then
Expand Down Expand Up @@ -61,14 +61,3 @@ fi

echo "==== Run tests..."
./rsqueak --silent --no-display "${IMAGE}" "${HOME}/runSQPyteTests.st"

if [[ -z "${RESULT_CMD}" ]]; then
RESULT_CMD="/tmp/print_test_results.py"

if [[ ! -f "${RESULT_CMD}" ]]; then
wget --quiet "${RESULT_CMD_URL}" -O "${RESULT_CMD}"
chmod +x "${RESULT_CMD}"
fi
fi

"${RESULT_CMD}" "$(dirname "${IMAGE}")"

0 comments on commit 34349df

Please sign in to comment.