Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 1 | #!/usr/bin/env bash |
| 2 | set -x |
Alexander Afanasyev | 33ce4c3 | 2014-10-24 11:19:45 -0700 | [diff] [blame] | 3 | set -e |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 4 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 5 | JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd ) |
| 6 | source "$JDIR"/util.sh |
| 7 | |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 8 | # Prepare environment |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 9 | rm -Rf ~/.ndn |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 10 | |
Alexander Afanasyev | b346ddb | 2015-06-03 00:52:03 -0400 | [diff] [blame] | 11 | if has OSX $NODE_LABELS; then |
Alexander Afanasyev | a87e0a8 | 2014-10-21 14:09:19 -0400 | [diff] [blame] | 12 | echo "Unlocking OSX Keychain" |
| 13 | security unlock-keychain -p "named-data" |
| 14 | fi |
| 15 | |
| 16 | ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert - |
| 17 | |
| 18 | # Run unit tests |
Alexander Afanasyev | 8b88160 | 2014-11-20 19:58:07 -0800 | [diff] [blame] | 19 | if [[ -n "$XUNIT" ]]; then |
Alexander Afanasyev | 1b6187f | 2016-01-18 22:41:49 +0100 | [diff] [blame] | 20 | ./build/unit-tests --log_level=all -- --log_format2=XML --log_sink2=build/xunit-report.xml |
Alexander Afanasyev | 8b88160 | 2014-11-20 19:58:07 -0800 | [diff] [blame] | 21 | else |
| 22 | ./build/unit-tests -l test_suite |
| 23 | fi |