Index: tests/Makefile |
diff --git a/tests/Makefile b/tests/Makefile |
index dc8620e4015ab879d251e815bd5cb3d813522da4..1e8fc9daaaf140602e621d21bd372a4f2f3b55cf 100644 |
--- a/tests/Makefile |
+++ b/tests/Makefile |
@@ -6,29 +6,17 @@ INCLUDES += -I./include \ |
-I$(FWDIR)/lib/include \ |
-I$(FWDIR)/lib/cgptlib/include \ |
-I$(FWDIR)/lib/cryptolib/include \ |
- -I../host/include \ |
- -I../misclibs/include \ |
- -I../vboot_firmware/lib/include\ |
- -I../vkernel/include |
-IMAGE_LIBS = $(BUILD)/vkernel/kernel_image.o \ |
- $(BUILD)/vkernel/kernel_image_fw.o |
-UTIL_LIBS = $(BUILD)/misclibs/file_keys.o $(BUILD)/misclibs/signature_digest.o |
+ -I$(HOSTDIR)/include |
BUILD_ROOT = ${BUILD}/tests |
-TEST_NAMES = big_kernel_tests \ |
- cgptlib_test \ |
- kernel_image_tests \ |
- kernel_rollback_tests \ |
- kernel_splicing_tests \ |
- kernel_verify_benchmark \ |
+TEST_NAMES = cgptlib_test \ |
rsa_padding_test \ |
rsa_verify_benchmark \ |
sha_benchmark \ |
sha_tests \ |
vboot_common_tests \ |
vboot_common2_tests \ |
- vboot_common3_tests \ |
- verify_kernel_fuzz_driver |
+ vboot_common3_tests |
TEST_BINS = $(addprefix ${BUILD_ROOT}/,$(TEST_NAMES)) |
TEST_LIB = ${BUILD_ROOT}/test.a |
@@ -37,7 +25,7 @@ TEST_LIB_OBJS = $(TEST_LIB_SRCS:%.c=${BUILD_ROOT}/%.o) |
ALL_DEPS = $(addsuffix .d,${TEST_BINS} ${TEST_LIB_OBJS}) |
CFLAGS += -MMD -MF $@.d |
-LIBS := ${TEST_LIB} $(IMAGE_LIBS) $(UTIL_LIBS) $(HOSTLIB) $(FWLIB) |
+LIBS := ${TEST_LIB} $(HOSTLIB) $(FWLIB) |
all: $(TEST_BINS) ${EXTRA_TARGET} |
@@ -51,37 +39,57 @@ ${BUILD_ROOT}/%.o : %.c |
${BUILD_ROOT}/%: %.c ${LIBS} |
$(CC) $(CFLAGS) $(INCLUDES) $< ${LIBS} -o $@ -lcrypto -lrt |
-# TODO: port these tests to vboot_firmware, if not already eqivalent |
-# functionality |
+# TODO: port these tests to new API, if not already eqivalent |
+# functionality in other tests |
+# |
# big_firmware_tests |
# firmware_image_tests |
# firmware_rollback_tests |
# firmware_splicing_tests |
# firmware_verify_benchmark |
# verify_firmware_fuzz_driver |
+# |
+# big_kernel_tests |
+# kernel_image_tests |
+# kernel_rollback_tests |
+# kernel_splicing_tests |
+# kernel_verify_benchmark |
+# verify_kernel_fuzz_driver |
ifneq (${RUNTESTS},) |
EXTRA_TARGET = runtests |
endif |
-runtests: |
+# Generate test keys |
+genkeys: |
./gen_test_keys.sh |
- # Crypto tests |
+ |
+# Run cgpt tests |
+runcgpttests: |
+ ${BUILD_ROOT}/cgptlib_test |
+ ./run_cgpt_tests.sh ${BUILD}/cgpt/cgpt |
+ |
+# Run crypto tests |
+runcryptotests: |
./run_rsa_tests.sh |
${BUILD_ROOT}/sha_tests |
- ./run_vbutil_tests.sh |
./run_vboot_common_tests.sh |
- ./run_image_verification_tests.sh |
- # Splicing tests |
- #${BUILD_ROOT}/firmware_splicing_tests |
- ${BUILD_ROOT}/kernel_splicing_tests |
- # Rollback Tests |
- #${BUILD_ROOT}/firmware_rollback_tests |
- ${BUILD_ROOT}/kernel_rollback_tests |
- # Helper Library Tests |
- ${BUILD_ROOT}/cgptlib_test |
- # Tool tests |
- ./run_cgpt_tests.sh ${BUILD}/cgpt/cgpt |
--include ${ALL_DEPS} |
+# Run other misc tests |
+runmisctests: |
+ ./run_vbutil_tests.sh |
+ |
+ |
+runtests: genkeys runcgpttests runcryptotests runmisctests |
+ |
+# TODO: tests to run when ported to new API |
+# ./run_image_verification_tests.sh |
+# # Splicing tests |
+# ${BUILD_ROOT}/firmware_splicing_tests |
+# ${BUILD_ROOT}/kernel_splicing_tests |
+# # Rollback Tests |
+# ${BUILD_ROOT}/firmware_rollback_tests |
+# ${BUILD_ROOT}/kernel_rollback_tests |
+ |
+-include ${ALL_DEPS} |