diff options
author | Ezra Peisach <epeisach@mit.edu> | 2009-12-08 03:24:23 +0000 |
---|---|---|
committer | Ezra Peisach <epeisach@mit.edu> | 2009-12-08 03:24:23 +0000 |
commit | e8fb3e469ce9f7b7ecf0d49e24cfcfac2fb95f1e (patch) | |
tree | 526aaa21ded69e6a1b9523ed0955c82956322939 /src/plugins/kdb/db2 | |
parent | 25e068f5d5dd4df02c18c09104a2ec71c7556882 (diff) | |
download | krb5-e8fb3e469ce9f7b7ecf0d49e24cfcfac2fb95f1e.tar.gz krb5-e8fb3e469ce9f7b7ecf0d49e24cfcfac2fb95f1e.tar.xz krb5-e8fb3e469ce9f7b7ecf0d49e24cfcfac2fb95f1e.zip |
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.
ticket: 6593
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23458 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/plugins/kdb/db2')
-rw-r--r-- | src/plugins/kdb/db2/libdb2/test/run.test | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/src/plugins/kdb/db2/libdb2/test/run.test b/src/plugins/kdb/db2/libdb2/test/run.test index d029862d1e..d2d54e94bc 100644 --- a/src/plugins/kdb/db2/libdb2/test/run.test +++ b/src/plugins/kdb/db2/libdb2/test/run.test @@ -409,13 +409,25 @@ test8() { 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 |