OLD | NEW |
1 #!/bin/bash -eu | 1 #!/bin/bash -eu |
2 | 2 |
3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
6 # | 6 # |
7 # Run tests for RSA Signature verification. | 7 # Run tests for CGPT. |
8 | 8 |
9 # Load common constants and variables. | 9 # Load common constants and variables. |
10 . "$(dirname "$0")/common.sh" | 10 . "$(dirname "$0")/common.sh" |
11 | 11 |
12 GPT=$(readlink -f "$1") | 12 GPT=$(readlink -f "$1") |
13 [ -x "$GPT" ] || error "Can't execute $GPT" | 13 [ -x "$GPT" ] || error "Can't execute $GPT" |
14 | 14 |
15 # Run tests in a dedicated directory for easy cleanup or debugging. | 15 # Run tests in a dedicated directory for easy cleanup or debugging. |
16 DIR="${TEST_DIR}/cgpt_test_dir" | 16 DIR="${TEST_DIR}/cgpt_test_dir" |
17 [ -d "$DIR" ] || mkdir -p "$DIR" | 17 [ -d "$DIR" ] || mkdir -p "$DIR" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 $GPT boot -i ${KERN_NUM} ${DEV} >/dev/null | 108 $GPT boot -i ${KERN_NUM} ${DEV} >/dev/null |
109 | 109 |
110 echo "Check the PMBR's idea of the boot partition..." | 110 echo "Check the PMBR's idea of the boot partition..." |
111 X=$($GPT boot ${DEV}) | 111 X=$($GPT boot ${DEV}) |
112 Y=$($GPT show -u -i $KERN_NUM $DEV) | 112 Y=$($GPT show -u -i $KERN_NUM $DEV) |
113 [ "$X" = "$Y" ] || error "fail at line $LINENO" | 113 [ "$X" = "$Y" ] || error "fail at line $LINENO" |
114 | 114 |
115 echo "Done." | 115 echo "Done." |
116 | 116 |
117 happy "All tests passed." | 117 happy "All tests passed." |
OLD | NEW |