aboutsummaryrefslogtreecommitdiff
path: root/tests/client
diff options
context:
space:
mode:
Diffstat (limited to 'tests/client')
-rw-r--r--tests/client/full-t.in20
-rw-r--r--tests/client/pod-t.in4
-rw-r--r--tests/client/prompt-t.in28
3 files changed, 25 insertions, 27 deletions
diff --git a/tests/client/full-t.in b/tests/client/full-t.in
index 3240563..a4ca19d 100644
--- a/tests/client/full-t.in
+++ b/tests/client/full-t.in
@@ -1,23 +1,23 @@
#!/usr/bin/perl -w
#
-# tests/client/full-t -- End-to-end tests for the wallet client.
+# End-to-end tests for the wallet client.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2008, 2010 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
# Point to our server configuration. This must be done before Wallet::Config
# is loaded, and it's pulled in as a prerequisite for Wallet::Admin.
-BEGIN { $ENV{WALLET_CONFIG} = '@abs_top_srcdir@/tests/data/wallet.conf' }
+BEGIN { $ENV{WALLET_CONFIG} = "$ENV{SOURCE}/data/wallet.conf" }
BEGIN { our $total = 53 }
use Test::More tests => $total;
-use lib '@abs_top_srcdir@/perl';
+use lib "$ENV{SOURCE}/../perl";
use Wallet::Admin;
-use lib '@abs_top_srcdir@/perl/t/lib';
+use lib "$ENV{SOURCE}/../perl/t/lib";
use Util;
# Make a call to the wallet client. Takes the principal used by the server
@@ -33,9 +33,9 @@ sub wallet {
or die "cannot create wallet.out: $!\n";
open (STDERR, '>', 'wallet.err')
or die "cannot create wallet.err: $!\n";
- exec ('@abs_top_builddir@/client/wallet', '-k', $principal, '-p',
+ exec ("$ENV{BUILD}/../client/wallet", '-k', $principal, '-p',
'14373', '-s', 'localhost', @command)
- or die "cannot run @abs_top_builddir@/client/wallet: $!\n";
+ or die "cannot run $ENV{BUILD}/client/wallet: $!\n";
} else {
waitpid ($pid, 0);
}
@@ -53,19 +53,19 @@ sub wallet {
SKIP: {
skip 'no keytab configuration', $total
- unless -f '@abs_top_builddir@/tests/data/test.keytab';
+ unless -f "$ENV{BUILD}/data/test.keytab";
my $remctld = '@REMCTLD@';
skip 'remctld not found', $total unless $remctld;
# Spawn remctld and get local tickets. Don't destroy the user's Kerberos
# ticket cache.
unlink ('krb5cc_test', 'test-pid');
- my $principal = contents ('@abs_top_builddir@/tests/data/test.principal');
+ 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{KRB5CCNAME} = 'krb5cc_test';
- getcreds ('@abs_top_builddir@/tests/data/test.keytab', $principal);
+ getcreds ("$ENV{BUILD}/data/test.keytab", $principal);
# Use Wallet::Admin to set up the database.
db_setup;
diff --git a/tests/client/pod-t.in b/tests/client/pod-t.in
index db995f7..9963567 100644
--- a/tests/client/pod-t.in
+++ b/tests/client/pod-t.in
@@ -3,7 +3,7 @@
# Test POD formatting for client documentation.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2008, 2010 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
@@ -17,6 +17,6 @@ eval 'use Test::Pod 1.00';
SKIP: {
skip $total, 'Test::Pod 1.00 required for testing POD' if $@;
for my $file (@files) {
- pod_file_ok ("@abs_top_srcdir@/client/$file", "client/$file");
+ pod_file_ok ("$ENV{SOURCE}/../client/$file", "client/$file");
}
}
diff --git a/tests/client/prompt-t.in b/tests/client/prompt-t.in
index 7988fc9..e037b3f 100644
--- a/tests/client/prompt-t.in
+++ b/tests/client/prompt-t.in
@@ -1,28 +1,27 @@
#!/usr/bin/perl -w
#
-# tests/client/prompt-t -- Password prompting tests for the wallet client.
+# Password prompting tests for the wallet client.
#
# Written by Russ Allbery <rra@stanford.edu>
-# Copyright 2008 Board of Trustees, Leland Stanford Jr. University
+# Copyright 2008, 2010 Board of Trustees, Leland Stanford Jr. University
#
# See LICENSE for licensing terms.
BEGIN { our $total = 5 }
use Test::More tests => $total;
-use lib '@abs_top_srcdir@/perl';
+use lib "$ENV{SOURCE}/..//perl";
use Wallet::Admin;
-use lib '@abs_top_srcdir@/perl/t/lib';
+use lib "$ENV{SOURCE}/../perl/t/lib";
use Util;
# cd to the correct directory.
-chdir '@abs_top_srcdir@/tests'
- or die "Cannot chdir to @abs_top_srcdir@/tests: $!\n";
+chdir "$ENV{SOURCE}" or die "Cannot chdir to $ENV{SOURCE}: $!\n";
SKIP: {
skip 'no password configuration', $total
- unless -f '@abs_top_builddir@/tests/data/test.password';
+ unless -f "$ENV{BUILD}/data/test.password";
my $remctld = '@REMCTLD@';
skip 'remctld not found', $total unless $remctld;
eval { require Expect };
@@ -35,22 +34,21 @@ SKIP: {
# Spawn remctld and set up with a different ticket cache.
unlink ('krb5cc_test', 'test-pid');
- my $principal = contents ('@abs_top_builddir@/tests/data/test.principal');
- remctld_spawn ($remctld, $principal,
- '@abs_top_builddir@/tests/data/test.keytab',
- '@abs_top_builddir@/tests/data/basic.conf');
+ my $principal = contents ("$ENV{BUILD}/data/test.principal");
+ remctld_spawn ($remctld, $principal, "$ENV{BUILD}/data/test.keytab",
+ "$ENV{BUILD}/data/basic.conf");
$ENV{KRB5CCNAME} = 'krb5cc_test';
# Read in the principal and password.
- open (PASS, '<', '@abs_top_builddir@/tests/data/test.password')
- or die "Cannot open @abs_top_builddir@/tests/data/test.password: $!\n";
+ open (PASS, '<', "$ENV{BUILD}/data/test.password")
+ or die "Cannot open $ENV{BUILD}/data/test.password: $!\n";
my $user = <PASS>;
my $password = <PASS>;
close PASS;
chomp ($user, $password);
# Spawn wallet and check an invalid password.
- my $wallet = Expect->spawn ('@abs_top_builddir@/client/wallet', '-k',
+ my $wallet = Expect->spawn ("$ENV{BUILD}/../client/wallet", '-k',
$principal, '-p', 14373, '-s', 'localhost',
'-c', 'fake-wallet', '-u', $user, 'get',
'keytab', 'service/fake-output');
@@ -61,7 +59,7 @@ SKIP: {
$wallet->soft_close;
# Now check a valid password.
- $wallet = Expect->spawn ('@abs_top_builddir@/client/wallet', '-k',
+ $wallet = Expect->spawn ("$ENV{BUILD}/../client/wallet", '-k',
$principal, '-p', 14373, '-s', 'localhost',
'-c', 'fake-wallet', '-u', $user, 'get',
'keytab', 'service/fake-output');