1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
|
#!/bin/dash
# test that smartleia API keeps its compatibility with the other python
# module. At start time, it should not generate backtrace but only an indication
# specifying that there is no board connected.
# The expected return code should be 42.
set +e
smartleia
result=$?
set -e
if test $result -ne 42; then
echo "received error code ${result}, something wrong happened"
# this should not happen, something went wrong before smartleia detected
# that there is no board connected.
return 1
fi
echo "received code 42: legitimate return value. Exit with no error"
return 0
|