-
-
Save appplemac/cf987d922f5f938ae9e6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
[ -e /tmp/skip-tests ]; FAIL=$? | |
for i in $(seq 1 $(expr $CIRCLE_NODE_TOTAL - 1)); | |
do | |
OUTPUT=`ssh node$i 'until [ -e /tmp/skip-tests ]; do sleep 1; done; cat /tmp/skip-tests'` | |
if [ "$OUTPUT" == skip ]; then FAIL=true; fi | |
done | |
if [ $FAIL == true ]; then | |
echo "skip" > /tmp/skip-tests | |
echo "Skipping tests" | |
for i in $(seq 1 $(expr $CIRCLE_NODE_TOTAL - 1)); | |
do | |
ssh node$i 'echo skip > /tmp/skip-tests' | |
done | |
fi | |
if [ $FAIL == true ]; then exit 1; else exit 0; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
bundle exec rspec \ | |
--format RspecJunitFormatter \ | |
--out $CIRCLE_TEST_REPORTS/rspec/tests_fast.xml \ | |
--format progress "$@" | |
if [ "$?" != 0 ]; then echo "skip" > /tmp/skip-tests; exit 1; else touch /tmp/skip-tests; exit 0; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ $(cat /tmp/skip-tests) == "skip" ]; | |
then exit 0; | |
fi | |
bundle exec rspec \ | |
--format RspecJunitFormatter \ | |
--out $CIRCLE_TEST_REPORTS/rspec/tests_slow.xml \ | |
--format progress "$@" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment