[Debian-l10n-commits] r1151 - in /ddtp-dinstall/trunk: Changelog testsuite.sh
nekral-guest at users.alioth.debian.org
nekral-guest at users.alioth.debian.org
Sat Aug 9 19:43:00 UTC 2008
Author: nekral-guest
Date: Sat Aug 9 19:42:59 2008
New Revision: 1151
URL: http://svn.debian.org/wsvn/?sc=1&rev=1151
Log:
* testsuite.sh: Run the testsuite with -eu
* testsuite.sh: Run with a temporary directory created with
mktemp.
Modified:
ddtp-dinstall/trunk/Changelog
ddtp-dinstall/trunk/testsuite.sh
Modified: ddtp-dinstall/trunk/Changelog
URL: http://svn.debian.org/wsvn/ddtp-dinstall/trunk/Changelog?rev=1151&op=diff
==============================================================================
--- ddtp-dinstall/trunk/Changelog (original)
+++ ddtp-dinstall/trunk/Changelog Sat Aug 9 19:42:59 2008
@@ -1,3 +1,9 @@
+2008-08-09 Nicolas François <nicolas.francois at centraliens.net>
+
+ * testsuite.sh: Run the testsuite with -eu
+ * testsuite.sh: Run with a temporary directory created with
+ mktemp.
+
2008-08-09 Nicolas François <nicolas.francois at centraliens.net>
* testsuite/: Added testsuites: bad/wrong-language-name,
Modified: ddtp-dinstall/trunk/testsuite.sh
URL: http://svn.debian.org/wsvn/ddtp-dinstall/trunk/testsuite.sh?rev=1151&op=diff
==============================================================================
--- ddtp-dinstall/trunk/testsuite.sh (original)
+++ ddtp-dinstall/trunk/testsuite.sh Sat Aug 9 19:42:59 2008
@@ -10,6 +10,8 @@
#
# On Debian systems, you can find the full text of the license in
# /usr/share/common-licenses/GPL-2
+
+set -eu
TESTSUITE_DIR="./testsuite"
CHECK_SCRIPT="./ddtp_i18n_check.sh"
@@ -27,22 +29,23 @@
pt_d="$1"
pt_basename=$(basename $pt_d)
pt_dirname=$(dirname $pt_d)
- cp -aH $pt_d tmp
- cp -aH $pt_dirname.pkgs/$pt_basename tmp.pkgs
- find tmp tmp.pkgs -name ".svn" | xargs rm -rf
+ pt_tmp=$(mktemp -d testsuite-XXXXXX)
+ cp -aH $pt_d "$pt_tmp/test"
+ cp -aH $pt_dirname.pkgs/$pt_basename "$pt_tmp/test.pkgs"
+ find $pt_tmp -name ".svn" | xargs rm -rf
- echo "tmp"
+ echo "$pt_tmp"
}
clean_testsuite () {
- ct_d="$1"
- rm -rf "$ct_d" "$ct_d.pkgs"
+ ct_tmp="$1"
+ rm -rf "$ct_tmp"
}
# The good testsuites must not fail
for d in $TESTSUITE_DIR/good/*; do
tmp=$(prepare_testsuite "$d")
- if $CHECK_SCRIPT tmp tmp.pkgs > $d.log 2>&1; then
+ if $CHECK_SCRIPT "$tmp/test" "$tmp/test.pkgs" > $d.log 2>&1; then
echo " OK* $d"
else
echo "*NO $d"
@@ -56,7 +59,7 @@
# The bad testsuites must fail
for d in $TESTSUITE_DIR/bad/*; do
tmp=$(prepare_testsuite "$d")
- if $CHECK_SCRIPT tmp tmp.pkgs > $d.log 2>&1; then
+ if $CHECK_SCRIPT "$tmp/test" "$tmp/test.pkgs" > $d.log 2>&1; then
echo "*NO $d"
failures="$failures $d"
else
@@ -72,3 +75,4 @@
else
echo "No testsuites failed"
fi
+
More information about the Debian-l10n-commits
mailing list