summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--Makefile.am34
-rw-r--r--configure.ac5
-rw-r--r--tests/client/basic-t.in2
-rw-r--r--tests/client/full-t.in7
-rw-r--r--tests/client/prompt-t.in2
-rw-r--r--tests/data/full.conf3
-rw-r--r--tests/data/full.conf.in3
8 files changed, 27 insertions, 30 deletions
diff --git a/.gitignore b/.gitignore
index b0a49df..3778ee8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,7 +19,6 @@
/tests/client/basic-t
/tests/client/full-t
/tests/client/prompt-t
-/tests/data/full.conf
/tests/data/test.keytab
/tests/data/test.password
/tests/data/test.principal
diff --git a/Makefile.am b/Makefile.am
index 77514a7..d4dc8a5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -23,20 +23,19 @@ PERL_FILES = perl/Wallet/ACL.pm perl/Wallet/ACL/Base.pm \
perl/t/keytab.t perl/t/lib/Util.pm perl/t/object.t perl/t/pod.t \
perl/t/schema.t perl/t/server.t perl/t/verifier-netdb.t \
perl/t/verifier.t
-TEST_FILES = tests/TESTS tests/data/README tests/data/allow-extract \
- tests/data/basic.conf tests/data/cmd-fake tests/data/fake-data \
- tests/data/fake-kadmin tests/data/fake-keytab \
- tests/data/fake-keytab-2 tests/data/fake-keytab-merge \
- tests/data/fake-keytab-old tests/data/fake-srvtab \
- tests/data/wallet.conf tests/libtest.sh
AUTOMAKE_OPTIONS = foreign subdir-objects
ACLOCAL_AMFLAGS = -I m4
-EXTRA_DIST = LICENSE autogen client/wallet.pod config/allow-extract \
- config/keytab config/keytab.acl config/wallet docs/design \
- contrib/README contrib/wallet-report contrib/wallet-report.8 \
- docs/design-acl docs/design-api docs/netdb-role-api docs/notes \
- docs/setup examples/stanford.conf $(PERL_FILES) $(TEST_FILES)
+EXTRA_DIST = LICENSE autogen client/wallet.pod config/allow-extract \
+ config/keytab config/keytab.acl config/wallet docs/design \
+ contrib/README contrib/wallet-report contrib/wallet-report.8 \
+ docs/design-acl docs/design-api docs/netdb-role-api docs/notes \
+ docs/setup examples/stanford.conf tests/TESTS tests/data/README \
+ tests/data/allow-extract tests/data/basic.conf tests/data/cmd-fake \
+ tests/data/cmd-wrapper tests/data/fake-data tests/data/fake-kadmin \
+ tests/data/fake-keytab tests/data/fake-keytab-2 \
+ tests/data/fake-keytab-merge tests/data/fake-keytab-old \
+ tests/data/fake-srvtab tests/data/wallet.conf $(PERL_FILES)
noinst_LIBRARIES = portable/libportable.a util/libutil.a
portable_libportable_a_SOURCES = portable/dummy.c portable/krb5-extra.c \
@@ -89,8 +88,8 @@ all-local: perl/blib/lib/Wallet/Config.pm
perl/blib/lib/Wallet/Config.pm:
set -e; if [ x"$(builddir)" != x"$(srcdir)" ] ; then \
mkdir perl/Wallet perl/Wallet/ACL perl/Wallet/ACL/NetDB \
- perl/Wallet/Object perl/t perl/t/data perl/t/lib \
- 2>/dev/null || true ; \
+ perl/Wallet/Kadmin perl/Wallet/Object perl/t perl/t/data \
+ perl/t/lib 2>/dev/null || true ; \
for f in $(PERL_FILES) ; do \
cp "$(srcdir)/$$f" "$(builddir)/$$f" ; \
done \
@@ -160,14 +159,7 @@ tests_util_messages_t_LDADD = tests/tap/libtap.a util/libutil.a \
tests_util_xmalloc_LDADD = util/libutil.a portable/libportable.a
check-local: $(check_PROGRAMS)
- set -e; if [ x"$(builddir)" != x"$(srcdir)" ] ; then \
- mkdir tests/data/acls 2>/dev/null || true ; \
- for f in $(TEST_FILES) ; do \
- cp "$(srcdir)/$$f" "$(builddir)/$$f" ; \
- done \
- fi
- cd tests && ./runtests TESTS
- @echo ''
+ cd tests && ./runtests $(abs_top_srcdir)/tests/TESTS
@echo ''
cd perl && $(MAKE) test
diff --git a/configure.ac b/configure.ac
index 664c6f7..78201c1 100644
--- a/configure.ac
+++ b/configure.ac
@@ -60,8 +60,11 @@ AS_IF([test x"$REMCTLD" != x],
[AC_DEFINE_UNQUOTED([PATH_REMCTLD], ["$REMCTLD"],
[Define to the full path to remctld to run remctl tests.])])
+dnl Create the tests/data directory for builds outside the source directory.
+AC_CONFIG_COMMANDS([tests/data/.placeholder], [touch tests/data/.placeholder])
+
AC_CONFIG_HEADER([config.h])
-AC_CONFIG_FILES([Makefile perl/Makefile.PL tests/data/full.conf])
+AC_CONFIG_FILES([Makefile perl/Makefile.PL])
AC_CONFIG_FILES([tests/client/basic-t], [chmod +x tests/client/basic-t])
AC_CONFIG_FILES([tests/client/full-t], [chmod +x tests/client/full-t])
AC_CONFIG_FILES([tests/client/prompt-t], [chmod +x tests/client/prompt-t])
diff --git a/tests/client/basic-t.in b/tests/client/basic-t.in
index 1dbc0b9..30bc004 100644
--- a/tests/client/basic-t.in
+++ b/tests/client/basic-t.in
@@ -12,7 +12,7 @@
. "$SOURCE/tap/libtap.sh"
. "$SOURCE/tap/kerberos.sh"
. "$SOURCE/tap/remctl.sh"
-cd "$BUILD"
+cd "$SOURCE"
# We need a modified krb5.conf file to test wallet configuration settings in
# krb5.conf. Despite the hard-coding of test-k5.stanford.edu, this test isn't
diff --git a/tests/client/full-t.in b/tests/client/full-t.in
index a4ca19d..8acc360 100644
--- a/tests/client/full-t.in
+++ b/tests/client/full-t.in
@@ -51,6 +51,9 @@ sub wallet {
return ($output, $error, $status);
}
+# cd to the correct directory.
+chdir "$ENV{SOURCE}" or die "Cannot chdir to $ENV{SOURCE}: $!\n";
+
SKIP: {
skip 'no keytab configuration', $total
unless -f "$ENV{BUILD}/data/test.keytab";
@@ -62,8 +65,8 @@ SKIP: {
unlink ('krb5cc_test', 'test-pid');
my $principal = contents ("$ENV{BUILD}/data/test.principal");
remctld_spawn ($remctld, $principal,
- '@abs_top_builddir@/tests/data/test.keytab',
- '@abs_top_builddir@/tests/data/full.conf');
+ "$ENV{BUILD}/data/test.keytab",
+ "$ENV{SOURCE}/data/full.conf");
$ENV{KRB5CCNAME} = 'krb5cc_test';
getcreds ("$ENV{BUILD}/data/test.keytab", $principal);
diff --git a/tests/client/prompt-t.in b/tests/client/prompt-t.in
index e037b3f..1d8b079 100644
--- a/tests/client/prompt-t.in
+++ b/tests/client/prompt-t.in
@@ -36,7 +36,7 @@ SKIP: {
unlink ('krb5cc_test', 'test-pid');
my $principal = contents ("$ENV{BUILD}/data/test.principal");
remctld_spawn ($remctld, $principal, "$ENV{BUILD}/data/test.keytab",
- "$ENV{BUILD}/data/basic.conf");
+ "$ENV{SOURCE}/data/basic.conf");
$ENV{KRB5CCNAME} = 'krb5cc_test';
# Read in the principal and password.
diff --git a/tests/data/full.conf b/tests/data/full.conf
new file mode 100644
index 0000000..4c0f435
--- /dev/null
+++ b/tests/data/full.conf
@@ -0,0 +1,3 @@
+# remctl configuration for full wallet client tests.
+
+wallet ALL data/cmd-wrapper ANYUSER
diff --git a/tests/data/full.conf.in b/tests/data/full.conf.in
deleted file mode 100644
index 25aef9e..0000000
--- a/tests/data/full.conf.in
+++ /dev/null
@@ -1,3 +0,0 @@
-# remctl configuration for full wallet client tests.
-
-wallet ALL @abs_top_builddir@/tests/data/cmd-wrapper ANYUSER