Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Shock Jiang | 2d8483c | 2014-10-30 10:15:37 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | 21034bf | 2014-09-02 18:31:53 -0700 | [diff] [blame] | 4 | |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 5 | # Prepare environment |
| 6 | sudo rm -Rf ~/.ndn |
| 7 | |
| 8 | IS_OSX=$( python -c "print 'yes' if 'OSX' in '$NODE_LABELS'.strip().split(' ') else 'no'" ) |
| 9 | IS_LINUX=$( python -c "print 'yes' if 'Linux' in '$NODE_LABELS'.strip().split(' ') else 'no'" ) |
| 10 | |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 11 | if [[ $IS_OSX == "yes" ]]; then |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 12 | security unlock-keychain -p "named-data" |
| 13 | fi |
| 14 | |
| 15 | # Run unit tests |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 16 | if [[ -n "$XUNIT" ]]; then |
| 17 | ./build/unit-tests --log_format=XML --log_sink=build/xunit-report.xml --log_level=all --report_level=no |
| 18 | else |
| 19 | ./build/unit-tests -l test_suite |
| 20 | fi |