diff --git a/debian/control b/debian/control index dd695ff7309f8f8b4d61e89f9e84f437476938c1..6350cc9796db2c0d80d3533c8d23bcf1a28e64f3 100644 --- a/debian/control +++ b/debian/control @@ -7,6 +7,7 @@ Build-Depends: autopoint, debhelper (>= 9), dh-apparmor, + dh-python, libclutter-1.0-dev, libclutter-gst-3.0-dev, libfolks-dev, @@ -23,14 +24,18 @@ Build-Depends: pkg-config, python, python-yaml, - valac + python3, + valac, Standards-Version: 3.9.6 Vcs-Browser: https://git.apertis.org/cgit/apertis-tests.git/ Vcs-Git: https://git.apertis.org/git/apertis-tests.git Package: apertis-tests Architecture: all -Depends: ${misc:Depends} +Depends: + ${misc:Depends}, + ${python3:Depends}, + ${python:Depends}, Description: automated and manual test definitions This package installs test scripts, test data and other pieces of automated and manual tests. @@ -45,6 +50,8 @@ Package: apertis-tests-bin Architecture: any Depends: ${misc:Depends}, + ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, Description: automated and manual test executables This package installs compiled executables that have no shared library @@ -70,7 +77,8 @@ Depends: apparmor (>= 2.8.0-0ubuntu5co4), ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, - ${python3:Depends} + ${python3:Depends}, + ${python:Depends}, Description: Functional tests for Chaiwala specific features This package tests Chaiwala specific features and requirement which are not necessarely the same of AppArmor upstream tests (although some tests might be @@ -103,6 +111,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -120,6 +129,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -138,6 +148,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -154,6 +165,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -171,6 +183,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -189,6 +202,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apparmor (>= 2.8.0-0ubuntu5co4), @@ -206,6 +220,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -224,6 +239,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -244,6 +260,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -262,6 +279,7 @@ Depends: ${misc:Depends}, ${perl:Depends}, ${python3:Depends}, + ${python:Depends}, ${shlibs:Depends}, apertis-tests, apertis-tests-apparmor-report, @@ -275,7 +293,10 @@ Description: Functional tests for PulseAudio AppArmor profiles/abstractions Package: chaiwala-tests Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends}, +Depends: ${misc:Depends}, + ${python3:Depends}, + ${python:Depends}, + ${shlibs:Depends}, apertis-tests, apertis-tests-bin, libglib2.0-bin, binutils, diff --git a/debian/rules b/debian/rules index c3645b37b1cdca6127ba568a3771863d1a8a5732..4b93e793d9f03e4a9d3c3c5b8fbab48969854a37 100755 --- a/debian/rules +++ b/debian/rules @@ -1,10 +1,73 @@ #!/usr/bin/make -f %: - dh $@ -- + dh $@ \ + --with python2 \ + --with python3 \ + $(NULL) override_dh_auto_install: dh_auto_install --destdir=debian/tmp override_dh_install: dh_install --fail-missing + +# Do not attempt to parse Python 3 scripts: not all of our scripts are +# python-2-compatible. +# Do not rename *.so as though they were Python extensions: they aren't. +override_dh_python2: + dh_python2 \ + -Nchaiwala-tests \ + -X '.*/apertis_tests_lib/bluez.py' \ + -X '.*/bluez/bluez-test' \ + -v \ + --no-ext-rename \ + /usr/lib/apertis-tests + dh_python2 -pchaiwala-tests \ + -v \ + --no-ext-rename \ + /usr/lib/chaiwala-tests \ + $(NULL) + dh_python2 -pchaiwala-tests \ + -v \ + --no-ext-rename \ + /usr/share/chaiwala-tests \ + $(NULL) + +# Do not attempt to parse Python 2 scripts: not all of our scripts are +# python3-compatible yet. +# Do not rename *.so as though they were Python extensions: they aren't. +override_dh_python3: + dh_python3 \ + -Nchaiwala-tests \ + -X '.*/apparmor/dbus/dbus-client.py' \ + -X '.*/apparmor/dbus/dbus-server.py' \ + -X '.*/boot-performance/automated/run-test.py' \ + -X '.*/connman/connman-test-service.py' \ + -X '.*/connman/connman-test.py' \ + -X '.*/dbus/dos-match-rules/match-rules.py' \ + -X '.*/gstreamer-decode/gstreamer-decode.py' \ + -X '.*/gstreamer-decode/gstreamer1.0-decode.py' \ + -X '.*/rfkill-toggle/rfkill-toggle.py' \ + -X '.*/traffic-control/manual/client.py' \ + -v \ + --no-ext-rename \ + /usr/lib/apertis-tests \ + $(NULL) + dh_python3 -pchaiwala-tests \ + -X '.*/connman/connman-test-service.py' \ + -X '.*/connman/connman-test.py' \ + -X '.*/gstreamer-decode/gstreamer-decode.py' \ + -X '.*/gstreamer-decode/gstreamer1.0-decode.py' \ + -X '.*/rfkill-toggle/rfkill-toggle.py' \ + -v \ + --no-ext-rename \ + /usr/lib/chaiwala-tests \ + $(NULL) + dh_python3 -pchaiwala-tests \ + -X '.*/boot-performance/automated/run-test.py' \ + -X '.*/traffic-control/manual/client.py' \ + -v \ + --no-ext-rename \ + /usr/share/chaiwala-tests \ + $(NULL)