src/.../scripts/jenkins: switch over to exactly jenkins script
set -e
-notif() {
- echo -e "\n$@" \
- "\n================================================================================" \
- "\n" >&2
-}
+nprocs="$(grep -c '^processor' /proc/cpuinfo)"
-NPROCS="${NPROCS:-$(grep -c '^processor' /proc/cpuinfo)}"
-WORKSPACE="${WORKSPACE:-$(pwd)}"
-
-K_EXERCISES_REPO="${K_EXERCISES_REPO:-git@github.com:kframework/k-exercises.git}"
-RVMATCH_REPO="${RVMATCH_REPO:-git@github.com:runtimeverification/rv-match.git}"
-
-KSERVER_SOCKET="$WORKSPACE/kserver"
-KSERVER_LOG="$WORKSPACE/kserver.log"
-export KSERVER_SOCKET
-
-notif "CLEANING REPO"
-mvn clean
-git clean -dfx
-
-notif "SETTING UP OPAM/PERL ENVIRONMENTS"
eval `opam config env`
eval `perl -I$HOME/perl5/lib/perl5 -Mlocal::lib`
-notif "CLONING SUBMODULES"
+echo "=== RUNNING LOCAL TESTS ==="
+cd ${WORKSPACE}/k-pr
git submodule update --init
-
-notif "BUILDING/RUNNING LOCAL TESTS"
mvn verify -U
-notif "STARTING KSERVER"
-./k-distribution/target/release/k/bin/spawn-kserver "$KSERVER_LOG"
-sleep 5
-
-notif "CLONING K EXERCISES"
+echo "=== RUNNING K EXERCISES ==="
+cd ${WORKSPACE}/k-pr
rm -rf k-exercises
-git clone "$K_EXERCISES_REPO" k-exercises
-
-notif "RUNNING K EXERCISES"
-( cd k-exercises/tutorial
- make -j"$NPROCS"
-)
-
-notif "KILLING KSERVER"
-./k-distribution/target/release/k/bin/stop-kserver || true
+git clone 'git@github.com:kframework/k-exercises.git'
+cd k-exercises/tutorial
+export KSERVER_SOCKET=$(pwd)/kserver
+../../k-distribution/target/release/k/bin/spawn-kserver kserver.log
+sleep 5
+make -j"$nprocs"
+../../k-distribution/target/release/k/bin/stop-kserver || true
-notif "CLONING/PREPARING RV-MATCH"
+echo "=== RUNNING RV-MATCH TESTS ==="
+cd ${WORKSPACE}
rm -rf rv-match
-git clone "$RVMATCH_REPO" rv-match
-( cd rv-match
- git submodule update --init -- c-semantics k
- cd k
- git fetch ../../
- git checkout FETCH_HEAD
- mvn package -DskipTests
-)
-
-notif "RUNNING RV-MATCH TESTS"
-( cd rv-match
+git clone git@github.com:runtimeverification/rv-match.git
+cd rv-match
+git submodule update --init -- c-semantics
+rm -rf k
+cp -r ${WORKSPACE}/k-pr k
mvn verify -U -DskipKTest -DbuildProfile=x86_64-gcc-glibc
-)
