Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/coverage rta #620

Open
wants to merge 18 commits into
base: master
Choose a base branch
from
11 changes: 11 additions & 0 deletions helper.fish
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
set -gx KEYNAME 86FEC04D
set -gx KEYNAME_OLD 115E1684

if test -f /usr/bin/podman
echo podman
set -xg DOCKER "podman"
set -xg DOCKER_URL_PREFIX "docker.io/"
set -xg DEFAULT_DOCKER_ARGS "--pids-limit 256704"
else
set -xg DOCKER "docker"
end


function lockDirectory
# Now grab the lock ourselves:
set -l pid (echo %self)
Expand Down Expand Up @@ -2237,6 +2247,7 @@ function findArangoDBVersion
echo "ARANGODB_SNIPPETS: $ARANGODB_SNIPPETS"
echo "ARANGODB_TGZ_UPSTREAM: $ARANGODB_TGZ_UPSTREAM"
echo "DOCKER_TAG: $DOCKER_TAG"
echo "DOCKER: $DOCKER"
echo '------------------------------------------------------------------------------'
echo
end
Expand Down
233 changes: 119 additions & 114 deletions helper.linux.fish

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions jenkins/docker/starter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ if test -z "$SSH_AUTH_SOCK"; then
agentstarted=1
fi

docker run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]
"$DOCKER" run -v $HOME/.ssh:/root/.ssh arangodb/ssh-client ssh -o StrictHostKeyChecking=no -T [email protected]

docker run \
"$DOCKER" run \
-e "PDOCKER=`getent group docker | cut -d: -f3`" \
-e "PGID=`id -g`" \
-e "PHOME=$HOME" \
Expand Down
12 changes: 6 additions & 6 deletions jenkins/forTestDocker.fish
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ and downloadStarter
and setArchSuffix
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_COMMUNITY
and docker push $HUB_COMMUNITY
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $HUB_COMMUNITY
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log

Expand All @@ -60,9 +60,9 @@ and copyRclone "linux"
and setArchSuffix
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_ENTERPRISE
and docker push $HUB_ENTERPRISE
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $HUB_ENTERPRISE
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log

Expand Down
6 changes: 3 additions & 3 deletions jenkins/forTestDockerCommunity.fish
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,9 @@ and downloadStarter
and setArchSuffix
and set -xg HUB_COMMUNITY "arangodb/arangodb-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_COMMUNITY
and docker push $HUB_COMMUNITY
and docker tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and docker push $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $HUB_COMMUNITY
and "$DOCKER" tag $HUB_COMMUNITY $GCR_REG_PREFIX$HUB_COMMUNITY
and "$DOCKER" push $GCR_REG_PREFIX$HUB_COMMUNITY
and echo $HUB_COMMUNITY >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_COMMUNITY >> $WORKSPACE/imagenames.log

Expand Down
6 changes: 3 additions & 3 deletions jenkins/forTestDockerEnterprise.fish
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ and copyRclone "linux"
and setArchSuffix
and set -xg HUB_ENTERPRISE "arangodb/enterprise-test:$DOCKER_TAG_JENKINS$archSuffix"
and buildDockerImage $HUB_ENTERPRISE
and docker push $HUB_ENTERPRISE
and docker tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and docker push $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $HUB_ENTERPRISE
and "$DOCKER" tag $HUB_ENTERPRISE $GCR_REG_PREFIX$HUB_ENTERPRISE
and "$DOCKER" push $GCR_REG_PREFIX$HUB_ENTERPRISE
and echo $HUB_ENTERPRISE >> $WORKSPACE/imagenames.log
and echo $GCR_REG_PREFIX$HUB_ENTERPRISE >> $WORKSPACE/imagenames.log

Expand Down
2 changes: 1 addition & 1 deletion jenkins/helper/runAnyPerformanceResults.fish
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ if count $src/results-*.csv > /dev/null
end

echo "Generating images"
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
or begin
echo "=== $gp ==="
cat $gp
Expand Down
14 changes: 7 additions & 7 deletions jenkins/helper/server.inc
Original file line number Diff line number Diff line change
Expand Up @@ -41,18 +41,18 @@ echo "AUTH: $ARANGO_AUTH"
echo "EDITION: $ARANGO_EDITION"
echo

