diff options
author | Luotao Fu <l.fu@pengutronix.de> | 2010-02-24 12:39:58 +0100 |
---|---|---|
committer | Luotao Fu <l.fu@pengutronix.de> | 2010-02-24 12:39:58 +0100 |
commit | 192c88011611e1685fad281a5764bd5098f40cb2 (patch) | |
tree | 8f17c4ef8b5194547d35354be8812f3db7319bda /tests | |
parent | aeb799d556ba3c4b9ef45fc23af204312899db64 (diff) | |
download | ptxdist-192c88011611e1685fad281a5764bd5098f40cb2.tar.gz ptxdist-192c88011611e1685fad281a5764bd5098f40cb2.tar.xz |
[ptxdist] fix environment fetching with barebox
Signed-off-by: Luotao Fu <l.fu@pengutronix.de>
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/setenv.kermit | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tests/setenv.kermit b/tests/setenv.kermit index 06bed1518..a9cef2fbc 100755 --- a/tests/setenv.kermit +++ b/tests/setenv.kermit @@ -70,7 +70,13 @@ define setenv_uboot_v2 { ptx_test_start "Getting default environment" ptx_uboot_exec 15 "ping $eth0.serverip" - ptx_uboot_exec 15 "tftp \m(imagename)" + # in current versions of barebox tftp returns the filesize it has + # fetched. The return value will eventually intepreted as failure by + # ptx_uboot_exec. We call an empty echo to set $? to 0 if the return + # value of tftp is not 1 to work around this. (tftp returns 1 if it + # can't get the file. An successfully fetched image will mostly + # impossibly have the size 1) + ptx_uboot_exec 15 "tftp \m(imagename); [ $? -ne 1 ] && echo" ptx_test_end ptx_test_start "Flashing default environment" |