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 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
| 7 | |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 8 | # Prepare environment |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 9 | rm -Rf ~/.ndn |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 10 | |
Alexander Afanasyev | c7c9900 | 2015-10-09 17:27:30 -0700 | [diff] [blame] | 11 | if has OSX $NODE_LABELS; then |
| 12 | echo "Unlocking OSX Keychain" |
| 13 | security unlock-keychain -p "named-data" |
Shock Jiang | cde2871 | 2014-10-19 21:17:20 -0700 | [diff] [blame] | 14 | fi |
| 15 | |
| 16 | # Run unit tests |
Alexander Afanasyev | 7495a7e | 2014-11-20 19:21:27 -0800 | [diff] [blame] | 17 | if [[ -n "$XUNIT" ]]; then |
| 18 | ./build/unit-tests --log_format=XML --log_sink=build/xunit-report.xml --log_level=all --report_level=no |
| 19 | else |
| 20 | ./build/unit-tests -l test_suite |
| 21 | fi |