include @TOP_OBJDIR@/src/config/Makefile.config
include @TOP_OBJDIR@/src/config/Makefile.pthread
-MODULE_CFLAGS = -DSOURCE='"$(abs_top_srcdir)/tests"' \
- -DBUILD='"$(abs_top_builddir)/tests"'
+MODULE_CFLAGS = -DC_TAP_SOURCE='"$(abs_top_srcdir)/tests"' \
+ -DC_TAP_BUILD='"$(abs_top_builddir)/tests"'
SUBDIRS = tap common auth util cmd volser opr rx
check test tests: runtests
@for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done
MAKECHECK=1 $(abs_top_srcdir)/tests/libwrap @TOP_OBJDIR@/lib \
- ./runtests $(abs_top_srcdir)/tests/TESTS
+ ./runtests -v -l $(abs_top_srcdir)/tests/TESTS
install:
goto out;
/* Work out the path to our KeyFile. If the test harness hasn't set
- * the SOURCE environment variable, then assume it is in our CWD */
- if (getenv("SOURCE") == NULL) {
+ * the C_TAP_SOURCE environment variable, then assume it is in our CWD */
+ if (getenv("C_TAP_SOURCE") == NULL) {
keyfilesrc = strdup("KeyFile");
} else {
- if (asprintf(&keyfilesrc, "%s/auth/KeyFile", getenv("SOURCE")) == -1)
+ if (asprintf(&keyfilesrc, "%s/auth/KeyFile", getenv("C_TAP_SOURCE")) == -1)
goto out;
}
plan tests => 1;
my $cmd;
-if (defined($ENV{BUILD})) {
- $cmd = $ENV{BUILD} . "/auth/writekeyfile";
+if (defined($ENV{C_TAP_BUILD})) {
+ $cmd = $ENV{C_TAP_BUILD} . "/auth/writekeyfile";
} else {
$cmd = $Bin . "/writekeyfile";
}
$cmd = abs_path($cmd);
my $keyfile;
-if (defined($ENV{SOURCE})) {
- $keyfile = $ENV{SOURCE} . "/auth/KeyFile.short";
+if (defined($ENV{C_TAP_SOURCE})) {
+ $keyfile = $ENV{C_TAP_SOURCE} . "/auth/KeyFile.short";
} else {
$keyfile = $Bin . "/KeyFile.short";
}
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/bozo", "bos");
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/bucoord", "backup");
cmd_FreeArgv(tv);
/* Now, try adding a configuration file into the mix */
- if (getenv("SOURCE") == NULL)
+ if (getenv("C_TAP_SOURCE") == NULL)
path = strdup("test1.conf");
else {
- if (asprintf(&path, "%s/cmd/test1.conf", getenv("SOURCE")) < 0)
+ if (asprintf(&path, "%s/cmd/test1.conf", getenv("C_TAP_SOURCE")) < 0)
path = NULL;
}
if (path != NULL) {
char *binPath, *logPath, *dbPath, *build;
/* Child */
- build = getenv("BUILD");
+ build = getenv("C_TAP_BUILD");
if (build == NULL)
build = "..";
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/kauth", "kas");
my $softsig_helper;
# Our softsig helper should be in $TOP_OBJDIR/tests/opr. To calculate that
-# path, use the BUILD env var if the test harness has set it; otherwise, our
-# next best guess is that it's in the same dir as this script.
-if (defined($ENV{BUILD})) {
- $softsig_helper = $ENV{BUILD} . "/opr/softsig-helper";
+# path, use the C_TAP_BUILD env var if the test harness has set it; otherwise,
+# our next best guess is that it's in the same dir as this script.
+if (defined($ENV{C_TAP_BUILD})) {
+ $softsig_helper = $ENV{C_TAP_BUILD} . "/opr/softsig-helper";
} else {
$softsig_helper = $Bin . "/softsig-helper";
}
use File::Basename;
use Test::More tests=>2;
-my $builddir = $ENV{BUILD};
+my $builddir = $ENV{C_TAP_BUILD};
if (!$builddir) {
$builddir = dirname($0)."/..";
}
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/ptserver", "pts");
use POSIX qw(:sys_wait_h :signal_h);
my $port = 4000;
-my $build = $ENV{BUILD};
+my $build = $ENV{C_TAP_BUILD};
$build = ".." if (!defined($build));
my $rxperf = $build."/../src/tools/rxperf/rxperf";
sub run_manpage_tests($$) {
my ($subdir, $command) = @_;
- # When run from 'runtests', our cwd will be TOP_OBJDIR/tests. $SOURCE is
- # set to TOP_SRCDIR/tests, and $BUILD is set to TOP_OBJDIR/tests. We want
- # the top-level src and obj dirs, in order to find the relevant binaries
- # and manpages.
- my $srcdir = $ENV{SOURCE} . "/..";
- my $objdir = $ENV{BUILD} . "/..";
+ # When run from 'runtests', our cwd will be TOP_OBJDIR/tests. $C_TAP_SOURCE
+ # is set to TOP_SRCDIR/tests, and $C_TAP_BUILD is set to TOP_OBJDIR/tests.
+ # We want the top-level src and obj dirs, in order to find the relevant
+ # binaries and manpages.
+ my $srcdir = $ENV{C_TAP_SOURCE} . "/..";
+ my $objdir = $ENV{C_TAP_BUILD} . "/..";
my @sub_commands = lookup_sub_commands("$objdir/$subdir", $command);
die("No subcommands found in $objdir/$subdir/$command?") unless(@sub_commands);
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/venus", "fs");
use strict;
use warnings;
-use lib $ENV{SOURCE} . "/tests-lib/perl5";
+use lib $ENV{C_TAP_SOURCE} . "/tests-lib/perl5";
use mancheck_utils;
run_manpage_tests("src/volser", "vos");
close(outpipe[0]);
close(outpipe[1]);
- build = getenv("BUILD");
+ build = getenv("C_TAP_BUILD");
if (build == NULL)
build = "..";