diff options
author | Stan Cox <scox@redhat.com> | 2009-12-21 17:23:03 -0500 |
---|---|---|
committer | Stan Cox <scox@redhat.com> | 2009-12-21 17:23:03 -0500 |
commit | 4e275917e8ef91778cd1ba0d469c8f00c776f2eb (patch) | |
tree | 452a511a7fde8bf13ce2b756c3e6eeb578d4b85e | |
parent | 40b71c4777ca110d69d5d61563d032a5ba1355df (diff) | |
download | systemtap-steved-4e275917e8ef91778cd1ba0d469c8f00c776f2eb.tar.gz systemtap-steved-4e275917e8ef91778cd1ba0d469c8f00c776f2eb.tar.xz systemtap-steved-4e275917e8ef91778cd1ba0d469c8f00c776f2eb.zip |
Cleanup in testsuite/system.apps
* mysql.exp (stap-mysql.sh): Shutdown properly.
* xulrunner.exp: Run depending on SYSTEMTAP_TESTAPPS env
(stap-xul.sh): Fix xulrelease. Add mozjs-dtrace.o to js link line.
-rw-r--r-- | testsuite/systemtap.apps/mysql.exp | 39 | ||||
-rw-r--r-- | testsuite/systemtap.apps/stap-tcl.sh | 2 | ||||
-rw-r--r-- | testsuite/systemtap.apps/xulrunner.exp | 18 |
3 files changed, 40 insertions, 19 deletions
diff --git a/testsuite/systemtap.apps/mysql.exp b/testsuite/systemtap.apps/mysql.exp index 497949c0..d057b6ae 100644 --- a/testsuite/systemtap.apps/mysql.exp +++ b/testsuite/systemtap.apps/mysql.exp @@ -269,11 +269,11 @@ RELEASE=\$(grep 'handler__unlock__done' $testsuite/stap-mysql-markers.log | wc - COMMAND=\$(grep 'command__start' $testsuite/stap-mysql-markers.log | wc -l) QUERY=\$(grep 'query__start' $testsuite/stap-mysql-markers.log | wc -l) RDLOCK=\$(grep 'handler__rdlock__start' $testsuite/stap-mysql-markers.log | wc -l) -SELECT=\$(grep 'select_start' $testsuite/stap-mysql-markers.log | wc -l) +SELECT=\$(grep 'select__start' $testsuite/stap-mysql-markers.log | wc -l) OKAY=\$(grep 'All.*tests were successful' $testsuite/stap-mysql.log | wc -l) echo ACQUIRE=\$ACQUIRE RELEASE=\$RELEASE COMMAND=\$COMMAND QUERY=\$QUERY RDLOCK=\$RDLOCK SELECT=\$SELECT OKAY=\$OKAY -if \[ \$ACQUIRE -gt 10000 -a \$RELEASE -gt 1000 -a \$COMMAND -gt 12000 -a \$QUERY -gt 13000 -a \$RDLOCK -gt 3000 \] ; then +if \[ \$ACQUIRE -gt 10000 -a \$RELEASE -gt 1000 -a \$COMMAND -gt 12000 -a \$QUERY -gt 13000 -a \$RDLOCK -gt 3000 -a \$SELECT -gt 2000 \] ; then echo PASS: mysql markers \$1 else echo FAIL: mysql markers \$1 @@ -285,8 +285,13 @@ else echo FAIL: mysql tests \$1 fi -$mysqldir/bin/mysqladmin shutdown -u root --socket=stap-mysql/mysql.sock -kill \$STAPPID +mv $testsuite/stap-mysql.log $testsuite/stap-mysql-\$1.log +cat $testsuite/stap-mysql-markers.log >> $testsuite/stap-mysql-\$1.log +rm $testsuite/stap-mysql-markers.log + +$mysqldir/bin/mysqladmin shutdown -u root --socket=$testsuite/stap-mysql/mysql.sock +kill -9 \$STAPPID +kill -9 $testsuite/stap-mysql/mysql.pid \} ##### end run_tests ##### @@ -305,24 +310,34 @@ mkdir mysql mv $mysqlrelease mysql/src fi -if \[ ! -f mysql/install/bin/mysql \] ; then -cd mysql -mkdir bld -cd bld +if \[ ! -d mysql/bld \] ; then +mkdir -p mysql/bld +cd mysql/bld # Force the use of dtrace sed -i -e 's/HAVE_DTRACE_DASH_G=\"no\"/HAVE_DTRACE_DASH_G=\"yes\"/' ../src/configure ../src/configure --enable-dtrace --prefix=$mysqldir for i in \$(find . -name Makefile) ; do sed -i -e 's/^CXXFLAGS =/& -g/' \$i done +fi + +cd mysql/bld -make -j2 +J=\$(getconf _NPROCESSORS_CONF) +make -j\$J cp ./abi_check.out ../../src/include/mysql.h.pp -make -j2 +make -j\$J make install -fi - run_tests uprobe + +# for i in \$(find . -name Makefile) ; do +# sed -i -e 's/^CFLAGS = .*$/& -DEXPERIMENTAL_UTRACE_SDT /' \$i +# sed -i -e 's/^CXXFLAGS = .*$/& -DEXPERIMENTAL_UTRACE_SDT /' \$i +# done +# for i in sql storage mysys ; do (cd \$i ; make clean) ; done +# make -i -j2 +# make install +# run_tests utrace " ########## End /tmp/stap-mysql.sh ########## close $fp diff --git a/testsuite/systemtap.apps/stap-tcl.sh b/testsuite/systemtap.apps/stap-tcl.sh index 919f632d..c3a7f6b7 100644 --- a/testsuite/systemtap.apps/stap-tcl.sh +++ b/testsuite/systemtap.apps/stap-tcl.sh @@ -15,6 +15,8 @@ fi if [ ! -d tcl/src ] ; then tar -x -z -f tcl$tclrelease-src.tar.gz mv tcl$tclrelease tcl/src + sed -i '/runAllTests/i\ +singleProcess true' tcl/src/tests/all.tcl fi cd tcl/src/unix diff --git a/testsuite/systemtap.apps/xulrunner.exp b/testsuite/systemtap.apps/xulrunner.exp index be2db0c7..7a6b934a 100644 --- a/testsuite/systemtap.apps/xulrunner.exp +++ b/testsuite/systemtap.apps/xulrunner.exp @@ -4,13 +4,15 @@ set test "xulrunner" global env -if {! [info exists env(SYSTEMTAP_TEST_SDT)]} { - unsupported "xulrunner (\"SYSTEMTAP_TEST_SDT\" not in env)" +if {! [info exists env(SYSTEMTAP_TESTAPPS)] || ( + ! [string match "tcl" $env(SYSTEMTAP_TESTAPPS)] && + ! [string match "all" $env(SYSTEMTAP_TESTAPPS)])} { + untested "$test sdt app" return } ########## Create /tmp/stap-xul.stp ########## -set xulrelease "1.9.1.3" +set xulrelease "1.9.1.4" set xuldir "[pwd]/xul/" set testsuite "[pwd]" @@ -76,13 +78,13 @@ fi \} ##### end run_tests ##### -if \[ ! -r xulrunner-$xulrelease-source.tar \] ; then -wget ftp://ftp.mozilla.org/pub/mozilla.org/xul/releases/$xulrelease/source/xulrunner-$xulrelease-source.tar.bz2 -bunzip2 xulrunner-$xulrelease-source.tar.bz2 +if \[ ! -r xulrunner-$xulrelease.source.tar.bz2 \] ; then +wget ftp://ftp.mozilla.org/pub/mozilla.org/xulrunner/releases/$xulrelease/source/xulrunner-$xulrelease.source.tar.bz2 fi if \[ ! -d xul/src \] ; then -tar -x -f xulrunner-$xulrelease-source.tar +bunzip2 xulrunner-$xulrelease.source.tar.bz2 +tar -x -f xulrunner-$xulrelease.source.tar mkdir xul xulrelease=$xulrelease mv mozilla-\${xulrelease%.\[0-9\]} xul/src @@ -101,6 +103,8 @@ CXXFLAGS='-g -I$env(SYSTEMTAP_INCLUDES)' \ CFLAGS='-g -I$env(SYSTEMTAP_INCLUDES)' \ PATH=$env(SYSTEMTAP_PATH)/:\$PATH \ ../src/configure --prefix=$xuldir --enable-dtrace --enable-application=xulrunner +sed -i '/include.*rules.mk/a\ +PROGOBJS+=./mozjs-dtrace.o' xul/bld/js/src/Makefile J=\$(getconf _NPROCESSORS_CONF) make -j \$J fi |