summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-01-25 08:26:56 -0700
committerSimon Glass <sjg@chromium.org>2015-01-29 17:09:54 -0700
commit22cc069160dc77972b70d45c0d2558e20e9ee766 (patch)
tree573d976e938cb8c8383bf75abba9b80fd168c9ea /test
parent25ab4b0303f2df5e6b94ed92e37875a7c98f4de3 (diff)
downloadtalos-obmc-uboot-22cc069160dc77972b70d45c0d2558e20e9ee766.tar.gz
talos-obmc-uboot-22cc069160dc77972b70d45c0d2558e20e9ee766.zip
dm: Don't run tests if U-Boot cannot be built
There is no point in running the tests if U-Boot cannot be built. Abort in this case. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'test')
-rwxr-xr-xtest/dm/test-dm.sh9
1 files changed, 7 insertions, 2 deletions
diff --git a/test/dm/test-dm.sh b/test/dm/test-dm.sh
index bb99677ece..8ebc39297c 100755
--- a/test/dm/test-dm.sh
+++ b/test/dm/test-dm.sh
@@ -1,9 +1,14 @@
#!/bin/sh
+die() {
+ echo $1
+ exit 1
+}
+
NUM_CPUS=$(cat /proc/cpuinfo |grep -c processor)
dtc -I dts -O dtb test/dm/test.dts -o test/dm/test.dtb
-make O=sandbox sandbox_config
-make O=sandbox -s -j${NUM_CPUS}
+make O=sandbox sandbox_config || die "Cannot configure U-Boot"
+make O=sandbox -s -j${NUM_CPUS} || die "Cannot build U-Boot"
dd if=/dev/zero of=spi.bin bs=1M count=2
./sandbox/u-boot -d test/dm/test.dtb -c "dm test"
rm spi.bin
OpenPOWER on IntegriCloud