-
Notifications
You must be signed in to change notification settings - Fork 1
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 #59 from 130s/impr/separate_test
Separate test code.
- Loading branch information
Showing
2 changed files
with
32 additions
and
11 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
|
||
function _test_commands() { | ||
RESULT=0 # success by default | ||
|
||
bloom-release --help || RESULT=1 | ||
catkin --help || RESULT=1 | ||
rosdep --help || RESULT=1 | ||
wstool --help || RESULT=1 | ||
return $RESULT | ||
} | ||
|
||
# Need to test https://github.com/130s/compenv_ubuntu/issues/3 | ||
function test_display_env() { | ||
#TODO | ||
return | ||
} | ||
|
||
function _test_systems() { | ||
|
||
_test_commands | ||
retval_test_commands=$? | ||
if [ $retval_test_commands -ne 0 ]; then echo "Error: not all commands are installed yet. Exiting.o"; exit 1; fi | ||
|
||
if [ ! -z $MSG_ENDROLL ]; then printf $MSG_ENDROLL; else echo "Script ends."; fi | ||
|
||
test_display_env | ||
} | ||
|
||
# Here's kindf of main function. | ||
_test_systems |