aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--screwdriver.yaml1
-rwxr-xr-xtravis/detect-what-to-build.sh9
-rwxr-xr-xtravis/travis-build.sh27
3 files changed, 33 insertions, 4 deletions
diff --git a/screwdriver.yaml b/screwdriver.yaml
index 6b3795e6da6..f772c120e96 100644
--- a/screwdriver.yaml
+++ b/screwdriver.yaml
@@ -15,6 +15,7 @@ jobs:
screwdriver.cd/timeout: 600
environment:
+ USER_SHELL_BIN: bash
LOCAL_MVN_REPO: "/tmp/vespa/mvnrepo"
VESPA_MAVEN_EXTRA_OPTS: "-Dmaven.repo.local=/tmp/vespa/mvnrepo -Dmaven.javadoc.skip=true -Dmaven.source.skip=true"
CCACHE_TMP_DIR: "/tmp/ccache_tmp"
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..23f4fbb0772 100755
--- a/travis/travis-build.sh
+++ b/travis/travis-build.sh
@@ -49,4 +49,31 @@ 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
+ export USER=$(whoami)
+
+ $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