-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
selftests: Add install support for the powerpc tests
The bulk of the selftests are actually below the powerpc sub directory. This adds support for installing them, when on a powerpc machine, or if ARCH and CROSS_COMPILE are set appropriately. This is a little more complicated because of the sub directory structure under powerpc, but much of the common logic in lib.mk is still used. The net effect of the patch is still a reduction in code. Signed-off-by: Michael Ellerman <mpe@ellerman.id.au> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
- Loading branch information
Michael Ellerman
authored and
Shuah Khan
committed
Mar 19, 2015
1 parent
5744de5
commit 6faeeea
Showing
8 changed files
with
73 additions
and
82 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,16 @@ | ||
noarg: | ||
$(MAKE) -C ../ | ||
|
||
PROGS := hugetlb_vs_thp_test subpage_prot | ||
TEST_PROGS := hugetlb_vs_thp_test subpage_prot | ||
|
||
all: $(PROGS) tempfile | ||
all: $(TEST_PROGS) tempfile | ||
|
||
$(PROGS): ../harness.c | ||
$(TEST_PROGS): ../harness.c | ||
|
||
run_tests: all | ||
@-for PROG in $(PROGS); do \ | ||
./$$PROG; \ | ||
done; | ||
include ../../lib.mk | ||
|
||
tempfile: | ||
dd if=/dev/zero of=tempfile bs=64k count=1 | ||
|
||
clean: | ||
rm -f $(PROGS) tempfile | ||
|
||
.PHONY: all run_tests clean | ||
rm -f $(TEST_PROGS) tempfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,42 @@ | ||
noarg: | ||
$(MAKE) -C ../ | ||
|
||
PROGS := count_instructions l3_bank_test per_event_excludes | ||
TEST_PROGS := count_instructions l3_bank_test per_event_excludes | ||
EXTRA_SOURCES := ../harness.c event.c lib.c | ||
|
||
SUB_TARGETS = ebb | ||
all: $(TEST_PROGS) ebb | ||
|
||
all: $(PROGS) $(SUB_TARGETS) | ||
|
||
$(PROGS): $(EXTRA_SOURCES) | ||
$(TEST_PROGS): $(EXTRA_SOURCES) | ||
|
||
# loop.S can only be built 64-bit | ||
count_instructions: loop.S count_instructions.c $(EXTRA_SOURCES) | ||
$(CC) $(CFLAGS) -m64 -o $@ $^ | ||
|
||
run_tests: all sub_run_tests | ||
@-for PROG in $(PROGS); do \ | ||
./$$PROG; \ | ||
done; | ||
include ../../lib.mk | ||
|
||
clean: sub_clean | ||
rm -f $(PROGS) loop.o | ||
DEFAULT_RUN_TESTS := $(RUN_TESTS) | ||
override define RUN_TESTS | ||
$(DEFAULT_RUN_TESTS) | ||
$(MAKE) -C ebb run_tests | ||
endef | ||
|
||
$(SUB_TARGETS): | ||
$(MAKE) -k -C $@ all | ||
DEFAULT_EMIT_TESTS := $(EMIT_TESTS) | ||
override define EMIT_TESTS | ||
$(DEFAULT_EMIT_TESTS) | ||
$(MAKE) -s -C ebb emit_tests | ||
endef | ||
|
||
sub_run_tests: all | ||
@for TARGET in $(SUB_TARGETS); do \ | ||
$(MAKE) -C $$TARGET run_tests; \ | ||
done; | ||
DEFAULT_INSTALL := $(INSTALL_RULE) | ||
override define INSTALL_RULE | ||
$(DEFAULT_INSTALL_RULE) | ||
$(MAKE) -C ebb install | ||
endef | ||
|
||
sub_clean: | ||
@for TARGET in $(SUB_TARGETS); do \ | ||
$(MAKE) -C $$TARGET clean; \ | ||
done; | ||
clean: | ||
rm -f $(TEST_PROGS) loop.o | ||
$(MAKE) -C ebb clean | ||
|
||
ebb: | ||
$(MAKE) -k -C $@ all | ||
|
||
.PHONY: all run_tests clean sub_run_tests sub_clean $(SUB_TARGETS) | ||
.PHONY: all run_tests clean ebb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,12 @@ | ||
CFLAGS += -I$(CURDIR) | ||
|
||
PROGS := load_unaligned_zeropad | ||
TEST_PROGS := load_unaligned_zeropad | ||
|
||
all: $(PROGS) | ||
all: $(TEST_PROGS) | ||
|
||
$(PROGS): ../harness.c | ||
$(TEST_PROGS): ../harness.c | ||
|
||
run_tests: all | ||
@-for PROG in $(PROGS); do \ | ||
./$$PROG; \ | ||
done; | ||
include ../../lib.mk | ||
|
||
clean: | ||
rm -f $(PROGS) *.o | ||
|
||
.PHONY: all run_tests clean | ||
rm -f $(TEST_PROGS) *.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,10 @@ | ||
PROGS := tm-resched-dscr | ||
TEST_PROGS := tm-resched-dscr | ||
|
||
all: $(PROGS) | ||
all: $(TEST_PROGS) | ||
|
||
$(PROGS): ../harness.c | ||
$(TEST_PROGS): ../harness.c | ||
|
||
run_tests: all | ||
@-for PROG in $(PROGS); do \ | ||
./$$PROG; \ | ||
done; | ||
include ../../lib.mk | ||
|
||
clean: | ||
rm -f $(PROGS) *.o | ||
|
||
.PHONY: all run_tests clean | ||
rm -f $(TEST_PROGS) *.o |