Commit d3d9c0d615ac31751d90032039988efd7e62a609
1 parent
5d043b88
Exists in
master
and in
90 other branches
Add function to load shunit2
The shunit2 packages on official Red Hat like distributions do not place the executables in any directory in the user PATH. According to the packager, the package is a library for unit testing and the executable is meant to be included by the users' unit tests.
Showing
9 changed files
with
19 additions
and
8 deletions
Show diff stats
test/colab_test.sh
test/gitlab_test.sh
test/mail_relay_test.sh
test/mailman_api_test.sh
test/mailman_test.sh
test/postgresql_test.sh
test/redis_test.sh
test/reverse_proxy_test.sh
test/test_helper.sh
... | ... | @@ -7,4 +7,15 @@ run_on() { |
7 | 7 | echo 'export PATH=/vagrant/test/bin:$PATH;' "$@" | ssh -F .ssh_config "$vm" |
8 | 8 | } |
9 | 9 | |
10 | +load_shunit2() { | |
11 | + if [ `which shunit2 > /dev/null 2>&1` ]; then | |
12 | + . shunit2 | |
13 | + elif [ -e /usr/share/shunit2/shunit2 ]; then | |
14 | + . /usr/share/shunit2/shunit2 | |
15 | + else | |
16 | + echo "Could not find shunit2, please, make sure you have it installed." | |
17 | + fi | |
18 | +} | |
19 | + | |
10 | 20 | . $(dirname $0)/ip_helper.sh |
21 | + | ... | ... |