900 Commits

Author SHA1 Message Date
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
Martin Pitt
b869202457 run-autopkgtest: Add --trigger option 2015-09-15 12:25:28 +02:00
Martin Pitt
2aa0948250 autopkgtest: Request separate tests for linux-meta* triggers
If a package gets triggered by several sources, we can ordinarily run just one
test for all triggers. But for proposed kernels we want to run a separate test
for each, so that the test can run under that particular kernel.
2015-09-14 16:07:44 +02:00
Martin Pitt
16f4d7c8b2 AutoPackageTest.submit(): Factor out calculation of requests 2015-09-14 15:51:46 +02:00
Martin Pitt
fa389b2e53 tests/mock_swift.py: Fix ResourceWarning due to unclosed log file 2015-09-14 15:15:37 +02:00
Martin Pitt
90596ff8b0 autopkgtest: Include triggering packages in AMQP requests
With this, tests can do special things when they get triggered by a particular
package. E. g. "linux" or "gcc" could skip their "rebuild myself" test if they
were triggered by a new version of themselves (as opposed to a new binutils).
This is particularly aimed at DKMS tests which need to install the triggering
kernel (e. g. -generic vs. -generic-lts-backport-XXX).
2015-08-31 14:30:07 +02:00
Martin Pitt
c195f87ba5 autopkgtest: Trigger lxc tests for linux updates
New kernels are prone to break LXC. In https://bugs.debian.org/779559 there is
a proposal for a flexible approach to add extra "reverse test dependencies".
Hardcode this trigger until this gets implemented.
2015-08-28 06:58:12 +02:00
Martin Pitt
ec83f7aaff autopkgtest: Trigger DKMS packages for linux-meta-* backports too 2015-08-28 06:44:12 +02:00
Martin Pitt
f803604274 Enable ppc64el in ADT_ARCHES 2015-08-26 16:25:25 +02:00
Martin Pitt
78aa12994c autopkgtest: Trigger DKMS packages for new linux-meta uploads
By the kernel team's request we want to trigger DKMS package tests on new
kernel uploads, to ensure that we don't regress them with newer kernels.

Pretend that linux-meta builds the "dkms" binary, so that the existing reverse
dependency magic takes care of the actual triggering.

Note that this needs to be "linux-meta", not "linux", so that tests will
actually use the new kernel (via dist-upgrade).
2015-08-26 16:24:13 +02:00
Martin Pitt
0dfde694a9 make tests/test_* executable 2015-08-26 15:29:49 +02:00
Martin Pitt
39dc24ec71 Change autopkgtest tests to check YAML instead of HTML
Matching the HTML for regexps does not work reliably when we have multiple
unstable packages of which only some are valid candidates but others aren't. It
also imposes a too strict test on the particular formatting when we are only
interested in the actual data and structure.

So move towards checking the machine parseable YAML instead and read that into
a proper Python dict.

This exposed a bug uncovered by test_rdepends_unbuilt() which we previously
missed because we couldn't check triggered tests per package.
2015-08-25 17:11:14 +02:00
Martin Pitt
358920c395 Add missing force-{bad,skip}test data to excuses (for the YAML) 2015-08-25 13:34:41 +02:00
Martin Pitt
71b07bc66a Add structured test results to Excuse objects
Add Excuse.addtest() for adding a test type/package/arch/result, so that the
excuses YAML will get structured test results instead of pre-formatted HTML.
Move the HTML rendering into Excuse.html() instead.

This supports a "test type" whose only value is "autopkgtest" right now, but
we will have "bootest", perhaps "piuparts" and other tests in the future.

Drop the "(<ver> is unbuilt/uninstallable)" note from excuses.html as this is
really a per-architecture property, not a per-tested-source one. This needs to
be re-thought and generalized.
2015-08-25 12:21:51 +02:00
Martin Pitt
66f6a066d2 Use only i386 and amd64 for autopkgtest tests 2015-08-25 11:46:33 +02:00
Martin Pitt
751989565e Enable armhf in ADT_ARCHES 2015-08-25 10:32:03 +02:00
Martin Pitt
c5f6ad6452 python-apt/precise workaround: Don't prematurely close TagFile fd
Don't close underlying fd right after opening an apt_pkg.TagFile, as that will
prematurely end the iteration. This seems to work with more recent python3-apt,
but not with Ubuntu 12.04 LTS.
2015-08-24 20:46:52 +02:00
Martin Pitt
32f33baf09 Merge with trunk, port to Python 3 2015-08-24 20:46:42 +02:00
Martin Pitt
c59033afae autopkgtest: Check for existing test results for unstable version too
r472 added >= version matching to the results evaluation. But we also must do
this in add_test_request() so that we avoid requesting a test for the testing
version over and over again if we get results for the unstable version only.
But here it is enough to only check the requested version and the unstable
version (if that's higher).
2015-08-24 10:58:27 +02:00