qa: prepare for a hierarchical test script system

This commit is contained in:
Greg Farnum 2009-11-12 16:44:35 -08:00
parent 05fceac381
commit 565448b5bd
9 changed files with 35 additions and 64 deletions

View File

@ -1,14 +0,0 @@
#!/bin/bash
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
mount
enter_mydir
mkdir foo
echo foo > bar
sync
leave_mydir
umount

View File

@ -1,18 +0,0 @@
#!/bin/bash
basedir=`echo $0 | sed 's/[^/]*$//g'`
basedir="${basedir}."
. $basedir/common.sh
mount
enter_mydir
tar jxvf /root/linux*
cd linux*
make defconfig
make
cd ..
rm -r linux*
leave_mydir
umount

View File

@ -1,13 +0,0 @@
#!/bin/bash
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
mount
enter_mydir
dbench 1
dbench 10
leave_mydir
umount

19
qa/runallonce.sh Executable file
View File

@ -0,0 +1,19 @@
#!/bin/bash -x
#set -e
basedir=`pwd`
testdir="${basedir}/testspace"
mkdir -p $testdir
for test in `cd $basedir && find workunits/* | grep .sh`
do
cd $testdir
echo "------ running test $test ------"
mkdir -p $test
pushd .
cd $test
${basedir}/${test}
popd
done

5
qa/workunits/1.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
mkdir foo
echo foo > bar
sync

View File

@ -1,14 +1,5 @@
#!/bin/bash
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
mount
enter_mydir
iozone -c -e -s 1024M -r 16K -t 1 -F f1 -i 0 -i 1
iozone -c -e -s 1024M -r 1M -t 1 -F f2 -i 0 -i 1
iozone -c -e -s 10240M -r 1M -t 1 -F f3 -i 0 -i 1
leave_mydir
umount

View File

@ -0,0 +1,8 @@
#!/bin/bash
tar jxvf /root/linux*
cd linux*
make defconfig
make
cd ..
rm -r linux*

View File

@ -1,11 +1,4 @@
#!/bin/bash
basedir=`echo $0 | sed 's/[^/]*$//g'`.
. $basedir/common.sh
mount
enter_mydir
wget http://tuxera.com/sw/qa/pjd-fstest-20080816.tgz
tar zxvf pjd*
cd pjd*
@ -14,6 +7,3 @@ cd ..
mkdir tmp
cd tmp
prove -r ../pjd*/tests
leave_mydir
umount

3
qa/workunits/30_dbench.sh Executable file
View File

@ -0,0 +1,3 @@
#!/bin/bash
dbench 1
dbench 10