Support building and testing packages in a foreign dpkg architecture
Implementation of a --test-architecture $arch
argument to autopkgtest, to permit foreign-architecture testing.
TODO before merging:
-
Switch to build-dep to install build-deps for package builds: !283 (merged) -
Check that autopkgtest behaves in a sensible way when passing the testbed native architecture via --architecture
. I think it should detect this and ignore the flag (set it back to None), but can we detect the testbed arch soon enough? -
Discuss and implement support for Features: cross
andRestrictions: no-cross
. See relevant thread in this MR. -
Discuss/investigate possibility of setting up the testbed environment for seamless cross building. - I believe this is done? At least provided that the package under test honors
DEB_HOST_*
andDEB_BUILD_*
. Can be tested like this:-
apt source mawk
(known good package) - mangle the latest version in
d/changelog
runner/autopkgtest --debug -a i386 --shell -U /path/to/mawk-1.3.4.20200120/ -- qemu image.img
- once the test ends, jump in the testbed (we specified
--shell
) and verify that the installedmawk
version is a:i386
one and has the version number we expect.
-
- I believe this is done? At least provided that the package under test honors
-
make sure that autopkgtest behaves well when a package can't be cross-tests because of uninstallable dependencies. (See: the trackback @hyask stumbled on while testing armhf gzip on arm64). -
Check that everything is well documented in the relevant places. In particular check that the documentation changes match the code. -
Add cross architecture testing tests. -
Test that AUTOPKGTEST_TESTBED_ARCH
andAUTOPKGTEST_TEST_ARCH
are set unconditionally- done:
test_autopkgtest_arch_variables
- done:
-
Test that DEB_BUILD_ARCH
are set if test arch is foreign- done:
test_autopkgtest_arch_variables_foreign
- done:
-
Test that Restrictions: skip-foreign-architecture
works- done:
test_skip_foreign_skipped
- done:
-
Test that Depends: @
expands to packages with architecture qualifier- done:
test_default_depends_foreign_test
,test_arch_specific_foreign_test
- done:
-
Test that test dependencies from package under test get architecture qualifier - done:
test_depends_own_alternatives
- done:
-
Test that @builddeps@
expands the right build-essentials- done:
test_builddeps_foreign_test
- done:
-
Test that pinned packages get the :any
qualifier in the apt preference -
Maybe: test that testpkg
can actually cross build-
Make testpkg
Architecture: any
- done: !474 (merged)
-
Make it cross build and foreign-arch-test
-
-
-
Once approved:
-
Finalize the Since autopkgtest version [TODO]
sentence indoc/README.package-tests.rst
-
Rebase, squash dirty git history, amend commit message -
Merge
-