summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@chromium.org>2012-10-05 14:18:51 -0400
committerGerrit <chrome-bot@google.com>2012-10-05 15:21:10 -0700
commit4615b96345d57a09e058a3fc43755d132a025019 (patch)
tree92db1648a3358e46d4d5e5a2b3cde1b812a29d51
parent09a8447862c7d111d6abdd7891508df1a8f1cc5b (diff)
downloadvboot-factory-3004.B.tar.gz
signer scripts: return an error when loading configs failfactory-3004.B
If we are given a config file that doesn't exist, return an error rather ignoring it. This way we don't accidentally give images a pass when we didn't properly test them. BUG=None TEST=`./security_test_image --board=x86-alex --baselines=/` now shows 3 failures rather than all pass BRANCH=None Change-Id: I9d130db05befaeac8fcca921f0e43f47c2461f9f Reviewed-on: https://gerrit.chromium.org/gerrit/34795 Reviewed-by: Ryan Cui <rcui@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
-rwxr-xr-xscripts/image_signing/ensure_no_nonrelease_files.sh2
-rwxr-xr-xscripts/image_signing/ensure_sane_lsb-release.sh2
-rwxr-xr-xscripts/image_signing/ensure_secure_kernelparams.sh2
3 files changed, 3 insertions, 3 deletions
diff --git a/scripts/image_signing/ensure_no_nonrelease_files.sh b/scripts/image_signing/ensure_no_nonrelease_files.sh
index 5a07248e..1b6625f3 100755
--- a/scripts/image_signing/ensure_no_nonrelease_files.sh
+++ b/scripts/image_signing/ensure_no_nonrelease_files.sh
@@ -35,7 +35,7 @@ main() {
configfile="$2"
fi
# Either way, load test-expectations data from config.
- . "$configfile"
+ . "$configfile" || return 1
local rootfs=$(make_temp_dir)
mount_image_partition_ro "$image" 3 "$rootfs"
diff --git a/scripts/image_signing/ensure_sane_lsb-release.sh b/scripts/image_signing/ensure_sane_lsb-release.sh
index bbdffeb6..a5abc3c1 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -125,7 +125,7 @@ main() {
fi
# Either way, load test-expectations data from config.
echo -n "Loading config from $configfile... "
- . "$configfile"
+ . "$configfile" || return 1
echo "Done."
local rootfs=$(make_temp_dir)
diff --git a/scripts/image_signing/ensure_secure_kernelparams.sh b/scripts/image_signing/ensure_secure_kernelparams.sh
index e0e49b90..31d6d644 100755
--- a/scripts/image_signing/ensure_secure_kernelparams.sh
+++ b/scripts/image_signing/ensure_secure_kernelparams.sh
@@ -75,7 +75,7 @@ main() {
configfile="$2"
fi
# Either way, load test-expectations data from config.
- . "$configfile"
+ . "$configfile" || return 1
local kernelblob=$(make_temp_file)
# TODO(jimhebert): Perform the kernel security tests on both the kernel