applied patch per SF bug 3302219

"unit tests are badly portable"
This commit is contained in:
Vadim Kurland
2011-05-14 22:47:37 -07:00
parent e149666e51
commit 04545f9818
4 changed files with 30 additions and 40 deletions
+7 -8
View File
@@ -1,12 +1,11 @@
#!/bin/bash
#!/bin/sh
action=$@
QMAKE="${QMAKE:-qmake}"
QMAKEPARAMS="${QMAKESPEC:+ -spec $QMAKESPEC}"
for directory in $(find . -name unit_tests)
set -e
find . -mindepth 1 -type d -name unit_tests | while read directory
do
home=`pwd`
cd $directory
[ -z $QMAKESPEC ] && { qmake || exit 1; } || { qmake -spec $QMAKESPEC || exit 1; }
$action || exit 1
cd $home
echo "===> Running tests in $directory"
(cd $directory && $QMAKE $QMAKEPARAMS && "$@")
done