-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #36 from pote/fix/travis
- Loading branch information
Showing
3 changed files
with
116 additions
and
102 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
#!/usr/bin/env bash | ||
|
||
# keep track of if all the tests passed or if one failed | ||
status=0 | ||
echo ">> Now running all tests" | ||
|
||
# prefix all calls to echo with this string | ||
pre=">>" | ||
|
||
echo "$pre Now running all tests" | ||
for test in *test.sh | ||
do | ||
echo ">> Current test: $test" | ||
./$test || status=$? | ||
echo "$pre Current test: $test" | ||
"./$test" | ||
if [ ! $? -eq 0 ]; then | ||
status=$? | ||
echo "$pre Test failed: $test" | ||
fi | ||
done | ||
echo ">> All Done" | ||
echo "$pre All Done" | ||
|
||
if [ $status == 0 ] | ||
then | ||
echo ">> Build status: passing" | ||
echo "$pre Build status: passing" | ||
else | ||
echo ">> Build status: failing" | ||
echo "$pre Build status: failing" | ||
echo "Tests exited with code: $status" | ||
fi | ||
|
||
exit $status |