diff --git a/tests/Makefile.in b/tests/Makefile.in index 23f1fa096a..7859028f32 100644 --- a/tests/Makefile.in +++ b/tests/Makefile.in @@ -22,7 +22,7 @@ runtests.o: $(srcdir)/runtests.c check test tests: runtests @for A in $(SUBDIRS); do cd $$A && $(MAKE) $@ && cd .. || exit 1; done - MAKECHECK=1 ./libwrap @TOP_OBJDIR@/lib \ + MAKECHECK=1 $(abs_top_srcdir)/tests/libwrap @TOP_OBJDIR@/lib \ ./runtests $(abs_top_srcdir)/tests/TESTS install: diff --git a/tests/auth/Makefile.in b/tests/auth/Makefile.in index ed4ed27ae7..78bc0c803d 100644 --- a/tests/auth/Makefile.in +++ b/tests/auth/Makefile.in @@ -6,7 +6,7 @@ include @TOP_OBJDIR@/src/config/Makefile.pthread TESTS = authcon-t superuser-t keys-t realms-t -MODULE_CFLAGS=-I$(srcdir)/../.. -I$(srcdir)/../common/ +MODULE_CFLAGS=-I$(TOP_OBJDIR) -I$(srcdir)/../common/ all check test tests: $(TESTS) diff --git a/tests/cmd/Makefile.in b/tests/cmd/Makefile.in index 57dfe8fe2c..9c042ffeb0 100644 --- a/tests/cmd/Makefile.in +++ b/tests/cmd/Makefile.in @@ -5,7 +5,7 @@ abs_top_builddir=@abs_top_builddir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.pthread -MODULE_CFLAGS = -I$(srcdir)/../.. +MODULE_CFLAGS = -I$(TOP_OBJDIR) LIBS = ../tap/libtap.a \ $(abs_top_builddir)/src/cmd/liboafs_cmd.la \ diff --git a/tests/common/Makefile.in b/tests/common/Makefile.in index f71d9d37f9..3bc6096972 100644 --- a/tests/common/Makefile.in +++ b/tests/common/Makefile.in @@ -4,7 +4,7 @@ abs_top_builddir=@abs_top_builddir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.pthread -MODULE_CFLAGS=-I$(srcdir)/.. -I$(srcdir)/../.. +MODULE_CFLAGS=-I$(TOP_OBJDIR) all check test tests: config.o servers.o ubik.o rxkad.o network.o diff --git a/tests/opr/Makefile.in b/tests/opr/Makefile.in index 96601775a9..d9a37f63df 100644 --- a/tests/opr/Makefile.in +++ b/tests/opr/Makefile.in @@ -3,7 +3,7 @@ abs_top_builddir=@abs_top_builddir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.pthread -MODULE_CFLAGS = -I$(srcdir)/../.. +MODULE_CFLAGS = -I$(TOP_OBJDIR) LIBS=../tap/libtap.a $(abs_top_builddir)/src/opr/liboafs_opr.la diff --git a/tests/opr/softsig-t b/tests/opr/softsig-t index 533feb4fd3..09f4e50595 100755 --- a/tests/opr/softsig-t +++ b/tests/opr/softsig-t @@ -32,7 +32,17 @@ use FindBin qw($Bin); # Start up our test process, and send it various signals. Check that these # signals make it to it correctly, and are reported on the command line. -my $softsig_helper = $Bin . "/softsig-helper"; + +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"; +} else { + $softsig_helper = $Bin . "/softsig-helper"; +} # This -dummy argument prevents Perl from putting an intermediate sh # -c between us and softsig-helper in the case where the build diff --git a/tests/rx/Makefile.in b/tests/rx/Makefile.in index f5b4cf9244..373aac6efa 100644 --- a/tests/rx/Makefile.in +++ b/tests/rx/Makefile.in @@ -5,7 +5,7 @@ abs_top_builddir=@abs_top_builddir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.pthread -MODULE_CFLAGS = -I$(srcdir)/../.. +MODULE_CFLAGS = -I$(TOP_OBJDIR) LIBS = ../tap/libtap.a \ $(abs_top_builddir)/src/rx/liboafs_rx.la diff --git a/tests/util/Makefile.in b/tests/util/Makefile.in index 08e8fda206..28debc01d7 100644 --- a/tests/util/Makefile.in +++ b/tests/util/Makefile.in @@ -5,7 +5,7 @@ abs_top_builddir=@abs_top_builddir@ include @TOP_OBJDIR@/src/config/Makefile.config include @TOP_OBJDIR@/src/config/Makefile.lwp -MODULE_CFLAGS = -I$(srcdir)/../.. +MODULE_CFLAGS = -I$(TOP_OBJDIR) LIBS = ../tap/libtap.a \ $(abs_top_builddir)/lib/util.a \ diff --git a/tests/volser/Makefile.in b/tests/volser/Makefile.in index 6ba9d46d6a..57ddd0b533 100644 --- a/tests/volser/Makefile.in +++ b/tests/volser/Makefile.in @@ -6,7 +6,7 @@ include @TOP_OBJDIR@/src/config/Makefile.pthread TESTS = vos-t -MODULE_CFLAGS=-I$(srcdir)/../.. -I$(srcdir)/../common/ +MODULE_CFLAGS=-I$(TOP_OBJDIR) -I$(srcdir)/../common/ all check test tests: $(TESTS)