Skip to content

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 and Restrictions: 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_* and DEB_BUILD_*. Can be tested like this:
      1. apt source mawk (known good package)
      2. mangle the latest version in d/changelog
      3. runner/autopkgtest --debug -a i386 --shell -U /path/to/mawk-1.3.4.20200120/ -- qemu image.img
      4. once the test ends, jump in the testbed (we specified --shell) and verify that the installed mawk version is a :i386 one and has the version number we expect.
  • 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 and AUTOPKGTEST_TEST_ARCH are set unconditionally
      • done: test_autopkgtest_arch_variables
    • Test that DEB_BUILD_ARCH are set if test arch is foreign
      • done: test_autopkgtest_arch_variables_foreign
    • Test that Restrictions: skip-foreign-architecture works
      • done: test_skip_foreign_skipped
    • Test that Depends: @ expands to packages with architecture qualifier
      • done: test_default_depends_foreign_test, test_arch_specific_foreign_test
    • Test that test dependencies from package under test get architecture qualifier
      • done: test_depends_own_alternatives
    • Test that @builddeps@ expands the right build-essentials
      • done: test_builddeps_foreign_test
    • Test that pinned packages get the :any qualifier in the apt preference
    • Maybe: test that testpkg can actually cross build
      • Make testpkg Architecture: any
      • Make it cross build and foreign-arch-test
  • Once approved:

    • Finalize the Since autopkgtest version [TODO] sentence in doc/README.package-tests.rst
    • Rebase, squash dirty git history, amend commit message
    • Merge
Edited by Paride Legovini

Merge request reports

Loading