Skip to content

Commit

Permalink
o Teach tests to install in $(libdir)/ocfs2-test/<subpath>
Browse files Browse the repository at this point in the history
Original-revision: 15
  • Loading branch information
Joel Becker committed Aug 25, 2008
1 parent 6109ca2 commit e8b020a
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 13 deletions.
3 changes: 3 additions & 0 deletions Config.make.in
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,9 @@ mandir = @mandir@

pyexecdir = @pyexecdir@


TESTDIR = $(libdir)/ocfs2-test

top_builddir = .

INSTALL = @INSTALL@
Expand Down
9 changes: 7 additions & 2 deletions Test.make
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,16 @@ UNINST_PROGRAMS = $(TESTS)

INSTALL_RULES = install-tests

TEST_PWD = `pwd`
TOPDIR_PWD = `cd $(TOPDIR) && pwd`

install-tests: $(TESTS)
ifdef TESTS
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(libdir)/ocfs2-tests
TEST_LOC="$(TEST_PWD)" ; \
TEST_LOC="$${TEST_LOC#$(TOPDIR_PWD)/}" ; \
$(SHELL) $(TOPDIR)/mkinstalldirs $(DESTDIR)$(TESTDIR)/$$TEST_LOC; \
for prog in $(TESTS); do \
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(libdir)/ocfs2-tests/$$prog; \
$(INSTALL_PROGRAM) $$prog $(DESTDIR)$(TESTDIR)/$$TEST_LOC/$$prog ; \
done
endif

Expand Down
2 changes: 1 addition & 1 deletion configure.in
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
AC_PREREQ(2.54)

AC_INIT(tests)
AC_INIT(programs)

PACKAGE=ocfs2-test

Expand Down
2 changes: 1 addition & 1 deletion programs/extend_and_write/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = extend_and_write verify

Expand All @@ -21,4 +20,5 @@ extend_and_write: $(EXTEND_AND_WRITE_OBJECTS)
verify: $(VERIFY_OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/extendo/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = extendo

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
extendo: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/lock_grab/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = lock_grab

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
lock_grab: $(OBJECTS)
$(LINK) $(O2DLM_LIBS)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/logwriter/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = logwriter

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
logwriter: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/lvb_torture/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = lvb_torture

Expand All @@ -17,4 +16,5 @@ DIST_FILES = $(SOURCES)
lvb_torture: $(OBJECTS)
$(LINK) $(O2DLM_LIBS)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/mmap_test/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = mmap_test

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
mmap_test: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/multi_node_mmap/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = dommap

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
dommap: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/ttest/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = ttest

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
ttest: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/write_append_truncate/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = write_append_truncate

Expand All @@ -17,4 +16,5 @@ DIST_FILES = $(SOURCES)
write_append_truncate: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make
2 changes: 1 addition & 1 deletion programs/write_torture/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
TOPDIR = ../..

include $(TOPDIR)/Preamble.make
include $(TOPDIR)/Test.make

TESTS = write_torture

Expand All @@ -15,4 +14,5 @@ DIST_FILES = $(SOURCES)
write_torture: $(OBJECTS)
$(LINK)

include $(TOPDIR)/Test.make
include $(TOPDIR)/Postamble.make

0 comments on commit e8b020a

Please sign in to comment.