X-Git-Url: https://feistymeow.org/gitweb/?a=blobdiff_plain;f=testkit%2Flibrary%2Fproduce_test_package.sh;fp=testkit%2Flibrary%2Fproduce_test_package.sh;h=b6a93f628a749058a44cc83a4080dbe149c5daf3;hb=89049b640bdfdd41c596381e897e8cc3d2ba1690;hp=0000000000000000000000000000000000000000;hpb=d73f2ef918fcbefb9207752a85f850acb72058f8;p=feisty_meow.git diff --git a/testkit/library/produce_test_package.sh b/testkit/library/produce_test_package.sh new file mode 100644 index 00000000..b6a93f62 --- /dev/null +++ b/testkit/library/produce_test_package.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +# Creates an archive from the test scripts. +# +# Author: Chris Koeritz + +export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )" # obtain the script's working directory. +cd "$WORKDIR" +export SHOWED_SETTINGS_ALREADY=true +if [ -z "$TESTKIT_SENTINEL" ]; then + source ../prepare_tools.sh ../prepare_tools.sh +fi +source "$TESTKIT_ROOT/library/establish_environment.sh" + +pushd "$TESTKIT_ROOT/.." &>/dev/null +justdir="$(basename "$TESTKIT_ROOT")" + +date_string="$(date +"%Y_%b_%e_%H%M" | sed -e 's/ //g')" + +EXCLUDES=(--exclude=".svn" --exclude="docs" --exclude="random*.dat" --exclude=gzip-1.2.4 --exclude=iozone3_397 --exclude="mount-*" --exclude="releases" --exclude="passwords.txt" --exclude="saved_deployment_info.txt" --exclude="generated_certs" --exclude="gridwide_certs" --exclude="testkit.config*" --exclude="inputfile.txt*") + +tar -czf "$HOME/testkit_${date_string}.tar.gz" "$justdir" ${EXCLUDES[*]} + +popd &>/dev/null +