simplify command line by only allowing exactly one test argument

Bug #1453509 reported by Jean-Baptiste Lallement on 2015-05-10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
autopkgtest (Debian)
Fix Released
autopkgtest (Ubuntu)
Martin Pitt

Bug Description

autopkgtest for a dkms module with autodep8.

Content of local control file:
Test-Command: /non-existent
Restrictions: needs-root, allow-stderr
Depends: dkms

This command fails (as expected)
adt-run -d --override-control=dkms/dkms.control asic0x --- qemu adt-vivid-amd64-cloud.img

But this command passes:
adt-run asic0x -d --override-control=dkms/dkms.control --- qemu adt-vivid-amd64-cloud.img

In the second case, the test uses the control file generated by autodep8 instead of the control file provided on the command line.

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: autopkgtest 3.14
ProcVersionSignature: Ubuntu 3.19.0-16.16-generic 3.19.3
Uname: Linux 3.19.0-16-generic x86_64
ApportVersion: 2.17.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Sun May 10 11:03:40 2015
InstallationDate: Installed on 2013-09-03 (613 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130902)
PackageArchitecture: all
SourcePackage: autopkgtest
UpgradeStatus: No upgrade log present (probably fresh install)

Jean-Baptiste Lallement (jibel) wrote :
description: updated
Martin Pitt (pitti) wrote :

adt-run is designed to run an arbitrary number of tests on the command line; see the manpage:

           Unless stated otherwise, these affect all subsequent test arguments.

    (-B, --built-binaries, --control-override)

For the record, I think that makes command line parsing and understanding unnecessarily complex and introduces this kind of positional dependency. But it has been adt-run's CLI interface since pretty much day one, so I'm a bit hesitant to change it. IIRC Rodney Dawes was complaining about this as well a while ago, subscribing him for his interest.

I retitle this to rearrange the CLI to only accept exactly one test, then the test modifications like --built-binaries, --control-override, or --click-source can occur anywhere.

Changed in autopkgtest (Ubuntu):
importance: Undecided → Wishlist
status: New → Triaged
summary: - autopkgtest behaves differently depending on the order of the arguments
+ simplify command line by only allowing exactly one test argument
Jean-Baptiste Lallement (jibel) wrote :

I understand but it is annoying for the case you're using the same configuration file for several packages and just want to change the name of the package.

For example, if the configuration file contains:

And the user wants to specify the package on the command line, you have to use this order: adt-run <PACKAGE> @cfg
In this case adt uses the control file of the package instead of the override.

The other option is to change the configuration file to include the name of the package for each package.

Vincent Ladeuil (vila) wrote :

FWIW, I also felt into related traps and I have not encounter a use case for multiple test arguments. So +1 to have a single one.

Changed in autopkgtest (Debian):
status: Unknown → New
Martin Pitt (pitti) on 2016-04-24
no longer affects: autopkgtest (Debian)
Martin Pitt (pitti) wrote :
Changed in autopkgtest (Ubuntu):
status: Triaged → In Progress
assignee: nobody → Martin Pitt (pitti)
Changed in autopkgtest (Debian):
status: Unknown → New
Martin Pitt (pitti) on 2016-06-05
Changed in autopkgtest (Ubuntu):
status: In Progress → Fix Committed
Changed in autopkgtest (Debian):
status: New → Fix Committed
Changed in autopkgtest (Debian):
status: Fix Committed → Fix Released
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package autopkgtest - 4.0+git1

autopkgtest (4.0+git1) yakkety; urgency=medium

  * Skip tests/autopkgtest NullRunner.test_apt_source_nonexisting test instead
    of failing if there are no deb-src apt sources configured on the host.

autopkgtest (4.0) unstable; urgency=medium

  * Add new "autopkgtest" CLI. This provides a simplified CLI compared to the
    now deprecated adt-run:
    - It accepts only exactly one tested source package, and gives a proper
      error if none or more than one (often unintend) is given
    - It defaults to the current directory if that is a Debian source package
    - The order of arguments is not relevant any more
    - Built vs. unbuilt tree is now automatically detected
    - The explicit --source, --click-source etc. options are gone, the type of
      tested source/binary packages is detected automatically
    - The virtualization server is now separated with a double instead of a
      tripe dash, as the former is standard Unix syntax.
    - The virtualization server must be specified with its "short" name only,
      e. g. "ssh" instead of "adt-virt-ssh".
    The old "adt-run" CLI will still be available for some time.
    (Closes: #795274, LP: #1453509)
  * Rename adt-build* tools to autopkgtest-build* and build images prefixed
    with"autopkgtest" instead of "adt". Keep compatibility symlink for the old
    commands, and when being called through them, also produce images with the
    old adt* names.
  * Rename public ADT_* env vars to AUTOPKGTEST_*:
    As these are being used in existing tests and tools, also export/check
    those under their old ADT_* name.

 -- Martin Pitt <email address hidden> Thu, 09 Jun 2016 08:12:49 +0200

Changed in autopkgtest (Ubuntu):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.