signer scripts: return an error when loading configs fail

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>
diff --git a/scripts/image_signing/ensure_no_nonrelease_files.sh b/scripts/image_signing/ensure_no_nonrelease_files.sh
index 5a07248..1b6625f 100755
--- a/scripts/image_signing/ensure_no_nonrelease_files.sh
+++ b/scripts/image_signing/ensure_no_nonrelease_files.sh
@@ -35,7 +35,7 @@
         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 bbdffeb..a5abc3c 100755
--- a/scripts/image_signing/ensure_sane_lsb-release.sh
+++ b/scripts/image_signing/ensure_sane_lsb-release.sh
@@ -125,7 +125,7 @@
   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 e0e49b9..31d6d64 100755
--- a/scripts/image_signing/ensure_secure_kernelparams.sh
+++ b/scripts/image_signing/ensure_secure_kernelparams.sh
@@ -75,7 +75,7 @@
         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