nss-pam-ldapd commit: r1424 - nss-pam-ldapd/tests
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r1424 - nss-pam-ldapd/tests
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r1424 - nss-pam-ldapd/tests
- Date: Fri, 15 Apr 2011 21:10:59 +0200 (CEST)
Author: arthur
Date: Fri Apr 15 21:10:57 2011
New Revision: 1424
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1424
Log:
allow running test_{nss,pam}cmds tests from another directory
Modified:
nss-pam-ldapd/tests/test_nsscmds.sh
nss-pam-ldapd/tests/test_pamcmds.expect
nss-pam-ldapd/tests/test_pamcmds.sh
Modified: nss-pam-ldapd/tests/test_nsscmds.sh
==============================================================================
--- nss-pam-ldapd/tests/test_nsscmds.sh Sun Apr 3 23:10:09 2011 (r1423)
+++ nss-pam-ldapd/tests/test_nsscmds.sh Fri Apr 15 21:10:57 2011 (r1424)
@@ -27,7 +27,7 @@
set -e
# find source directory
-srcdir="${srcdir-"."}"
+srcdir="${srcdir-`dirname "$0"`}"
# ensure that we are running in the test environment
. "$srcdir/in_testenv.sh"
Modified: nss-pam-ldapd/tests/test_pamcmds.expect
==============================================================================
--- nss-pam-ldapd/tests/test_pamcmds.expect Sun Apr 3 23:10:09 2011
(r1423)
+++ nss-pam-ldapd/tests/test_pamcmds.expect Fri Apr 15 21:10:57 2011
(r1424)
@@ -48,13 +48,17 @@
#close
}
+# find source directory
+if { ! [info exists ::env(srcdir) ] } {
+ set env(srcdir) "."
+}
# ensure that we are running as root
if { [exec id -u] != "0" } {
send_user "test_pamcmds.expect: not running as root\n"
exit 77
}
# ensure that we are running in the test environment
-spawn ./in_testenv.sh
+spawn $env(srcdir)/in_testenv.sh
expect {
"in_testenv.sh: using LDAP server" { expect eof }
eof {
Modified: nss-pam-ldapd/tests/test_pamcmds.sh
==============================================================================
--- nss-pam-ldapd/tests/test_pamcmds.sh Sun Apr 3 23:10:09 2011 (r1423)
+++ nss-pam-ldapd/tests/test_pamcmds.sh Fri Apr 15 21:10:57 2011 (r1424)
@@ -22,7 +22,7 @@
set -e
# find source directory
-srcdir="${srcdir-"."}"
+srcdir="${srcdir-`dirname "$0"`}"
# ensure that we are running in the test environment
. "$srcdir/in_testenv.sh"
@@ -35,4 +35,5 @@
exit 77
fi
-"$EXPECT" ./test_pamcmds.expect
+export srcdir
+"$EXPECT" "$srcdir/test_pamcmds.expect"
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits
- nss-pam-ldapd commit: r1424 - nss-pam-ldapd/tests,
Commits of the nss-pam-ldapd project