Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(178)

Side by Side Diff: tests/Makefile

Issue 2857030: Exhaustive test for rollback code (Closed) Base URL: ssh://git@chromiumos-git/vboot_reference.git
Patch Set: Fix write count handling and improve comments. Created 10 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « firmware/version.c ('k') | tests/rbtest.conf » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. 1 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 INCLUDES += -I./include \ 5 INCLUDES += -I./include \
6 -I$(FWDIR)/lib/include \ 6 -I$(FWDIR)/lib/include \
7 -I$(FWDIR)/lib/cgptlib/include \ 7 -I$(FWDIR)/lib/cgptlib/include \
8 -I$(FWDIR)/lib/cryptolib/include \ 8 -I$(FWDIR)/lib/cryptolib/include \
9 -I$(HOSTDIR)/include 9 -I$(HOSTDIR)/include
10 BUILD_ROOT = ${BUILD}/tests 10 BUILD_ROOT = ${BUILD}/tests
11 11
12 TEST_NAMES = cgptlib_test \ 12 TEST_NAMES = cgptlib_test \
13 » » rsa_padding_test \ 13 » rsa_padding_test \
14 » » rsa_verify_benchmark \ 14 » rsa_verify_benchmark \
15 » » sha_benchmark \ 15 » sha_benchmark \
16 » » sha_tests \ 16 » sha_tests \
17 » » vboot_common_tests \ 17 » vboot_common_tests \
18 » » vboot_common2_tests \ 18 » vboot_common2_tests \
19 » » vboot_common3_tests 19 » vboot_common3_tests \
20
20 TEST_BINS = $(addprefix ${BUILD_ROOT}/,$(TEST_NAMES)) 21 TEST_BINS = $(addprefix ${BUILD_ROOT}/,$(TEST_NAMES))
21 22
22 TEST_LIB = ${BUILD_ROOT}/test.a 23 TEST_LIB = ${BUILD_ROOT}/test.a
23 TEST_LIB_SRCS = rollback_index_mock.c test_common.c timer_utils.c crc32_test.c 24 TEST_LIB_SRCS = rollback_index_mock.c test_common.c timer_utils.c crc32_test.c
24 TEST_LIB_OBJS = $(TEST_LIB_SRCS:%.c=${BUILD_ROOT}/%.o) 25 TEST_LIB_OBJS = $(TEST_LIB_SRCS:%.c=${BUILD_ROOT}/%.o)
25 ALL_DEPS = $(addsuffix .d,${TEST_BINS} ${TEST_LIB_OBJS}) 26 ALL_DEPS = $(addsuffix .d,${TEST_BINS} ${TEST_LIB_OBJS})
26 CFLAGS += -MMD -MF $@.d 27 CFLAGS += -MMD -MF $@.d
27 28
28 LIBS := ${TEST_LIB} $(HOSTLIB) $(FWLIB) 29 LIBS := ${TEST_LIB} $(HOSTLIB) $(FWLIB)
29 30
30 ifneq (${RUNTESTS},) 31 ifneq (${RUNTESTS},)
31 EXTRA_TARGET = runtests 32 EXTRA_TARGET = runtests
32 endif 33 endif
33 34
34 all: $(TEST_BINS) ${EXTRA_TARGET} 35 all: $(TEST_BINS) ${EXTRA_TARGET} $(BUILD_ROOT)/rollback_index_test
35 36
36 ${TEST_LIB}: ${TEST_LIB_OBJS} 37 ${TEST_LIB}: ${TEST_LIB_OBJS}
37 rm -f $@ 38 rm -f $@
38 ar qc $@ $^ 39 ar qc $@ $^
39 40
41 ${BUILD_ROOT}/rollback_index_test.o : rollback_index_test.c
42 $(CC) $(CFLAGS) -I/usr/include $(INCLUDES) -MMD -MF $@.d -c -o $@ $<
43
44 ${BUILD_ROOT}/rollback_index_test: rollback_index_test.c ${HOSTLIB} ${FWLIB}
45 $(CC) $(CFLAGS) -I/usr/include $(INCLUDES) $< -o $@ \
46 -ltlcl ${HOSTLIB} ${FWLIB} -lcrypto -lrt
47
40 ${BUILD_ROOT}/%.o : %.c 48 ${BUILD_ROOT}/%.o : %.c
41 $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $< 49 $(CC) $(CFLAGS) $(INCLUDES) -MMD -MF $@.d -c -o $@ $<
42 50
43 ${BUILD_ROOT}/%: %.c ${LIBS} 51 ${BUILD_ROOT}/%: %.c ${LIBS}
44 $(CC) $(CFLAGS) $(INCLUDES) $< ${LIBS} -o $@ -lcrypto -lrt 52 $(CC) $(CFLAGS) $(INCLUDES) $< ${LIBS} -o $@ -lcrypto -lrt
45 53
46 # TODO: port these tests to new API, if not already eqivalent 54 # TODO: port these tests to new API, if not already eqivalent
47 # functionality in other tests 55 # functionality in other tests
48 # 56 #
49 # big_firmware_tests 57 # big_firmware_tests
50 # firmware_image_tests 58 # firmware_image_tests
51 # firmware_rollback_tests 59 # firmware_rollback_tests
52 # firmware_splicing_tests 60 # firmware_splicing_tests
53 # firmware_verify_benchmark 61 # firmware_verify_benchmark
54 # verify_firmware_fuzz_driver 62 # verify_firmware_fuzz_driver
55 # 63 #
56 # big_kernel_tests 64 # big_kernel_tests
57 #» » kernel_image_tests 65 #» » kernel_image_tests
58 #» » kernel_rollback_tests 66 #» » kernel_rollback_tests
59 #» » kernel_splicing_tests 67 #» » kernel_splicing_tests
60 #» » kernel_verify_benchmark 68 #» » kernel_verify_benchmark
61 # verify_kernel_fuzz_driver 69 # verify_kernel_fuzz_driver
62 70
63 # Generate test keys 71 # Generate test keys
64 genkeys: 72 genkeys:
65 ./gen_test_keys.sh 73 ./gen_test_keys.sh
66 74
67 # Run cgpt tests 75 # Run cgpt tests
68 runcgpttests: 76 runcgpttests:
69 ${BUILD_ROOT}/cgptlib_test 77 ${BUILD_ROOT}/cgptlib_test
70 ./run_cgpt_tests.sh ${BUILD}/cgpt/cgpt 78 ./run_cgpt_tests.sh ${BUILD}/cgpt/cgpt
(...skipping 13 matching lines...) Expand all
84 92
85 # TODO: tests to run when ported to new API 93 # TODO: tests to run when ported to new API
86 # ./run_image_verification_tests.sh 94 # ./run_image_verification_tests.sh
87 # # Splicing tests 95 # # Splicing tests
88 # ${BUILD_ROOT}/firmware_splicing_tests 96 # ${BUILD_ROOT}/firmware_splicing_tests
89 # ${BUILD_ROOT}/kernel_splicing_tests 97 # ${BUILD_ROOT}/kernel_splicing_tests
90 # # Rollback Tests 98 # # Rollback Tests
91 # ${BUILD_ROOT}/firmware_rollback_tests 99 # ${BUILD_ROOT}/firmware_rollback_tests
92 # ${BUILD_ROOT}/kernel_rollback_tests 100 # ${BUILD_ROOT}/kernel_rollback_tests
93 101
102 install: $(BUILD_ROOT)/rollback_index_test
103 mkdir -p $(DESTDIR)
104 cp -f $(BUILD_ROOT)/rollback_index_test $(DESTDIR)
105
94 -include ${ALL_DEPS} 106 -include ${ALL_DEPS}
OLDNEW
« no previous file with comments | « firmware/version.c ('k') | tests/rbtest.conf » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698