aboutsummaryrefslogtreecommitdiffstats
path: root/travis
diff options
context:
space:
mode:
authorArnstein Ressem <aressem@gmail.com>2021-01-05 13:02:56 +0000
committerArnstein Ressem <aressem@gmail.com>2021-01-05 13:02:56 +0000
commitce45259746aa9ff82121cdcb959e597187444463 (patch)
tree2ac42c9e18775cdf161e361fd32294200a733b86 /travis
parentf3d54a087fee498ac1669ad06da1724e2bdce4a8 (diff)
Try to run systemtests in PR if [run-systemtest] is specified in title
Diffstat (limited to 'travis')
-rwxr-xr-xtravis/detect-what-to-build.sh9
-rwxr-xr-xtravis/travis-build.sh26
2 files changed, 31 insertions, 4 deletions
diff --git a/travis/detect-what-to-build.sh b/travis/detect-what-to-build.sh
index 12bf892d419..5fb18093037 100755
--- a/travis/detect-what-to-build.sh
+++ b/travis/detect-what-to-build.sh
@@ -10,16 +10,17 @@ if [[ $TRAVIS_PULL_REQUEST == false ]]; then
return 0
fi
-# Future use
-#JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST)
-#PR_TITLE=$(jq -re '.title' <<< "$JSON")
+JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST)
+PR_TITLE=$(jq -re '.title' <<< "$JSON")
JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/pulls/$TRAVIS_PULL_REQUEST/commits)
COMMITS=$(jq -re '.[].sha' <<< "$JSON")
FILES=$(for C in $COMMITS; do JSON=$(curl -sLf https://api.github.com/repos/$TRAVIS_REPO_SLUG/commits/$C); jq -re '.files[].filename' <<< "$JSON"; done)
-if [[ -z $FILES ]]; then
+if [[ $PR_TITLE =~ \[run-systemtest\] ]]; then
+ SHOULD_BUILD=systemtest
+elif [[ -z $FILES ]]; then
SHOULD_BUILD=all
elif ! grep -v -E "(\.h|\.hh|\.hxx|\.c|\.cpp|\.cxx)$" <<< "$FILES" &> /dev/null; then
SHOULD_BUILD=cpp
diff --git a/travis/travis-build.sh b/travis/travis-build.sh
index 47d1496b0cf..3e928676b73 100755
--- a/travis/travis-build.sh
+++ b/travis/travis-build.sh
@@ -49,4 +49,30 @@ case $SHOULD_BUILD in
;;
esac
+if [[ $SHOULD_BUILD == systemtest ]]; then
+ yum -y --setopt=skip_missing_names_on_install=False install \
+ zstd \
+ devtoolset-9-gcc-c++ \
+ devtoolset-9-libatomic-devel \
+ devtoolset-9-binutils \
+ libxml2-devel \
+ rh-ruby25-rubygems-devel \
+ rh-ruby25-ruby-devel \
+ rh-ruby25 \
+ rh-ruby25-rubygem-net-telnet
+
+ source /opt/rh/rh-ruby25/enable
+ gem install libxml-ruby gnuplot distribution test-unit builder concurrent-ruby
+
+ cd $HOME
+ git clone https://github.com/vespa-engine/system-test
+ export SYSTEM_TEST_DIR=$(pwd)/system-test
+ export RUBYLIB="$SYSTEM_TEST_DIR/lib:$SYSTEM_TEST_DIR/tests"
+ useradd vespa
+
+ $SYSTEM_TEST_DIR/lib/node_server.rb &
+ NODE_SERVER_PID=$!
+ sleep 3
+ ruby $SYSTEM_TEST_DIR/tests/search/basicsearch/basic_search.rb || (/opt/vespa/bin/vespa-logfmt -N && false)
+fi