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 3 # found in the LICENSE file. 4 5 VBOOT_REFERENCE_DIR = $(GCLIENT_ROOT)/src/platform/vboot_reference 6 BUILD_TEST_DIR = vboot_reference 7 # Test Binaries. 8 TEST_BINS = \ 9 common.sh \ 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 \ 20 rsa_verify_benchmark \ 21 run_image_verification_tests.sh \ 22 run_rsa_tests.sh \ 23 sha_benchmark \ 24 sha_tests \ 25 testcases \ 26 testkeys 27 28 # Utility Binaries. 29 UTIL_BINS = verify_data signature_digest_utility 30 31 all: 32 # Copy test sources into a temporary directory for building. 33 rm -rf $(BUILD_TEST_DIR) 34 cp -r $(VBOOT_REFERENCE_DIR) . 35 # Always build from scratch. 36 $(MAKE) -C $(BUILD_TEST_DIR) clean all 37 # Move test binaries for use by the tests. 38 mkdir -p tests 39 set -e; for i in $(TEST_BINS); do \ 40 mv $(BUILD_TEST_DIR)/tests/$$i tests/ ;\ 41 done 42 # Move utility binaries used by the tests. 43 mkdir -p utility 44 set -e; for i in $(UTIL_BINS); do \ 45 mv $(BUILD_TEST_DIR)/utility/$$i utility/ ;\ 46 done 47 # Delete sources. 48 rm -rf $(BUILD_TEST_DIR) 49 50 clean: 51 rm -rf utility/ tests/ 52