Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
| 3 | set -e |
| 4 | |
| 5 | # Prepare environment |
| 6 | rm -Rf ~/.ndnx ~/.ndn |
| 7 | |
| 8 | echo $NODE_LABELS |
| 9 | IS_OSX=$( python -c "print 'yes' if 'OSX' in '$NODE_LABELS'.strip().split(' ') else 'no'" ) |
| 10 | IS_LINUX=$( python -c "print 'yes' if 'Linux' in '$NODE_LABELS'.strip().split(' ') else 'no'" ) |
| 11 | |
| 12 | if [[ $IS_OSX == "yes" ]]; then |
| 13 | security unlock-keychain -p "named-data" |
| 14 | sudo chgrp admin /dev/bpf* |
| 15 | sudo chmod g+rw /dev/bpf* |
| 16 | fi |
| 17 | if [[ $IS_LINUX = "yes" ]]; then |
| 18 | sudo setcap cap_net_raw,cap_net_admin=eip `pwd`/build/unit-tests-core || true |
| 19 | sudo setcap cap_net_raw,cap_net_admin=eip `pwd`/build/unit-tests-daemon || true |
| 20 | sudo setcap cap_net_raw,cap_net_admin=eip `pwd`/build/unit-tests-rib || true |
| 21 | fi |
| 22 | |
| 23 | ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert - |
| 24 | |
| 25 | # Run unit tests |
| 26 | # Core |
| 27 | ./build/unit-tests-core -l test_suite |
Spyridon Mastorakis | d0381c0 | 2015-02-19 10:29:41 -0800 | [diff] [blame^] | 28 | sudo ./build/unit-tests-core -t TestPrivilegeHelper -l test_suite |
Alexander Afanasyev | 4d4e725 | 2014-10-25 12:21:53 -0700 | [diff] [blame] | 29 | |
| 30 | # Daemon |
| 31 | ./build/unit-tests-daemon -l test_suite |
| 32 | |
| 33 | # RIB |
| 34 | ./build/unit-tests-rib -l test_suite |