[Debian-l10n-commits] r1144 - in /ddtp-dinstall/trunk: Changelog testsuite.sh

nekral-guest at users.alioth.debian.org nekral-guest at users.alioth.debian.org
Sat Aug 9 03:49:50 UTC 2008


Author: nekral-guest
Date: Sat Aug  9 03:49:50 2008
New Revision: 1144

URL: http://svn.debian.org/wsvn/?sc=1&rev=1144
Log:
	* testsuite.sh: Make the testsuite generate some $test.log and
	output a simple list of tests which succeeded and failed.
	* testsuite.sh: Remove the .log files at the beginning.
	* testsuite.sh: Merge some common stuff from the processing of
	"good" and "bad" to the prepare_testsuite() and clean_testsuite()
	functions.

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=1144&op=diff
==============================================================================
--- ddtp-dinstall/trunk/Changelog (original)
+++ ddtp-dinstall/trunk/Changelog Sat Aug  9 03:49:50 2008
@@ -1,3 +1,12 @@
+2008-08-09  Nicolas François  <nicolas.francois at centraliens.net>
+
+	* testsuite.sh: Make the testsuite generate some $test.log and
+	output a simple list of tests which succeeded and failed.
+	* testsuite.sh: Remove the .log files at the beginning.
+	* testsuite.sh: Merge some common stuff from the processing of
+	"good" and "bad" to the prepare_testsuite() and clean_testsuite()
+	functions.
+
 2008-08-09  Nicolas François  <nicolas.francois at centraliens.net>
 
 	* ddtp_i18n_check.sh: run with set -u.

Modified: ddtp-dinstall/trunk/testsuite.sh
URL: http://svn.debian.org/wsvn/ddtp-dinstall/trunk/testsuite.sh?rev=1144&op=diff
==============================================================================
--- ddtp-dinstall/trunk/testsuite.sh (original)
+++ ddtp-dinstall/trunk/testsuite.sh Sat Aug  9 03:49:50 2008
@@ -8,36 +8,50 @@
 	exit 1
 fi
 
-find $TESTSUITE_DIR \( -name "*.gz" -o -name "*.bz2" -o -name "SHA256SUMS" \) -delete
+find $TESTSUITE_DIR \( -name "*.gz" -o -name "*.bz2" -o -name "SHA256SUMS" -o -name "*.log" \) -delete
 
 failures=""
 
+prepare_testsuite () {
+	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
+
+	echo "tmp"
+}
+
+clean_testsuite () {
+	ct_d="$1"
+	rm -rf "$ct_d" "$ct_d.pkgs"
+}
+
 # The good testsuites must not fail
 for d in $TESTSUITE_DIR/good/*; do
-	echo "checking $d..."
-	dd=$(basename $d)
-	cp -aH $d tmp
-	cp -aH $TESTSUITE_DIR/good.pkgs/$dd tmp.pkgs
-	find tmp tmp.pkgs -name ".svn" | xargs rm -rf
-	$CHECK_SCRIPT tmp tmp.pkgs || {
+	tmp=$(prepare_testsuite "$d")
+	if $CHECK_SCRIPT tmp tmp.pkgs > $d.log 2>&1; then
+		echo " OK* $d"
+	else
+		echo "*NO  $d"
 		failures="$failures $d"
-	}
-	rm -rf tmp tmp.pkgs
+	fi
+	clean_testsuite "$tmp"
 done
 
 echo ""
 
 # The bad testsuites must fail
 for d in $TESTSUITE_DIR/bad/*; do
-	echo "checking $d..."
-	dd=$(basename $d)
-	cp -aH $d tmp
-	cp -aH $TESTSUITE_DIR/bad.pkgs/$dd tmp.pkgs
-	find tmp tmp.pkgs -name ".svn" | xargs rm -rf
-	$CHECK_SCRIPT tmp tmp.pkgs && {
+	tmp=$(prepare_testsuite "$d")
+	if $CHECK_SCRIPT tmp tmp.pkgs > $d.log 2>&1; then
+		echo "*NO  $d"
 		failures="$failures $d"
-	}
-	rm -rf tmp tmp.pkgs
+	else
+		echo " OK* $d"
+	fi 
+	clean_testsuite "$tmp"
 done
 
 echo ""




More information about the Debian-l10n-commits mailing list