diff options
author | Russ Allbery <eagle@eyrie.org> | 2018-05-27 20:59:59 -0700 |
---|---|---|
committer | Russ Allbery <eagle@eyrie.org> | 2018-05-27 20:59:59 -0700 |
commit | bdcb3741db27d6b773ce7cdf05aab063a70ea100 (patch) | |
tree | 11e11bb646e0b58db6e23b59e3c856ea59ef3545 /tests/client/prompt-t.in | |
parent | 62a9101895a2d596bf91231f119d338d2025ff08 (diff) |
Update to rra-c-util 7.2 and C TAP Harness 4.3
Update to rra-c-util 7.2:
* Improve configure output for krb5-config testing.
* Define UINT32_MAX for systems that don't have it.
* Add SPDX-License-Identifier headers to all substantial source files.
* Fix new warnings from GCC 7 and Clang warnings.
* Require Test::Strict 0.25 or later to run those tests.
* Fix off-by-one error in return-value checks for snprintf.
* Use Autoconf to probe for supported warning flags.
* Fix running module-version-t -u with current versions of Perl.
* Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD.
Update to C TAP Harness 4.3:
* Add support for valgrind and libtool in test lists.
* Report test failures as left and right, not wanted and expected.
* Fix string comparisons with NULL pointers and the string "(null)".
* Add SPDX-License-Identifier headers to all substantial source files.
* Avoid zero-length realloc allocations in breallocarray.
* Fix new warnings from GCC 7 and Clang warnings.
* Use C_TAP_SOURCE and C_TAP_BUILD instead of SOURCE and BUILD.
Diffstat (limited to 'tests/client/prompt-t.in')
-rw-r--r-- | tests/client/prompt-t.in | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/client/prompt-t.in b/tests/client/prompt-t.in index d3a1eac..d5e9f17 100644 --- a/tests/client/prompt-t.in +++ b/tests/client/prompt-t.in @@ -4,6 +4,7 @@ # Password prompting tests for the wallet client. # # Written by Russ Allbery <eagle@eyrie.org> +# Copyright 2018 Russ Allbery <eagle@eyrie.org> # Copyright 2008, 2010, 2014 # The Board of Trustees of the Leland Stanford Junior University # @@ -14,18 +15,18 @@ use warnings; use Test::More tests => 5; -use lib "$ENV{SOURCE}/../perl/lib"; +use lib "$ENV{C_TAP_SOURCE}/../perl/lib"; use Wallet::Admin; -use lib "$ENV{SOURCE}/../perl/t/lib"; +use lib "$ENV{C_TAP_SOURCE}/../perl/t/lib"; use Util; # cd to the correct directory. -chdir "$ENV{SOURCE}" or die "Cannot chdir to $ENV{SOURCE}: $!\n"; +chdir "$ENV{C_TAP_SOURCE}" or die "Cannot chdir to $ENV{C_TAP_SOURCE}: $!\n"; SKIP: { skip 'no password configuration', 5 - unless -f "$ENV{BUILD}/config/password"; + unless -f "$ENV{C_TAP_BUILD}/config/password"; my $remctld = '@REMCTLD@'; skip 'remctld not found', 5 unless $remctld; eval { require Expect }; @@ -38,21 +39,21 @@ SKIP: { # Spawn remctld and set up with a different ticket cache. unlink ('krb5cc_test', 'test-pid'); - my $principal = contents ("$ENV{BUILD}/config/principal"); - remctld_spawn ($remctld, $principal, "$ENV{BUILD}/config/keytab", - "$ENV{SOURCE}/data/basic.conf"); + my $principal = contents ("$ENV{C_TAP_BUILD}/config/principal"); + remctld_spawn ($remctld, $principal, "$ENV{C_TAP_BUILD}/config/keytab", + "$ENV{C_TAP_SOURCE}/data/basic.conf"); $ENV{KRB5CCNAME} = 'krb5cc_test'; # Read in the principal and password. - open (PASS, '<', "$ENV{BUILD}/config/password") - or die "Cannot open $ENV{BUILD}/config/password: $!\n"; + open (PASS, '<', "$ENV{C_TAP_BUILD}/config/password") + or die "Cannot open $ENV{C_TAP_BUILD}/config/password: $!\n"; my $user = <PASS>; my $password = <PASS>; close PASS; chomp ($user, $password); # Spawn wallet and check an invalid password. - my $wallet = Expect->spawn ("$ENV{BUILD}/../client/wallet", '-k', + my $wallet = Expect->spawn ("$ENV{C_TAP_BUILD}/../client/wallet", '-k', $principal, '-p', 14373, '-s', 'localhost', '-c', 'fake-wallet', '-u', $user, 'get', 'keytab', 'service/fake-output'); @@ -63,7 +64,7 @@ SKIP: { $wallet->soft_close; # Now check a valid password. - $wallet = Expect->spawn ("$ENV{BUILD}/../client/wallet", '-k', + $wallet = Expect->spawn ("$ENV{C_TAP_BUILD}/../client/wallet", '-k', $principal, '-p', 14373, '-s', 'localhost', '-c', 'fake-wallet', '-u', $user, 'get', 'keytab', 'service/fake-output'); |