summaryrefslogtreecommitdiff
path: root/tests/run_vbutil_tests.sh
diff options
context:
space:
mode:
authorvbendeb <vbendeb@chromium.org>2010-06-14 15:41:27 -0700
committervbendeb <vbendeb@chromium.org>2010-06-14 15:41:27 -0700
commit70e9509a2748c0ee8646d77f2a0e6fcbb1446505 (patch)
tree3557b5823bc2200dea45d399f72af51d7cde69f8 /tests/run_vbutil_tests.sh
parent83c88cfa6920711b8a7823e1e3fc0efe8b71a04c (diff)
downloadvboot-70e9509a2748c0ee8646d77f2a0e6fcbb1446505.tar.gz
Rework the vboot_reference make system.
After this change the generated files are placed in a separate tree (such thet they don't show in the `git status' output anymore) and the dependencies are followed properly (if a .h file changes the appropriate .o files and apps get rebuilt). Tested as follows: > $ make clean > $ make # build succeeds > $ git status # shows clean directory > $ RUNTESTS=1 make # (captured test output matches that of the test run before any changes) > $ touch ./vboot_firmware/include/tlcl.h > $ make # make succeeds > $ find build -type f -newer ./vboot_firmware/include/tlcl.h build/vboot_firmware/lib/rollback_index.o build/vboot_firmware/lib/rollback_index.o.d build/vboot_firmware/a.out build/vboot_fw.a build/utility/vbutil_key build/utility/kernel_utility.d build/utility/vbutil_key.d build/utility/verify_data build/utility/load_kernel_test.d build/utility/vbutil_keyblock.d build/utility/vbutil_kernel build/utility/vbutil_kernel.d build/utility/firmware_utility build/utility/signature_digest_utility.d build/utility/kernel_utility build/utility/verify_data.d build/utility/vbutil_keyblock build/utility/signature_digest_utility build/utility/load_kernel_test build/utility/firmware_utility.d build/tests/vboot_common3_tests build/tests/vboot_common2_tests build/host/a.out $ > Review URL: http://codereview.chromium.org/2845001
Diffstat (limited to 'tests/run_vbutil_tests.sh')
-rwxr-xr-xtests/run_vbutil_tests.sh12
1 files changed, 7 insertions, 5 deletions
diff --git a/tests/run_vbutil_tests.sh b/tests/run_vbutil_tests.sh
index f3e75940..ce86e173 100755
--- a/tests/run_vbutil_tests.sh
+++ b/tests/run_vbutil_tests.sh
@@ -21,7 +21,7 @@ function test_vbutil_key {
# Pack the key
${UTIL_DIR}/vbutil_key --pack \
--in ${TESTKEY_DIR}/key_rsa${keylen}.keyb \
- --out ${TESTKEY_DIR}/key_alg${algorithmcounter}.vbpubk \
+ --out ${TESTKEY_SCRATCH_DIR}/key_alg${algorithmcounter}.vbpubk \
--version 1 \
--algorithm $algorithmcounter
if [ $? -ne 0 ]
@@ -32,7 +32,7 @@ function test_vbutil_key {
# Unpack the key
# TODO: should verify we get the same key back out?
${UTIL_DIR}/vbutil_key --unpack \
- --in ${TESTKEY_DIR}/key_alg${algorithmcounter}.vbpubk
+ --in ${TESTKEY_SCRATCH_DIR}/key_alg${algorithmcounter}.vbpubk
if [ $? -ne 0 ]
then
return_code=255
@@ -63,13 +63,15 @@ RSA-${signing_keylen}/${signing_hashalgo}${COL_STOP} \
and ${COL_YELLOW}data key algorithm RSA-${datakeylen}/\
${datahashalgo}${COL_STOP}"
# Remove old file
- keyblockfile=${TESTKEY_DIR}/sign${signing_algorithmcounter}_data${data_algorithmcounter}.keyblock
+ keyblockfile="${TESTKEY_SCRATCH_DIR}/"
+ keyblockfile+="sign${signing_algorithmcounter}_data"
+ keyblockfile+="${data_algorithmcounter}.keyblock"
rm -f ${keyblockfile}
# Pack
${UTIL_DIR}/vbutil_keyblock --pack ${keyblockfile} \
--datapubkey \
- ${TESTKEY_DIR}/key_alg${data_algorithmcounter}.vbpubk \
+ ${TESTKEY_SCRATCH_DIR}/key_alg${data_algorithmcounter}.vbpubk \
--signprivate ${TESTKEY_DIR}/key_rsa${signing_keylen}.pem \
--algorithm $signing_algorithmcounter
if [ $? -ne 0 ]
@@ -80,7 +82,7 @@ ${datahashalgo}${COL_STOP}"
# Unpack
${UTIL_DIR}/vbutil_keyblock --unpack ${keyblockfile} \
--signpubkey \
- ${TESTKEY_DIR}/key_alg${signing_algorithmcounter}.vbpubk
+ ${TESTKEY_SCRATCH_DIR}/key_alg${signing_algorithmcounter}.vbpubk
# TODO: check data key against the packed one?
if [ $? -ne 0 ]
then