Modified pounder install and run scripts
PATCH 6/7 Modified pounder install and run scripts
Made changes to two files here, the Install script that builds pounder, and the pounder script that runs it. Updated the Install script to have it now list the available test schedulers for user selectrion prior to starting the build process. Install also now includes the functionality for allowing users to skip subtests that failed to build rather than just exiting out of the entire build process due to a single subtest failure.
The updated pounder script now includes the -m, -c, -l, -e, -i, and -h options (README has more info). The -c, -e, -i options handle creation and modification of test schedulers. The -m option sets an upper bound on output of repeatedly run subtests. The -l option lists subtests packaged with the test scheduler and the -h option gives description of pounder usage. Also moved all the provided test schedulers into newly created schedulers/ directory.
(warning: this patch contains binary info that seems like only git understands, so should use something like git-apply rather than regular patch to apply this particular patch)
--- tools/pounder21/Install | 63 ++++++-- tools/pounder21/default-tests.tar.gz | Bin 1441 -> 0 bytes tools/pounder21/fast-tests.tar.gz | Bin 1292 -> 0 bytes tools/pounder21/pounder | 174 ++++++++++++++++++----- tools/pounder21/schedulers/default-tests.tar.gz | Bin 0 -> 1663 bytes tools/pounder21/schedulers/fast-tests.tar.gz | Bin 0 -> 1494 bytes tools/pounder21/schedulers/test-tests.tar.gz | Bin 0 -> 1057 bytes tools/pounder21/test-tests.tar.gz | Bin 1006 -> 0 bytes tools/pounder21/testall-tests.tar.gz | Bin 314 -> 0 bytes 9 files changed, 186 insertions(+), 51 deletions(-) delete mode 100644 tools/pounder21/default-tests.tar.gz delete mode 100644 tools/pounder21/fast-tests.tar.gz create mode 100644 tools/pounder21/schedulers/default-tests.tar.gz create mode 100644 tools/pounder21/schedulers/fast-tests.tar.gz create mode 100644 tools/pounder21/schedulers/test-tests.tar.gz delete mode 100644 tools/pounder21/test-tests.tar.gz delete mode 100644 tools/pounder21/testall-tests.tar.gz
--------------1.7.4.1
Content-Type: text/x-patch; name="0006-Modified-pounder-install-and-run-scripts.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0006-Modified-pounder-install-and-run-scripts.patch"
tools/pounder21/Install +48 -15
@@ -24,7 +24,7 @@ source libpounder.sh export USE_CACHE=1 # do we actually _have_ a cache server? -if [ -z "$POUNDER_CACHE" ]; then +if [ -z "$POUNDER_CACHE" -o "$POUNDER_CACHE" == "0" ]; then export USE_CACHE=0 fi
@@ -73,7 +73,12 @@ UNPACKED=0 while [ "$UNPACKED" -lt 1 ]; do # Unpack default test configuration? - echo -en "Which test scheduler setup do you want to unpack? [$DEFAULT_SCHEDPACK or \"NONE\"] " + SCHEDULERS=`ls $POUNDER_HOME/schedulers | awk -F"-tests.tar.gz" '{print $1}'` + echo "WHICH TEST SCHEDULER SETUP DO YOU WANT TO UNPACK?" + echo "[Choose from:" + echo "$SCHEDULERS" + echo "[Or simply press ENTER for the default scheduler]" + echo -n "Scheduler selection: " read f if [ -z "$f" ]; then SCHEDPACK="$DEFAULT_SCHEDPACK"
@@ -81,22 +86,26 @@ while [ "$UNPACKED" -lt 1 ]; do SCHEDPACK="$f" fi - if [ "$f" != "NONE" ]; then - rm -rf tests/* + rm -rf tests/* - tar -xzvf "$SCHEDPACK-tests.tar.gz" + tar -xzvf "$POUNDER_HOME/schedulers/$SCHEDPACK-tests.tar.gz" - if [ "$?" -ne 0 ]; then - echo "Unable to untar $SCHEDPACK-tests.tar.gz; please try again." - else - echo "Untarred $SCHEDPACK-tests.tar.gz successfully." - UNPACKED=1 - fi + if [ "$?" -ne 0 ]; then + echo "Unable to untar $SCHEDPACK-tests.tar.gz; please try again." else + echo "Untarred $SCHEDPACK-tests.tar.gz successfully." UNPACKED=1 fi done +echo -en "Would you like to automate skipping of failed subtests? (subtests that failed to build will automatically be removed from test scheduler) [y/n]? " +read f +if [ "$f" == "y" -o "$f" == "Y" ]; then + AUTO_SKIP=1 +else + AUTO_SKIP=0 +fi + # start builds... for i in $BUILDS do
@@ -104,10 +113,34 @@ do continue fi if [ -x "build_scripts/$i" ]; then - echo "Building $i..." - "build_scripts/$i" $* - if [ "$?" -ne 0 ]; then - exit 1 + FOUND=`find $POUNDER_HOME/tests -name *$i` + if [ -n "$FOUND" ]; then + "build_scripts/$i" $* + BUILD_ERR=$? + if [ "$BUILD_ERR" -ne 0 ]; then + if [ $AUTO_SKIP -eq 0 ]; then + echo -en "$i build failed with Error $BUILD_ERR. If this is a subtest, would you like to skip it [y/n]? " + read f + if [ "$f" == "y" -o "$f" == "Y" ]; then + rm `find $POUNDER_HOME/tests -name *$i` > /dev/null 2>&1 + if [ "$?" -ne 0 ]; then + echo "Failed to remove $i from test scheduler. $i is either not a subtest included in $SCHEDPACK-tests.tar.gz or is incorrectly defined in $POUNDER_HOME/tests (See SCHEDULER for naming rules if this is the case)." + echo -en "Skip anyway? [y/n] " + read f + if [ "$?" == "y" -o "$f" == "Y" ]; then + exit 0 + elif [ "$f" == "n" -o "$f" == "N" -o -z "$f" ]; then + exit 1 + fi + fi + elif [ "$f" == "n" -o "$f" == "N" -o -z "$f" ]; then + echo "Exiting install ..." + exit 1 + fi + else + rm `find ./tests -name *$i` > /dev/null 2>&1 + fi + fi fi fi done
tools/pounder21/default-tests.tar.gz deleted binary +0 -0
tools/pounder21/fast-tests.tar.gz deleted binary +0 -0
tools/pounder21/pounder +138 -36
207 lines not on this page · raw message
tools/pounder21/schedulers/default-tests.tar.gz new file binary +0 -0
tools/pounder21/schedulers/fast-tests.tar.gz new file binary +0 -0
tools/pounder21/schedulers/test-tests.tar.gz new file binary +0 -0
tools/pounder21/test-tests.tar.gz deleted binary +0 -0
tools/pounder21/testall-tests.tar.gz deleted binary +0 -0
--------------1.7.4.1--
------------------------------------------------------------------------------
FREE DOWNLOAD - uberSVN with Social Coding for Subversion. Subversion made easy with a complete admin console. Easy to use, easy to manage, easy to install, easy to extend. Get a Free download of the new open ALM Subversion platform now.
http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list