From fd99a37c2799106d74c657902a59c1567a608c1f Mon Sep 17 00:00:00 2001 From: Chase Qi Date: Wed, 23 Nov 2016 19:56:40 +0800 Subject: automated: linux: fix disk partitioning test Change-Id: I407b65bc0d1d6e388dbe91725e7d9407d90a8823 Signed-off-by: Chase Qi --- automated/linux/disk/disk-partitioning.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'automated/linux') diff --git a/automated/linux/disk/disk-partitioning.sh b/automated/linux/disk/disk-partitioning.sh index 6f5d204..92b7934 100755 --- a/automated/linux/disk/disk-partitioning.sh +++ b/automated/linux/disk/disk-partitioning.sh @@ -1,8 +1,10 @@ #!/bin/sh +# shellcheck disable=SC1091 . ../../lib/sh-test-lib OUTPUT="$(pwd)/output" RESULT_FILE="${OUTPUT}/result.txt" +export RESULT_FILE DISKLABEL="gpt" FILESYSTEM="ext4" @@ -75,7 +77,7 @@ disk_mount() { } # Test run. -[ -b "${DEVICE}" ] && error_msg "Please specify a block device with '-d'" +[ -b "${DEVICE}" ] || error_msg "Please specify a block device with '-d'" ! check_root && error_msg "You need to be root to run this script." [ -d "${OUTPUT}" ] && mv "${OUTPUT}" "${OUTPUT}_$(date +%Y%m%d%H%M%S)" mkdir -p "${OUTPUT}" -- cgit v1.2.3