File: python3-basic

package info (click to toggle)
python-fann2 1%3A1.2.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 496 kB
  • sloc: cpp: 1,615; ansic: 862; python: 116; makefile: 22; sh: 13
file content (23 lines) | stat: -rwxr-xr-x 733 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# autopkgtest check: Python module successfully imported and executed
# Requires that AUTOPKGTEST_TMP and PYINTERPRETER are set
set -e

# python3.Y at build time, python3 at CI time
PYINTERPRETER=${PYINTERPRETER:-python3}

# Presence of $AUTOPKGTEST_TMP implies that someone will handle cleanup for us
if [ -z "$AUTOPKGTEST_TMP" ]
then
	echo "Required envvar AUTOPKGTEST is not set" >&2
	exit 1
fi

# Copy the simple example and the training data to $AUTOPKGTEST, and execute it
mkdir -p "$AUTOPKGTEST_TMP/$PYINTERPRETER"
cp examples/simple_train.py "$AUTOPKGTEST_TMP/$PYINTERPRETER"
cp examples/xor.data "$AUTOPKGTEST_TMP/$PYINTERPRETER"
cd "$AUTOPKGTEST_TMP/$PYINTERPRETER"

$PYINTERPRETER simple_train.py
echo "run: OK"