OLD | NEW |
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 VBOOT_REFERENCE_DIR = ../../.. | 5 VBOOT_SRC_DIR ?= ../../.. |
6 BUILD_TEST_DIR = vboot_reference | 6 BUILD_TEST_DIR = vboot_tests |
7 # Test Binaries. | 7 # Test Binaries. |
8 TEST_BINS = \ | 8 TEST_BINS = \ |
9 » common.sh \ | 9 » cgptlib_test \ |
10 » firmware_image_tests \ | |
11 » firmware_rollback_tests \ | |
12 » firmware_splicing_tests \ | |
13 » firmware_verify_benchmark \ | |
14 » gen_test_cases.sh \ | |
15 » kernel_image_tests \ | |
16 » kernel_rollback_tests \ | |
17 » kernel_splicing_tests \ | |
18 » kernel_verify_benchmark \ | |
19 rsa_padding_test \ | 10 rsa_padding_test \ |
20 rsa_verify_benchmark \ | 11 rsa_verify_benchmark \ |
21 run_image_verification_tests.sh \ | |
22 run_rsa_tests.sh \ | |
23 sha_benchmark \ | 12 sha_benchmark \ |
24 sha_tests \ | 13 sha_tests \ |
| 14 vboot_common_tests \ |
| 15 vboot_common2_tests \ |
| 16 vboot_common3_tests |
| 17 # Test Runner Scripts. |
| 18 TEST_SCRIPTS = \ |
| 19 common.sh \ |
| 20 gen_test_cases.sh \ |
| 21 gen_test_keys.sh \ |
| 22 gen_test_vbpubks.sh \ |
| 23 run_cgpt_tests.sh \ |
| 24 run_rsa_tests.sh \ |
| 25 run_vboot_common_tests.sh \ |
| 26 run_vbutil_tests.sh \ |
25 testcases \ | 27 testcases \ |
26 testkeys | 28 testkeys |
27 | 29 |
28 # Utility Binaries. | 30 # Utility Binaries. |
29 UTIL_BINS = verify_data signature_digest_utility | 31 UTIL_BINS = \ |
| 32 » load_kernel_test \ |
| 33 » signature_digest_utility \ |
| 34 » vbutil_firmware \ |
| 35 » vbutil_kernel \ |
| 36 » vbutil_key \ |
| 37 » vbutil_keyblock \ |
| 38 » verify_data |
30 | 39 |
31 all: | 40 all: |
32 # Copy test sources into a temporary directory for building. | 41 # Copy test sources into a temporary directory for building. |
33 rm -rf $(BUILD_TEST_DIR) | 42 rm -rf $(BUILD_TEST_DIR) |
34 » # only copy stuff that's not us | 43 » mkdir -p $(BUILD_TEST_DIR) |
| 44 # Ignore autotest and build directory. |
35 sh -c \ | 45 sh -c \ |
36 » 'for dir in $(VBOOT_REFERENCE_DIR)/*; do \ | 46 » 'for dir in $(VBOOT_SRC_DIR)/*; do \ |
37 » » [ "$${dir}" != "$(VBOOT_REFERENCE_DIR)/autotest" ] && cp -r $${d
ir} .; \ | 47 » » [ "$${dir}" != "$(VBOOT_SRC_DIR)/build" ] && \ |
| 48 » » [ "$${dir}" != "$(VBOOT_SRC_DIR)/autotest" ] && \ |
| 49 » » cp -r "$${dir}" "$(BUILD_TEST_DIR)"; \ |
38 done' | 50 done' |
39 # Always build from scratch. | 51 # Always build from scratch. |
40 $(MAKE) -C $(BUILD_TEST_DIR) clean all | 52 $(MAKE) -C $(BUILD_TEST_DIR) clean all |
41 # Move test binaries for use by the tests. | 53 # Move test binaries for use by the tests. |
| 54 mkdir -p build/tests |
| 55 set -e; for i in $(TEST_BINS); do \ |
| 56 mv $(BUILD_TEST_DIR)/build/tests/$$i build/tests/ ;\ |
| 57 done |
| 58 # Move test scripts for use by the tests. |
42 mkdir -p tests | 59 mkdir -p tests |
43 » set -e; for i in $(TEST_BINS); do \ | 60 » set -e; for i in $(TEST_SCRIPTS); do \ |
44 mv $(BUILD_TEST_DIR)/tests/$$i tests/ ;\ | 61 mv $(BUILD_TEST_DIR)/tests/$$i tests/ ;\ |
45 done | 62 done |
46 # Move utility binaries used by the tests. | 63 # Move utility binaries used by the tests. |
47 » mkdir -p utility | 64 » mkdir -p build/utility |
48 set -e; for i in $(UTIL_BINS); do \ | 65 set -e; for i in $(UTIL_BINS); do \ |
49 » mv $(BUILD_TEST_DIR)/utility/$$i utility/ ;\ | 66 » mv $(BUILD_TEST_DIR)/build/utility/$$i build/utility/ ;\ |
50 done | 67 done |
51 # Delete sources. | 68 # Delete sources. |
52 rm -rf $(BUILD_TEST_DIR) | 69 rm -rf $(BUILD_TEST_DIR) |
53 | 70 |
54 clean: | 71 clean: |
55 rm -rf utility/ tests/ | 72 rm -rf utility/ tests/ |
OLD | NEW |