918 Commits

Author SHA1 Message Date
Martin Pitt
501aa206d8 autopkgtest tests: Fix trigger version for regressions
It does not make sense to have first a passing and then a failing result for
the same package version and trigger. We should prefer old passing results over
new failed ones for the same version (this isn't done yet, but will be soon).
2015-11-27 16:26:07 +01:00
Martin Pitt
020b3a4977 autopkgtest tests: Add trigger to "passed before" results
Also consistently name them "passedbefore/1" to make them easy to search for.
2015-11-27 12:49:20 +01:00
Martin Pitt
f4a199a300 Move from kombu to amqplib
python3-amqplib already exists in trusty, but python3-kombu does not. This
makes it possible to run britney on a standard trusty without manual backports.
2015-11-27 08:16:55 +01:00
Martin Pitt
de339d3603 run-autopkgtest: With --ppa we usually do not want --trigger, so only require either 2015-11-27 07:31:02 +01:00
Martin Pitt
946a8d874c run-autopkgtest: Accept multiple --ppa options, adjust AMQP parameter
Adjust to AMQP request API change for PPAs:

  https://git.launchpad.net/~ubuntu-release/+git/autopkgtest-cloud/commit/?id=ed35358

Accept multiple --ppa options and submit them as list to the "ppas" test
parameter.
2015-11-25 09:27:10 +01:00
Iain Lane
8f70520823 autopkgtest: Don't repeat "ever_passed" check
We can just add a default value  before the "try" block and then use that as
the default (no results) case.
2015-11-24 14:58:55 +00:00
Martin Pitt
db34217557 Use internal unittest mock version 2015-11-23 14:35:11 +01:00
Didier Roche
ceb4626cd6 Use internal unittest mock version 2015-11-23 14:32:53 +01:00
Martin Pitt
d078b83d17 change "never passed" to "always failed" for consistency 2015-11-23 14:27:18 +01:00
Didier Roche
611760e996 Match as well sent token to ALWAYSFAILED 2015-11-23 14:20:04 +01:00
Didier Roche
51775bd338 Change never passed terminology to match always failed existing one 2015-11-23 14:18:14 +01:00
Iain Lane
289ea7b687 Don't wait for tests which have never passed
They won't ever block promotion, so we might as well make them
candidates right away (but trigger their tests).
2015-11-18 14:38:36 +00:00
Iain Lane
7718350053 Fix typo in test name triggerered -> triggered 2015-11-18 13:36:31 +00:00
Iain Lane
28fd7f5d6d tests: pretty print the excuses so that they are readable 2015-11-18 13:36:23 +00:00
Iain Lane
41da740a98 Add passing results for various tests
We're going to modify britney so that RUNNING tests don't block
promotion if they have never failed - for this we will need to change a
few tests so that the packages being tested have passed before, meaning
that there could potentially be a regression.
2015-11-18 13:36:09 +00:00
Martin Pitt
a6c02fa2e7 Restrict ADT_ARCHES to architectures we actually run for
This makes it simpler to run britney against a PPA with
--architectures='i386 amd64'.
2015-11-17 09:20:47 +01:00
Martin Pitt
6e8ddbb7c4 Split self.options.adt_arches once during initialization
For consistency with all other self.options.*_arches.
2015-11-17 09:15:31 +01:00
Martin Pitt
68b5366d1b tests: Use proper triggers in all tests
Also introduce a tr() shortcut for those. Drop the now redundant
test_rerun_failure_triggers().
2015-11-06 16:51:55 -06:00
Martin Pitt
4c23b25ce2 Autopkgtest: Request one test run per trigger for all packages
Stop special-casing the kernel and move to one test run per trigger. This 
allows us to only install the triggering package from unstable and run the rest
out of testing, which gives much better isolation.
2015-11-06 16:12:01 -06:00
Martin Pitt
1a4a37cb02 Let linux-meta trigger systemd 2015-10-29 22:21:13 +01:00
Martin Pitt
02c4e76c64 run-autopkgtest: Require --trigger argument, improve help 2015-10-26 09:19:05 +01:00
Martin Pitt
0e3434ddbd Autopkgtest: Make has_autodep8 a class method
So that we can use it without having to instantiate a full AutoPackageTest
object.
2015-10-19 12:01:32 +02:00
Martin Pitt
327361bd04 run-autopkgtest: Use Python 3 2015-10-19 11:23:29 +02:00
Martin Pitt
b00b051fab run-autopkgtest: Add --ppa option 2015-10-16 10:14:48 +02:00
Martin Pitt
445e33e9e0 Stop triggering tests by linux, move to -meta
For linux* themselves we don't want to trigger tests -- these should all come
from linux-meta*. A new kernel ABI without a corresponding -meta won't be
installed and thus we can't sensibly run tests against it. This caused
unnecessary and wrong regressions, and unnecessary runs (like linux-goldfish
being triggered by linux).
2015-10-09 17:22:21 +02:00
Martin Pitt
ee7859ea0e Autopkgtest: Don't trigger tests for alternative gcc-*
Sources like gcc-snapshot or gcc-4.7 are not the default compiler any more and
thus triggering kernels etc. is just a waste.
2015-10-08 11:03:39 +02:00
Martin Pitt
1ab16725df Make linux* wait on corresponding -meta package
We want to treat linux-$flavor and linux-meta-$flavor as one set in britney
which goes in together or not at all. We never want to promote linux-$flavor
without the accompanying linux-meta-$flavor.

Introduce a synthetic linux* → linux-meta* dependency to enforce this grouping.
2015-10-08 08:26:59 +02:00
Martin Pitt
0a72e94198 Autopkgtest: Don't re-run passed test results
Test requesting: Don't re-request a test if we already have a result for it for
that trigger (for a relevant version), but there is a new version of the tested
package. First this unnecessarily delays propagation as the test will go back
to "in progress", and second if it fails in the next run this isn't the fault
of the original trigger, but the new version of the tested package.

Result finding: Don't limit acceptable results to the latest version of the
tested package. It's perfectly fine if an earlier version (like the one in
testing, or an earlier upload) was ran and gave a result for the requesting
trigger. If it's PASS, then we are definitively done, and if it's a failure
there is the "Checking for new results for failed test..." logic in collect()
logic which will also accept newer results.
2015-10-07 15:55:46 +02:00
Martin Pitt
6e2f3dbf2a Autopkgtest tests: Consistently make green have an autopkgtest
This was a confusing inconsistency: libgreen1 and green binaries are both built
from the "green" source, so they should consistently declare that they have
"Testsuite: autopkgtest". Adjust the tests accordingly.
2015-10-07 09:07:38 +02:00
Martin Pitt
a9bef9c574 Code layout/copyright fixes
Sort the tests into different categories with comment headers. Bump copyright
years.
2015-10-07 08:49:47 +02:00
Martin Pitt
632f542e63 Autopkgtest: Don't track "ever passed" for kernel triggers, part 2
In addition to not reading ever_passed for kernel triggers, we must also not
write it for those. Otherwise we introduce false regressions for e. g. "dkms"
when some DKMS package always failed on the main kernel but succeeds on one
flavour.
2015-09-30 17:45:12 +02:00
Martin Pitt
30b6af1175 Autopkgtest: Don't track "ever passed" for kernel triggers
We trigger independent tests for every linux/linux-meta* reverse dependencies,
as they run under the triggering kernel. Thus "ever passed" is rather
meaningless for these as we don't want to track this on a per-trigger basis (as
it would be wrong for everything else but kernels). This led to a lot of false
regressions, as some DKMS modules only work on some kernel flavours.

