Skip to content

Commit

Permalink
Try to grep exit code from slimerjs testrunnr.
Browse files Browse the repository at this point in the history
  • Loading branch information
bentrm committed Jan 16, 2015
1 parent 7e03149 commit d8a8040
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,18 @@ language: node_js

node_js: 0.10

before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start

install:
- npm install -g http-server
- npm install -g [email protected]
- npm install -g [email protected]

before_script:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- http-server -s -a 0.0.0.0 -p 8080 &

script:
- casperjs test tests/headless/run-testsuite.js --host=http://0.0.0.0:8080/
- casperjs --engine=slimerjs test tests/headless/run-testsuite.js --host=http://0.0.0.0:8080/
- casperjs test tests/headless/run-testsuite.js --host=http://0.0.0.0:8080/
- ./tests/run-slimerjs.sh
9 changes: 9 additions & 0 deletions tests/run-slimerjs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash

casperjs --engine=slimerjs test tests/headless/run-testsuite.js --host=http://0.0.0.0:8080/ | tee slimerjs.log

# Figure out the exit code ourselves because Gecko does not allow
# SlimerJS to do so for now.
[ -z "`grep ' 0 failed.' slimerjs.log`" ] && ERROR=1
rm slimerjs.log
exit $ERROR

0 comments on commit d8a8040

Please sign in to comment.