Debian Codegraph @

debian/tests/python3-basic

raw symbols SCIP
1 #!/bin/sh
2 # autopkgtest check: Python module successfully imported and executed
3 # Requires that AUTOPKGTEST_TMP and PYINTERPRETER are set
4 set -e
5
6 # python3.Y at build time, python3 at CI time
7 PYINTERPRETER=${PYINTERPRETER:-python3}
8
9 # Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us
10 if [ -z "$AUTOPKGTEST_TMP" ]
11 then
12 echo "Required envvar AUTOPKGTEST is not set" >&2
13 exit 1
14 fi
15
16 # Copy the simple example and the training data to $AUTOPKGTEST, and execute it
17 mkdir -p "$AUTOPKGTEST_TMP/$PYINTERPRETER"
18 cp examples/simple_train.py "$AUTOPKGTEST_TMP/$PYINTERPRETER"
19 cp examples/xor.data "$AUTOPKGTEST_TMP/$PYINTERPRETER"
20 cd "$AUTOPKGTEST_TMP/$PYINTERPRETER"
21
22 $PYINTERPRETER simple_train.py
23 echo "run: OK"