The kernel team is doing per-kernel regression analysis of the test results, so
we don't need to duplicate this logic in britney. Thus effectively disable the
"Regression" state for kernel reverse dependencies, and rely on the kernel
test machinery to untag the tracking bug only if there are no actual
regressions.
2015-09-29 21:42:05 +02:00
Martin Pitt
97da2de23f Autopkgtest: Add test case for re-running failed tests with different triggers 2015-09-29 17:40:45 +02:00
Stéphane Graber
5406df58e8 Disable boot testing 2015-09-25 14:28:15 -04:00
Francis Ginther
2fdbe6e072 Disable boottest. 2015-09-25 11:25:21 -05:00
Martin Pitt
2ba7fd223c Autopkgtest: Trigger LXC from linux only on valid architectures
If the linux source package does not build any binaries on the given
architecture, don't trigger an LXC test for it.
2015-09-23 15:35:37 +02:00
Martin Pitt
effdc25263 autopkgtest.py: Drop unused itertools 2015-09-21 16:30:12 +02:00
Martin Pitt
622115a2fb Autopkgtest: Fix updating results with explicit triggers
When fetching a result with explicit triggers, always update self.results, not
just when we have a pending trigger for it. Otherwise satisfied_triggers will
be empty after reading the first result, and we clobber test results for all
triggers with the latest result.
2015-09-21 16:27:49 +02:00
Martin Pitt
9b70fe361d Autopkgtest: Collect results for requested tests before submitting
When we need to blow away and rebuild results.cache we want to avoid
re-triggering all tests. Thus collect already existing results for requested
tests before submitting new requests.

This is rather hackish now, as fetch_one_result() now has to deal with both 
self.requested_tests and self.pending_tests. The code should be refactored to
eliminate one of these maps.
2015-09-18 06:47:28 +02:00
Martin Pitt
19cd69cb47 Autopkgtest: Track/cache results by triggering package
When downloading results, check the ADT_TEST_TRIGGERS var in testinfo.json to
get back the original trigger that previous britney runs requested the test run
for. This allows us to much more precisely map a test result to an original
test request.

In order to tell apart test results which pass/fail depending on the package
which triggers them (in particular, if that is a kernel), we must keep track of
pass/fail results on a per-trigger granularity. Rearrange the results map
accordingly.

Keep the old "latest test result applies to all triggers of this pkg/version"
logic around as long as we still have existing test results without
testinfo.json.

ATTENTION: This breaks the format of results.cache, so this needs to be removed
when rolling this out.
2015-09-18 06:46:34 +02:00
Martin Pitt
0eddac8476 Autopkgtest: Trim triggered tests for gccgo-5
gccgo-5 exists in Ubuntu 15.04 only and builds all binary packages of gcc-5.
Triggering all tests is pointless and a big waste of test resources, so trim
down the list to actually useful ones. This can be dropped when 15.04 goes EOL.
2015-09-18 06:43:39 +02:00
Martin Pitt
775274ca89 Autopkgtest: Ignore results without package/version
We often get "tmpfail" results (repeated failure to start cloud instance, etc.)
with no package/version at all. Stop attributing them to the latest pending
request for that package, as that has already messed up some results. With
moving to tracking test triggers in testinfo.jar and running multiple test
requests for each triggering kernel version it becomes completely impossible to
interpret anything into a tmpfail result without testpkg-version, so just
ignore them.

This will leave some orphaned entries in pending.txt and thus require manual
retries after fixing the tmpfail reason. But this needs to happen anyway, so
this does not complicate operation but instead shows those as "in progress"
instead of "regression".
2015-09-17 12:31:13 +02:00
Martin Pitt
6af2e9c1dc Autopkgtest: Include triggering package version in test request params
So far we only added the triggering test name. Add the version as well, so that
we'll retain the complete trigger information in result.tar's testinfo.json in
swift. This will allow us to completely reconstruct our results.cache from
scratch without losing any trigger information.

This isn't significantly harder to parse from shell either (in tests): You can
still iterate over $ADT_TEST_TRIGGERS with a "for" loop and split package and
version on '/'.
2015-09-17 11:56:29 +02:00
Martin Pitt
4df8700f8b tests/mock_swift.py: Support adding testinfo.json 2015-09-17 11:05:33 +02:00
Martin Pitt
50673de2d8 autopkgtest: Check for new results on a per-architecture granularity
In collect(), check if there are new results for failed tests on a
per-architecture level. This updates results while tests for other
architectures are still in progress (i. e. in self.pending_tests).
2015-09-17 09:32:35 +02:00
Martin Pitt
49260078e4 autopkgtest: Make Linux -> DKMS triggering arch specific
Only trigger DKMS tests for architectures on which the given kernel actually
exists.
2015-09-16 22:59:05 +02:00
Martin Pitt
76751fff88 autopkgtest: Make tests_for_source() arch specific
So far we've only calculated the reverse dependencies on amd64. This breaks
when triggering packages which do not exist on some architectures, like
bcmwl-kernel-source. It also makes it impossible to e. g. trigger DKMS tests on
armhf only for an ARM-only kernel like linux-ti-omap4.
2015-09-16 17:07:19 +02:00
Martin Pitt
d10763c1f9 Autopkgtest tests: Publish test packages on all architectures by default
This is a prerequisite for introducing per-architecture test calculation.
2015-09-16 16:49:14 +02:00
Martin Pitt
21fec5d92a Only trigger autopkgtests for some key packages for gcc-*
Through the usual reverse dependency triggering, gcc-* usually triggers many
hundreds of (mostly universe) tests via libgccN. But:

 - This does not help to prevent compiler regressions: as all packages are
   built in -proposed anyway, the new compiler is being used immediately, so we
   can't hold it back in -proposed.

 - It does not trigger toolchain tests which actually are affected, most
   importantly binutils and linux.

 - This puts enormous stress onto our test infrastructure.

So special case gcc by triggering binutils and linux, and fglrx-installer as a
typical (and important) example of a DKMS package which also needs a compiler,
and libreoffice as our favourite tool chain stress test to cover libgccN.
2015-09-16 08:03:17 +02:00
Martin Pitt
6591d67c47 autopkgtest: Trigger lxc tests from linux-meta*, not linux
This is more consistent with the DKMS triggers, and will make things easier for
the kernel status matrix.
2015-09-15 15:10:49 +02:00