Skip to content

Instantly share code, notes, and snippets.

@scottmarlow
Created April 2, 2014 12:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save scottmarlow/9933391 to your computer and use it in GitHub Desktop.
Save scottmarlow/9933391 to your computer and use it in GitHub Desktop.
git bisect script for finding commit that caused regression
#!/bin/sh
echo "build the application server"
./build.sh clean install -Dmaven.test.skip=true || exit 125
echo "run the tck test now"
export TS_HOME=/home/smarlow/work/tck7/trunk
export JBOSS_HOME=/home/smarlow/work/as8/build/target/wildfly-8.0.1.Final-SNAPSHOT
export JAVAEE_HOME=$JBOSS_HOME
export JAVAEE_HOME_RI=/home/smarlow/work/glassfish4
export DERBY_HOME=$JAVAEE_HOME_RI/javadb
# we start in the WildFly 8 source tree
echo "stopping application server..."
$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown
echo "prepare for running the tck"
cd $TS_HOME/bin
ant config.vi
echo "start the app server in the background"
cd $JBOSS_HOME/bin
./standalone.sh $JBOSS_OPTS &> /dev/null &
sleep 30
echo "app server should be running"
jps -l
echo "check whether the admin port (9999) is open, i.e. application server is up"
netstat -an | grep ':9999' | grep LISTEN > /dev/null || ADMIN_PORT_OPEN=$?
if [[ $ADMIN_PORT_OPEN == 1 ]]; then
echo "WildFly 8 failed to start up!" && exit 1
fi
echo "application server is up"
# command line options:
# -c FOLDERNAME --- change to test source folder
# -t TEST --- execute test
#
# try the following
# git bisect run tckfindbadargs.sh -p src/com/sun/ts/tests/ejb32/lite/timer/schedule/expire -t "ant runclient -Dtest=dayOfWeekAll_from_ejbliteservlet2"
while getopts p:c:t: option
do
case $option in
p)
cd $TS_HOME/$OPTARG
pwd
;;
c)
cd $OPTARG
pwd
;;
t)
$OPTARG
status=$?
;;
esac
done
#echo "run single tck test"
#cd $TS_HOME/src/com/sun/ts/tests/ejb32/lite/timer/schedule/expire
#ant runclient -Dtest=dayOfWeekAll_from_ejbliteservlet2 > /tmp/tcktest.log
#status=$?
#echo "run single tck test completed with status = $status"
echo "stopping application server..."
$JBOSS_HOME/bin/jboss-cli.sh --connect command=:shutdown
exit $status
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment