From 0f81ba24e021a63d42c51ee9bec6e521fc540251 Mon Sep 17 00:00:00 2001 From: Russ Allbery Date: Tue, 9 Feb 2010 22:13:53 -0800 Subject: Fix multiple builddir != srcdir issues with test suite Simplify the build rules for the test suite to take advantage of the improved runtests support for builddir != srcdir. Stop doing Autoconf substitution on full.conf now that we have that support. --- tests/client/basic-t.in | 2 +- tests/client/full-t.in | 7 +++++-- tests/client/prompt-t.in | 2 +- 3 files changed, 7 insertions(+), 4 deletions(-) (limited to 'tests/client') 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. -- cgit v1.2.3