docker kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
docker rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
docker pull $DOCKER_IMAGE
docker run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
"$DOCKER" kill $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
"$DOCKER" rm -fv $ARANGO_DOCKER_NAME > /dev/null 2>&1 || true
"$DOCKER" pull $DOCKER_IMAGE
"$DOCKER" run --rm --cap-add SYS_NICE $DOCKER_IMAGE arangosh --version | tee ./${ARANGO_DOCKER_NAME}.txt
export SERVER_FULL_VERSION=$(cat ./${ARANGO_DOCKER_NAME}.txt | grep -oP '^server-version: \K.*$')

OUTDIR="`pwd`/output"
rm -rf $OUTDIR
mkdir $OUTDIR
DOCKER_AUTH=""
STARTER_AUTH=""
DOCKER_CMD="docker run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
DOCKER_CMD="$DOCKER run --rm --hostname localhost --cap-add SYS_NICE --name $ARANGO_DOCKER_NAME -d $EXPORT_PORTS -v $OUTDIR:/testrun"
#DOCKER_IMAGE="registry.arangodb.biz:5000/arangodb/linux-${ARANGO_EDITION}-maintainer:$ARANGO_BRANCH"
STARTER_CMD="arangodb --starter.address localhost --starter.local --server.storage-engine $ARANGO_STORAGE_ENGINE --starter.data-dir /testrun ${MMFILES_DEPRECATED_OPTION}"
STARTER_MODE=""
Expand Down Expand Up @@ -101,7 +101,7 @@ command="$DOCKER_CMD $DOCKER_AUTH $DOCKER_IMAGE /testrun/starter.sh $STARTER_CMD
echo $command
$command

trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g")docker rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT
trap "$(trap -p | grep EXIT | sed "s/.*-- '\(.*\)'.EXIT/\1;/g") "$DOCKER" rm -fv $ARANGO_DOCKER_NAME ; sudo chown jenkins:jenkins -R output ; tar czf arango_data.tar.gz output" EXIT

echo "Waiting until ArangoDB is ready on port ${ARANGO_PORTS[0]}"

Expand Down Expand Up @@ -131,7 +131,7 @@ done

if [ $count -ge 240 ]; then
echo "docker logs:"
docker logs $ARANGO_DOCKER_NAME
"$DOCKER" logs $ARANGO_DOCKER_NAME

echo
echo "curl:"
Expand Down
1 change: 1 addition & 0 deletions jenkins/runFullNightlyTest.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env fish
set -l fish_trace on
source jenkins/helper/jenkins.fish

cleanPrepareLockUpdateClear
Expand Down
4 changes: 2 additions & 2 deletions jenkins/runGobenchPerformance.fish
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ and popd

and sudo rm -rf work/database $simple/results.csv
and echo "==== starting performance run ===="
and echo "docker run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"
and echo "$DOCKER run -e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY -v (pwd)/work/ArangoDB:/ArangoDB -v (pwd)/work:/data -v $simple:/performance -v $gobenchdir:/gobench"

