forked from lkl/linux
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lkl: Fix INSTALL_PATH error, add more test options
This changes arck/lkl/Makefile to build the $(INSTALL_PATH)/lib directory if it doesn't already exist, which would otherwise cause the install to fail if INSTALL_PATH != tools/lkl. It also adds a test target for running tools/lkl/tests/boot under gdb, and adds a few options to provide more fine-grained control over which tests run. Signed-off-by: Patrick Collins <pscollins@google.com>
- Loading branch information
Showing
5 changed files
with
49 additions
and
19 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,23 +1,52 @@ | ||
define valgrind_test | ||
VALGRIND_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all --xml=yes --xml-file=valgrind-$1.xml" \ | ||
TEST_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all --xml=yes --xml-file=valgrind-$1.xml" \ | ||
./boot.sh -t $1 ; \ | ||
./valgrind2xunit.py valgrind-$1.xml | ||
endef | ||
|
||
define valgrind_test_text | ||
VALGRIND_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all" \ | ||
TEST_CMD="valgrind --suppressions=valgrind.supp --leak-check=full --show-leak-kinds=all" \ | ||
./boot.sh -t $1 | ||
endef | ||
|
||
define gdb_test | ||
TEST_CMD="gdb --args" ./boot.sh -t $1 | ||
endef | ||
|
||
define for_fs | ||
for fs in $(FS_TYPES); do $(call $1,$$fs); done | ||
endef | ||
|
||
define run | ||
for fs in $(FS_TYPES); do ./boot.sh -t $$fs; done | ||
endef | ||
|
||
QUICK?=0 | ||
VALGRIND_TEXT?=0 | ||
FS_TYPES?=ext4 btrfs vfat xfs | ||
|
||
# The hijack tests are very time consuming, so run with `QUICK=1 make | ||
# test` if you want to stick to the unit tests | ||
ifeq ($(QUICK),1) | ||
HIJACK_TEST= | ||
else | ||
HIJACK_TEST="./hijack-test.sh" | ||
endif | ||
|
||
ifeq ($(VALGRIND_TEXT),1) | ||
VALGRIND_CMD=valgrind_test_text | ||
else | ||
VALGRIND_CMD=valgrind_test | ||
endif | ||
|
||
all: | ||
./boot.sh -t ext4 | ||
./boot.sh -t btrfs | ||
./boot.sh -t vfat | ||
./boot.sh -t xfs | ||
./hijack-test.sh | ||
$(call run,) | ||
$(HIJACK_TEST) | ||
|
||
test: all | ||
|
||
valgrind: | ||
$(call valgrind_test,ext4) | ||
$(call valgrind_test,btrfs) | ||
$(call valgrind_test,vfat) | ||
$(call valgrind_test,xfs) | ||
$(call for_fs,$(VALGRIND_CMD)) | ||
|
||
gdb: | ||
$(call for_fs,gdb_test) |
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