File: check-python-interop

package info (click to toggle)
smartleia 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, sid, trixie
  • size: 220 kB
  • sloc: python: 1,044; makefile: 11; sh: 1
file content (23 lines) | stat: -rw-r--r-- 600 bytes parent folder | download
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