This is an automated email from the ASF dual-hosted git repository. mck pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/cassandra-builds.git
The following commit(s) were added to refs/heads/master by this push: new 51eb85b Print exit status for dtest docker runs, and debug on failures. Fix grabbing of ccm logs files from dtests. 51eb85b is described below commit 51eb85b57b62a542ca456e52a20bee06955f6ec1 Author: Mick Semb Wever <m...@apache.org> AuthorDate: Sun Jun 7 12:16:27 2020 +0200 Print exit status for dtest docker runs, and debug on failures. Fix grabbing of ccm logs files from dtests. --- build-scripts/cassandra-dtest-pytest.sh | 13 ++++++++----- docker/jenkins/jenkinscommand.sh | 13 +++++++++---- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/build-scripts/cassandra-dtest-pytest.sh b/build-scripts/cassandra-dtest-pytest.sh index 00bb8f2..b8a38a0 100755 --- a/build-scripts/cassandra-dtest-pytest.sh +++ b/build-scripts/cassandra-dtest-pytest.sh @@ -65,21 +65,24 @@ cd cassandra-dtest/ mkdir -p ${TMPDIR} set +e # disable immediate exit from this point if [ "${DTEST_TARGET}" = "dtest" ]; then - pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt + pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests --keep-test-dir 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt elif [ "${DTEST_TARGET}" = "dtest-novnode" ]; then - pytest -vv --log-level="INFO" --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt + pytest -vv --log-level="INFO" --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests --keep-test-dir 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt elif [ "${DTEST_TARGET}" = "dtest-offheap" ]; then - pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --use-off-heap-memtables --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt + pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --use-off-heap-memtables --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --skip-resource-intensive-tests --keep-test-dir 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt elif [ "${DTEST_TARGET}" = "dtest-large" ]; then - pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --only-resource-intensive-tests 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt + pytest -vv --log-level="INFO" --use-vnodes --num-tokens=32 --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --only-resource-intensive-tests --keep-test-dir 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt elif [ "${DTEST_TARGET}" = "dtest-upgrade" ]; then export RUN_STATIC_UPGRADE_MATRIX=true - pytest -vv --log-level="INFO" --execute-upgrade-tests-only --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt + pytest -vv --log-level="INFO" --execute-upgrade-tests-only --junit-xml=nosetests.xml --junit-prefix=${DTEST_TARGET} -s --cassandra-dir=$CASSANDRA_DIR --keep-test-dir 2>&1 | tee -a ${WORKSPACE}/test_stdout.txt else echo "Unknown dtest target: ${DTEST_TARGET}" exit 1 fi +# tar up ccm logs for easy retrieval +tar -cJf ccm_logs.tar.xz ${TMPDIR}/*/test/*/logs/* + ################################ # # Clean diff --git a/docker/jenkins/jenkinscommand.sh b/docker/jenkins/jenkinscommand.sh index 1a4b233..caa97e2 100644 --- a/docker/jenkins/jenkinscommand.sh +++ b/docker/jenkins/jenkinscommand.sh @@ -16,16 +16,21 @@ EOF echo "jenkinscommand.sh: running: git clone --branch $BUILDSBRANCH $BUILDSREPO; sh ./cassandra-builds/docker/jenkins/dtest.sh $TARGET" ID=$(docker run --env-file env.list -dt $DOCKER_IMAGE dumb-init bash -ilc "git clone --branch $BUILDSBRANCH $BUILDSREPO; sh ./cassandra-builds/docker/jenkins/dtest.sh $TARGET") + # use docker attach instead of docker wait to get output docker attach --no-stdin $ID +status="$?" +echo "$ID done (${status}), copying files" + +if [ "$status" -ne 0 ] ; then + docker ps -a + docker info +fi -echo "$ID done, copying files" # pytest results docker cp $ID:/home/cassandra/cassandra/cassandra-dtest/nosetests.xml . # pytest logs docker cp $ID:/home/cassandra/cassandra/test_stdout.txt . -# ccm logs. depends on $TMP_DIR and ccm cluster name. see cassandra-dtest-pytest.sh -docker exec $ID /bin/bash -c "tar -cJf /ccm_logs.tar.xz /home/cassandra/cassandra/cassandra-dtest/tmp/*/test/*/logs/*" -docker cp $ID:/ccm_logs.tar.xz . +docker cp $ID:/home/cassandra/cassandra/cassandra-dtest/ccm_logs.tar.xz . docker rm $ID --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org