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

Unified Diff: tests/run_cgpt_tests.sh

Issue 3162023: Run the cgpt tests in a separate directory. (Closed) Base URL: http://src.chromium.org/git/vboot_reference.git
Patch Set: Created 10 years, 4 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 side-by-side diff with in-line comments
Download patch
« tests/common.sh ('K') | « tests/common.sh ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/run_cgpt_tests.sh
diff --git a/tests/run_cgpt_tests.sh b/tests/run_cgpt_tests.sh
index b70af2f3046f5db705ccbf16ee062640170b836a..9171a8699d55e95a4560b861a6403f7647e65a6e 100755
--- a/tests/run_cgpt_tests.sh
+++ b/tests/run_cgpt_tests.sh
@@ -9,16 +9,19 @@
# Load common constants and variables.
. "$(dirname "$0")/common.sh"
-GPT=$1
+GPT=$(readlink -f "$1")
[ -x "$GPT" ] || error "Can't execute $GPT"
-warning "testing $GPT"
+
+# Run tests in a dedicated directory for easy cleanup or debugging.
+DIR="${TEST_DIR}/cgpt_test_dir"
+[ -d "$DIR" ] || mkdir -p "$DIR"
+warning "testing $GPT in $DIR"
+cd "$DIR"
echo "Create an empty file to use as the device..."
NUM_SECTORS=1000
-DEV=$(mktemp)
-BOOTFILE=$(mktemp)
+DEV=fake_dev.bin
dd if=/dev/zero of=${DEV} conv=notrunc bs=512 count=${NUM_SECTORS} 2>/dev/null
-trap "rm -f ${DEV}" EXIT
vb 2010/08/19 23:15:35 so who's be cleaning up this stuff now?
Randall Spangler 2010/08/19 23:30:40 (Are you leaving it around so you can run the test
Bill Richardson 2010/08/19 23:59:34 Nobody's cleaning it up. The new directory sits in
echo "Create a bunch of partitions, using the real GUID types..."
« tests/common.sh ('K') | « tests/common.sh ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698