X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=test%2Fdm%2Ftest-dm.sh;h=1a0f1509b4156408453b089cf3e975a5e775f5e7;hb=747440d0fa95f2205a8fcef49b6c7845700b6246;hp=ef5aca5ac3c43800fe62b9242027cb341f4e9af7;hpb=5495dae7aa9d5cd161e07174d38acac86515c58a;p=u-boot diff --git a/test/dm/test-dm.sh b/test/dm/test-dm.sh index ef5aca5ac3..1a0f1509b4 100755 --- a/test/dm/test-dm.sh +++ b/test/dm/test-dm.sh @@ -1,7 +1,16 @@ #!/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} -./sandbox/u-boot -d test/dm/test.dtb -c "dm test" +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 +echo -n "this is a test" > testflash.bin +dd if=/dev/zero bs=1M count=4 >>testflash.bin +./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb -c "ut dm" +rm spi.bin +rm testflash.bin