autopkgtest and package specific scripots
Hello, I would like to share a bunch of test scripts for my packages.
import a sort of bash library and use the method in my autopkgtest scripts.
Is there a common place to do this around autopkgtest ?
If not, should I put these scripts somewhere specific on the file system ?
thanks for your help
Frederic
I have things like this
#!/bin/sh
# test if there is no error when executing the scripts
# silent matplotlib
export MPLCONFIGDIR=${AUTOPKGTEST_TMP}
# silent qt
mkdir -p ${AUTOPKGTEST_TMP}/run
chmod 700 ${AUTOPKGTEST_TMP}/run
export XDG_RUNTIME_DIR=${AUTOPKGTEST_TMP}/run
# export a writable home for pymca fit directory
export HOME=${AUTOPKGTEST_TMP}
glxinfo
--- here the part I want to share between my packages
allpkg=$(dh_listpackages)
for p in $allpkg; do
echo -n "Package $p: "
allbinaries=$(dpkg -L "$p"| grep "/usr/bin/")
if [ -z "$allbinaries" ]; then
echo "nothing to do"
continue
fi
echo ''
for f in $allbinaries; do
timeout --preserve-status 5s "$f"
ec=$?
echo -n " -testing $f: $ec "
if [ $ec -eq 143 ]; then
echo "trapped (SIGTERM) This is not an error"
elif [ $ec -eq 2 ]; then
echo "Skipped exit code 2 for $f"
else
echo "ok"
fi
done
done
Reply to: