svn rev #23458: trunk/src/plugins/kdb/db2/libdb2/test/

epeisach@MIT.EDU epeisach at MIT.EDU
Mon Dec 7 22:24:23 EST 2009


http://src.mit.edu/fisheye/changelog/krb5/?cs=23458
Commit By: epeisach
Log Message:
ticket: 6593
subject: Remove dependency on /bin/csh in test suite

The libdb2 test suite would fail if /bin/csh was not present.  The
tests did not execute /bin/csh - but used the contents as data to put
into the test database.  Iterate over a few "known" files until one is found
that could be used for it... Tests for /bin/csh, /bin/cat, /usr/bin/cat, 
/bin/ls, /usr/bin/ls.  If none of these exist - then fail.




Changed Files:
U   trunk/src/plugins/kdb/db2/libdb2/test/run.test
Modified: trunk/src/plugins/kdb/db2/libdb2/test/run.test
===================================================================
--- trunk/src/plugins/kdb/db2/libdb2/test/run.test	2009-12-08 00:04:48 UTC (rev 23457)
+++ trunk/src/plugins/kdb/db2/libdb2/test/run.test	2009-12-08 03:24:23 UTC (rev 23458)
@@ -409,13 +409,25 @@
 {
 	echo "Test 8: btree: repeated small key, big data pairs"
 	rm -f $TMP1
+	# /bin/csh is no longer ubiquitous - find a substitute
+	# The test stores contents of a known file
+	tfile=""
+	for tp in /bin/csh /bin/ls /usr/bin/ls /bin/cat /usr/bin/cat; do
+	    if [ "x$tfile" = "x" -a -f $tp ]; then
+		tfile=$tp
+	    fi
+	done
+	if [ "x$tfile" = "x" ]; then
+	    echo "No suitable file for testing purposes"
+	    exit 1
+	fi
 	echo "" | 
 	awk 'BEGIN {
 		for (i = 1; i <= 10; ++i) {
 			printf("p\nkkey1\nD/bin/sh\n");
-			printf("p\nkkey2\nD/bin/csh\n");
+			printf("p\nkkey2\nD'$tfile'\n");
 			if (i % 8 == 0) {
-				printf("c\nkkey2\nD/bin/csh\n");
+				printf("c\nkkey2\nD'$tfile'\n");
 				printf("c\nkkey1\nD/bin/sh\n");
 				printf("e\t%d of 10 (comparison)\n", i);
 			} else




More information about the cvs-krb5 mailing list