this seems to improve the non-rebooting situation
[xfstests-dev.git] / tools / auto-qa
index 4fa944177f7b6ef9804bee10d7574a5eb4b6588a..a4e07c5211c6b57ea522e20c68490d8b96f52803 100755 (executable)
@@ -65,7 +65,7 @@ _fail()
 # configuration (you could tune this)
 
 EXTRA="-xfs-qa"
-VERSION="2.4.0"
+VERSION="2.4.1"
 BOOT="/boot"
 SOAK_PASSES="-1"
 SOAK_STRESS="10000"
@@ -75,11 +75,11 @@ SOAK_PROC="3"
 
 ROOT="$HOME/qa"
 HOST=`hostname -s`
-if [ ! -z "CVSROOT" ]; then
-    CVS=true
+if [ ! -z "$CVSROOT" ]; then
     WORKAREA="$ROOT/linux-2.4-xfs"
+else
+    [ -z "$WORKAREA" ] && WORKAREA="$ROOT/linux-xfs"
 fi
-[ -z "$WORKAREA" ] && WORKAREA="$ROOT/linux-xfs"
 export WORKAREA
 
 export PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin/ptools:/usr/local/bin"
@@ -88,7 +88,7 @@ QADIR="$WORKAREA/cmd/xfstests"
 SUDO="su -c"
 IMAGE="$BOOT/vmlinuz-$VERSION$EXTRA"
 SYSTEMMAP="$BOOT/System.map-$VERSION$EXTRA"
-CONFIG="$ROOT/$HOST-$VERSION$EXTRA.config"
+CONFIG="$ROOT/$HOST.config"
 MODULES="/lib/modules/$VERSION$EXTRA"
 COMMON_CONFIG="$WORKAREA/cmd/xfstests/common.config"
 SH="/bin/sh"
@@ -192,24 +192,24 @@ _sudo()
 
 _restart()
 {
-    exec $ROOT/su -c "shutdown -r 2 \"auto-qa rebooting\" &" < /dev/null
+    exec $ROOT/su -c "(shutdown -r 2 \"auto-qa rebooting\" ; reboot )&" < /dev/null
 }
 
 _update_autoqa_file()
 {
     SELF="$ROOT/auto-qa"
     SELF_UPDATE="cmd/xfstests/tools/auto-qa"
-    if [ $CVS = false ]; then
+    if [ -z "$CVSROOT" ]; then
            cmd="p_tupdate $SELF_UPDATE"
     else
            cmd="cvs -z3 update $SELF_UPDATE"
     fi
-    exec $SH -c "cd $WORKAREA ; eval $cmd; chmod +x $SELF_UPDATE ; exec $SELF"
+    exec $SH -c "cd $WORKAREA ; $cmd; chmod +x $SELF_UPDATE ; exec $SELF"
 }
 
 _update_workarea()
 {
-    if [ $CVS = false ]; then
+    if [ -z "$CVSROOT" ]; then
        _log "        *** p_tupdate"
        cd $WORKAREA 
        p_tupdate 2>&1 \
@@ -383,10 +383,11 @@ do
 
             _log "        *** build and install quota tools"
             cd $WORKAREA/cmd/quota
+            rm -f configure
             
             # use e-fence - but this will only take effect on configure
             export MALLOCLIB=/usr/lib/libefence.a
-            ( rm -f configure ; autoconf ; sh configure ; make all ) 2>&1 \
+            ( autoconf ; sh configure --prefix=/usr; make all ) 2>&1 \
                         || _fail "            !!! build quota failed"
             _sudo make install 2>&1 \
                         || _fail "            !!! install quota failed"