and for protocol in VST HTTP
echo "Protocol: " $protocol
docker run \
"$DOCKER" run \
--cap-add SYS_NICE \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-e ARANGO_BRANCH=$ARANGODB_BRANCH \
Expand Down
2 changes: 1 addition & 1 deletion jenkins/runGobenchPerformanceResults.fish
Original file line number Diff line number Diff line change
Expand Up @@ -81,4 +81,4 @@ if test (count work/images/*.png) -gt 0
end

echo "Generating images"
docker run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
"$DOCKER" run -v (pwd)/work:/work pavlov99/gnuplot gnuplot $gp
10 changes: 10 additions & 0 deletions jenkins/runRTAtest.fish
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ cleanPrepareLockUpdateClear2
TT_init
set -xg RTA_EDITION "C,Cr2"

and maintainerOn
and eval $EDITION
and eval $TEST_SUITE
and setAllLogsToWorkspace
Expand All @@ -15,6 +16,11 @@ if test "$ASAN" = "true"
sanOn
and buildSanFlags "$WORKDIR/work/ArangoDB"
end
if test "$COVERAGE" = "true"
echo "Coverage build"
coverageOn
and buildSanFlags "$WORKDIR/work/ArangoDB"
end
if test "$BUILD_MODE" = "debug"
echo "switching to debug build"
debugMode
Expand Down Expand Up @@ -46,6 +52,10 @@ for f in $matches
echo $f | grep -qv testreport ; and echo "mv $f $WORKSPACE" ; and mv $f $WORKSPACE; or echo "skipping $f"
end

if test "$COVERAGE" = "true"
collectCoverage
end

unlockDirectory

exit $s
6 changes: 3 additions & 3 deletions jenkins/runSimplePerformance.fish
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and sudo rm -rf work/database $simple/results.csv
and cat /proc/sys/kernel/core_pattern
and echo "==== starting performance run ===="
and if test -z "$DOCKER_IMAGE"
docker run \
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work/ArangoDB:/ArangoDB \
Expand All @@ -44,7 +44,7 @@ and if test -z "$DOCKER_IMAGE"
/data/database \
--javascript.script simple/$ARANGODB_TEST_CONFIG"
else
docker run \
"$DOCKER" run \
--ulimit core=-1 \
-e ARANGO_LICENSE_KEY=$ARANGODB_LICENSE_KEY \
-v (pwd)/work:/data \
Expand All @@ -63,7 +63,7 @@ end
set -l s $status

if count $simple/core* >/dev/null
docker run \
"$DOCKER" run \
-v $simple:/performance \
--rm \
$DOCKER_IMAGE \
Expand Down
9 changes: 5 additions & 4 deletions scripts/lib/build.fish
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ function runMake
end

if test "$SHOW_DETAILS" = "On"
make $MAKEFLAGS $argv[1] 2>&1
make $MAKEFLAGS $argv[1] VERBOSE=1 -j 32 2>&1
or exit $status
else
echo make output in work/buildArangoDB.log
echo make output in work/buildArangoDB.log
set -l ep ""

if test "$SHOW_DETAILS" = "Ping"
Expand All @@ -232,9 +232,9 @@ function runMake
end

if test "$argv[1]" = "install"
nice make $MAKEFLAGS > $INNERWORKDIR/buildArangoDB.log 2>&1
nice make $MAKEFLAGS > $INNERWORKDIR/buildArangoDB.log VERBOSE=1 2>&1
end
and nice make $MAKEFLAGS $argv[1] >> $INNERWORKDIR/buildArangoDB.log 2>&1
and nice make $MAKEFLAGS $argv[1] >> $INNERWORKDIR/buildArangoDB.log VERBOSE=1 2>&1
or begin
if test -n "$ep"
kill $ep
Expand Down Expand Up @@ -286,6 +286,7 @@ function TT_cmake
end

function TT_make
set -l fish_trace on
set -g TT_t3 (date -u +%s)
and echo $TT_t0,make,(expr $TT_t3 - $TT_t2) >> $INNERWORKDIR/buildTimes.csv
end
Expand Down
2 changes: 1 addition & 1 deletion scripts/makeAlpine.fish
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ or exit $status

mkdir -p install
set -x DESTDIR (pwd)/install
nice make -j$PARALLELISM $argv
nice make -j$PARALLELISM $argv VERBOSE=1 V=1
2 changes: 1 addition & 1 deletion scripts/makeArangoDB.fish
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ if test "$PLATFORM" = "linux"
set GOLD = -DCMAKE_EXE_LINKER_FLAGS=-fuse-ld=gold -DCMAKE_SHARED_LINKER_FLAGS=-fuse-ld=gold
end

nice make -j$PARALLELISM $MAKE_TARGETS $argv
nice make -j$PARALLELISM $MAKE_TARGETS $argv VERBOSE=1 V=1
1 change: 1 addition & 0 deletions scripts/switchBranches.fish
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env fish
set -l fish_trace on

function setupSourceInfo
set -l field $argv[1]
Expand Down