Make cranky chroot backwards compatible:
1) If a new session is not found, try to find an old one and operate
on that.
2) Parse the old sources|configs commandline option (but ignore it).
Emit deprecation warnings for the above and add a deprecation notice to
the script usage.
Users can specify chroot session names (appended to the normal chroot
prefixes) using the --which option, like the old <sources|configs>. If
left out, it will create a default session.
The kernel series can be specified with: only the series, the handle,
or a path. If the series is omitted, it tries to infer the series from
the current directory.
Some help messages have been updated accordingly.
https://warthogs.atlassian.net/browse/KERNTT-724
Signed-off-by: Noah Wager <email address hidden>
[juergh: Limited the commit to adding --which commandline argument,
trimmed the commit message.]
Signed-off-by: Juerg Haefliger <email address hidden>
cranky: chroot: add option to run as different user
`cranky chroot run <handle> -u <user> -- <cmd>` will run the commands in
the chroot as the specified user. This is helpful if e.g. you want to
run as root to add packages.
From Juerg Haefliger: cranky chroot splits `sources` and `configs` session
types in case the sessions have differences, but this is not the case.
Remove the separation in favor of a single session per series.
adt-matrix: Include main linux package version in triggers for retry
For dkms modules that do not have any specific tests, the matrix will run
`dkms-autopkgtest` (part of dkms source) which consists of building the
module only. The test will run only if the `trigger` parameter contains
the linux main package version because it expects the following version
format:
linux-<derivative>/<kernel_version>-<abi_version>.<upload_version>
For retry, the `trigger` param consists of only meta version which has the
following format:
linux-<derivative>/<kernel_version>.<abi_version>.<upload_version>
which contains a dot instead of a '-' and prevents the test from
running and it marks it as 'Passed'.
Fix this by including the main version for retries too.
Note: When the test is triggered for the first time, the main version is
included, that's why the first run is always correct. The problem appears
only for retries. This broken logic prevents dkms builds failures from
being properly detected if the test is rerun (which usually happens because
people try the test 1-2 times before confirming if there's an issue)
adt-matrix: Include main linux package version in triggers for retry
For dkms modules that do not have any specific tests, the matrix will run
`dkms-autopkgtest` (part of dkms source) which consists of building the
module only. The test will run only if the `trigger` parameter contains
the linux main package version because it expects the following version
format:
linux-<derivative>/<kernel_version>-<abi_version>.<upload_version>
For retry, the `trigger` param consists of only meta version which has the
following format:
linux-<derivative>/<kernel_version>.<abi_version>.<upload_version>
which contains a dot instead of a '-' and prevents the test from
running and it marks it as 'Passed'.
Fix this by including the main version for retries too.
Note: When the test is triggered for the first time, the main version is
included, that's why the first run is always correct. The problem appears
only for retries. This broken logic prevents dkms builds failures from
being properly detected if the test is rerun (which usually happens because
people try the test 1-2 times before confirming if there's an issue)