Commit 4ff07b47 authored by Neil Muller's avatar Neil Muller

Improve new autopkgtests

 * Fix test name
 * Use set -e everywhere
 * Extend tests to cover python 3
parent 682ba157
Tests: testdb
Depends: python-sqlobject
Depends: python-sqlobject, python3-sqlobject
Tests: testdb_setuptools
Depends: python-sqlobject, python-setuptools
Tests: testdb-setuptools
Depends: python-sqlobject, python-setuptools, python3-sqlobject, python3-setuptools
......@@ -2,6 +2,7 @@
# Simple test that we can use a memory database
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
......@@ -49,3 +50,4 @@ if __name__ == "__main__":
EOF
python testdb.py
python3 testdb.py
......@@ -3,6 +3,8 @@
# Test that setuptools requirements are correct
# See #918683 for context of why we want this test
set -e
WORKDIR=$(mktemp -d)
trap "rm -rf $WORKDIR" 0 INT QUIT ABRT PIPE TERM
cd $WORKDIR
......@@ -10,6 +12,7 @@ cd $WORKDIR
mkdir mypkg
mkdir mypkg/testlib
mkdir rundir
mkdir rundir3
cd mypkg
......@@ -72,9 +75,15 @@ EOF
touch __init__.py
cd ..
cd $WORKDIR/mypkg
export PYTHONPATH=$WORKDIR/rundir
python ./setup.py develop -d $WORKDIR/rundir
cd $WORKDIR/rundir
./testdb
# Repeat with python 3
cd $WORKDIR/mypkg
export PYTHONPATH=$WORKDIR/rundir3
python3 ./setup.py develop -d $WORKDIR/rundir3
cd $WORKDIR/rundir3
./testdb
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment