ci: sync jenkins script and travis config with NFD
This commit also adds support for "limited-build" job type to ndn-cxx,
and enables it for travis integrations.
Change-Id: I6960b1d683c94c433ad1bfe702c4273e01036a2c
diff --git a/.jenkins.d/20-tests.sh b/.jenkins.d/20-tests.sh
index ec0f855..f0583ca 100755
--- a/.jenkins.d/20-tests.sh
+++ b/.jenkins.d/20-tests.sh
@@ -1,38 +1,37 @@
#!/usr/bin/env bash
-set -x
set -e
JDIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source "$JDIR"/util.sh
+set -x
+
# Prepare environment
rm -Rf ~/.ndn
if has OSX $NODE_LABELS; then
- echo "Unlocking OSX Keychain"
- security unlock-keychain -p "named-data"
+ security unlock-keychain -p named-data
fi
ndnsec-keygen "/tmp/jenkins/$NODE_NAME" | ndnsec-install-cert -
BOOST_VERSION=$(python -c "import sys; sys.path.append('build/c4che'); import _cache; print(_cache.BOOST_VERSION_NUMBER);")
-if (( BOOST_VERSION < 106200 )); then
- if [[ -n "$XUNIT" ]]; then
- UNIT_TEST_PARAMS1="--log_level=all"
- UNIT_TEST_PARAMS2="--log_format2=XML --log_sink2=build/xunit-report.xml"
- if (( BOOST_VERSION < 106000 )); then
- UNIT_TEST_PARAMS="$UNIT_TEST_PARAMS1 $UNIT_TEST_PARAMS2"
- else
- UNIT_TEST_PARAMS="$UNIT_TEST_PARAMS1 -- $UNIT_TEST_PARAMS2"
- fi
+ut_log_args() {
+ ((ut_count+=1))
+ if (( BOOST_VERSION >= 106200 )); then
+ echo --logger=HRF,test_suite,stdout:XML,all,build/xunit-report-${ut_count}.xml
else
- UNIT_TEST_PARAMS="--log_level=test_suite"
+ if [[ -n $XUNIT ]]; then
+ echo --log_level=all $( (( BOOST_VERSION >= 106000 )) && echo -- ) \
+ --log_format2=XML --log_sink2=build/xunit-report-${ut_count}.xml
+ else
+ echo --log_level=test_suite
+ fi
fi
-else
- UNIT_TEST_PARAMS="--logger=HRF,test_suite,stdout:XML,all,build/xunit-report.xml"
-fi
-
+}
# Run unit tests
-./build/unit-tests $UNIT_TEST_PARAMS
+./build/unit-tests $(ut_log_args)
+
+unset ut_count