116 Commits

Author SHA1 Message Date
Martin Pitt
e59a32106f Make force-badtest hints apply to running tests
Sometimes it's desirable to force a test while it is still in progress - maybe
for an infrastructure bug, or maybe because you just don't want to wait that
long for another reason.
2016-05-09 11:24:08 +02:00
Martin Pitt
e43cec8fad Make force-badtest hints apply to lower versions
We usually bump force-badtest versions for the devel series, which can cause
apparent regressions in stable tests, or when running tests against
devel-release when bumping the version for devel-proposed.
2016-05-09 10:26:34 +02:00
Martin Pitt
f9802e9b49 tests/test_autopkgtest.py: some PEP-8 fixes 2016-04-04 17:10:28 +02:00
Martin Pitt
cbb79a9171 Don't show versions of autopkgtests if they are all running
If a particular test is running on all architectures, the tested version is not
very useful and often even wrong, as we can't yet predict which version will
actually be used (sometimes from testing, sometimes from unstable depending on
apt pinning). So only show it once we have at least one result.
2016-04-04 17:05:39 +02:00
Martin Pitt
f4ca9d9775 Add test for version that is newer in testing 2016-03-29 15:02:39 +02:00
Martin Pitt
e7b1c6fe25 tests: Verify that "Not considered" or "Valid candidate" appears in excuses 2016-03-29 14:50:42 +02:00
Martin Pitt
cc46972caa Run/show autopkgtests for force-skiptest again
Revert commit 551/bug 1522893 again, as we still want to see test results even
for force-skip'ed packages in some cases.

In cases where we really don't want to run the tests at all, we need to flush
the AMQP queues manually and remove pending.json after the package got
accepted.
2016-03-21 10:47:47 +01:00
Martin Pitt
f4fd77c9ed Send PPA test requests into PPA AMQP queues
This separates them from Ubuntu and upstream test requests, avoids that any of
those can completely starve the other two, and makes queues easier to manage.
2016-03-03 12:49:35 +01:00
Martin Pitt
dd1cb74cab Add autopkgtest test case for different tested package versions on different architectures 2016-02-25 16:33:18 +01:00
Martin Pitt
f056f2afce Add version-independent per-architecture force-badtest hints
Some tests are known-broken on a particular architecture only.
force-badtest'ing the entire version is overzealous as it hides regressions on
the other architectures that we expect to work. It's also hard to maintain as
the version has to be bumped constantly.

Support hints of the form "force-badtest srcpkg/architecture/all" (e. g.
"force-badtest chromium-browser/armhf/all"). The special version "all" will
match any version.
2016-02-25 14:14:14 +01:00
Martin Pitt
4fa1220bfd Support force-{bad,skip}test hints for multiple versions 2016-02-25 14:12:14 +01:00
Martin Pitt
cacd7d7667 Autopkgtest: Show force-badtest results more prominently
Add new state "IGNORE-FAIL" for regressions which have a 'force' or
'force-badtest' hint. In the HTML, show them as yellow "Ignored failure"
(without a retry link) instead of "Regression", and drop the separate
"Should wait for ..." reason, as that is hard to read for packages with a long
list of tests.

This also makes retry-autopkgtest-regressions more useful as this will now only
run the "real" regressions.
2016-02-25 09:45:33 +01:00
Martin Pitt
c9f7ef6fce Adjust URL for retrying failed tests
retry.cgi is now request.cgi.
2016-02-16 10:18:43 +01:00
Martin Pitt
b20421efc3 Add retry links to PPA excuses
autopkgtest-retrier supports "ppa=" GET arguments now.
2016-02-04 21:54:53 +01:00
Martin Pitt
2e393a0c31 Add option for using a shared r/o results.cache
This is needed by the CI train, where we

  (1) don't want to cache intermediate results for PPA runs, as they might
      "accidentally" pass in between and fail again for the final silo,

  (2) want to seed britney with the Ubuntu results.cache, to detect regressions
      relative to Ubuntu.

Introduce ADT_SHARED_RESULTS_CACHE option which can point to a path to
results.cache. This will then not be updated by britney.
2016-01-27 12:01:00 +01:00
Martin Pitt
158d79999f Fix KeyError crash with NBS binaries in testing
Traceback (most recent call last):
   File "/var/lib/britney/britney.py", line 3390, in <module>
     Britney().main()
   File "/var/lib/britney/britney.py", line 295, in __init__
     self.merge_binaries('testing', 'unstable', arch)
   File "/var/lib/britney/britney.py", line 785, in merge_binaries
     target_version = target_sources[value[SOURCE]][VERSION]
 KeyError: 'insighttoolkit4'
2016-01-27 09:57:55 +01:00
Martin Pitt
6269ca4813 Drop boottest support
This was a giant copy&paste, was disabled four months ago, and the
infrastructure for this ceased to exist.

If this comes back, the AutoPackageTest class should be generalized to also
issue phone boot tests (exposed as new architectures, which should then be
called "platforms"), to avoid all this duplicated code.
2016-01-27 09:34:22 +01:00
Martin Pitt
ec420195bc Add retry links to autopkgtest regressions
Generate https://autopkgtest.ubuntu.com/retry.cgi links for re-running tests
that regressed.

Change Excuse.html() back to usual % string formatting to be consistent with
the rest of the code.
2016-01-25 11:21:16 +01:00
Martin Pitt
40d12bfc74 Add link to the autopkgtest artifacts for PPA runs
For PPA runs we don't have autopkgtest.u.c., thus stop linking to it and
instead directly link to the test artifacts.
2016-01-19 21:32:16 +01:00
Robert Bruce Park
7ad23cdfdd Add & fix tests. 2016-01-19 12:22:51 -08:00
Martin Pitt
2b61398004 Skip second-stage upgrade testing if UPGRADE_OUTPUT option is absent or empty
This is useful to speed up britney in dry run mode, if we are only interested
in builds and package tests.
2015-12-18 16:37:23 +01:00
Martin Pitt
a4f3abacad Add direct log link to excuses
If we have a result, directly link to the log file on swift in excuses.html.
The architecture name still leads to the package history as before.
If result is still pending, link to the "running tests" page instead.
2015-12-14 16:57:19 +01:00
Martin Pitt
123eb43320 Autopkgtest: Use correct Swift container for ADT_PPAS
When using ADT_PPAS, the results won't go into the "autopkgtest-%SERIES"
container but into the PPA specific "autopkgtest-%SERIES-LPUSER-PPANAME" one.
2015-12-14 10:58:02 +01:00
Martin Pitt
d81f6542b9 test_autopkgtest.py: Rename class to just "T" for easier running of selected tests 2015-12-08 13:07:16 +01:00
Martin Pitt
fc4ea9d159 Process force-skiptest hint before requesting tests
If a package has a force-skiptest hint, don't request autopkgtests for it.
2015-12-04 17:45:06 +01:00
Martin Pitt
ba77e95c04 Autopkgtest: Reorganize pending test maps
- Invert the map to go from triggers to tested packages, instead of the other
   way around. This is the lookup and update mode that we usually want, which
   simplifies the code and speeds up lookups. The one exception is for fetching
   results (as that is per tested source package, not per trigger), but there
   is a FIXME to get rid of the "triggers" argument completely.

 - Stop tracking tested package versions. We don't actually care about it
   anywhere, as the important piece of data is the trigger.

 - Drop our home-grown pending.txt format and write pending.json instead.

ATTENTION: This changes the on-disk cache format for pending tests, so
pending.txt needs to be cleaned up manually and any pending tests at the time
of upgrading to this revision will be re-run.
2015-12-01 15:20:40 +01:00
Martin Pitt
b426244840 Autopkgtest: Reorganize results map
- Invert the map to go from triggers to tested versions, instead of from
   tested versions to triggers. This is the lookup and update mode that we
   usually want (except for determining "ever passed"), thus this simplifies
   the code and speeds up lookups.

 - Drop "latest_stamp" in favor of tracking individual run IDs for every
   result. This allows us in the future to directly expose the run IDs on
   excuses.{yaml,html}, e. g. by providing direct links to result logs.

 - Drop "ever_passed" flag as we can compute this from the individual results.

 - Don't track multiple package versions for a package and a particular
   trigger. We are only interested in the latest (passing) version and don't
   otherwise use the tested version except for displaying.

This requires adjusting the test_dkms_results_per_kernel_old_results test, as
we now consistently ignore "ever passed" for kernel tests also for "RUNNING"
vs.  "RUNNING-ALWAYSFAILED", not just for "PASS" vs. "ALWAYSFAIL".

Also fix a bug in results() when checking if a test for which we don't have
results yet is currently running: Check for correct trigger, not for the
current source package version. This most probably already fixes LP: #1494786.
Also upgrade the warning about "result is neither known nor pending" to a grave
error, for making it more obvious to debug remaining errors with this.

ATTENTION: This changes the on-disk format of results.cache, and thus this
needs to be dropped and rebuilt when rolling this out.
2015-12-01 11:50:16 +01:00
Martin Pitt
ca8bd037b0 Rename state RUNNING-ALWAYSFAILED to RUNNING-ALWAYSFAIL
This is consistent with the other "ALWAYSFAIL" state.
2015-12-01 11:48:51 +01:00
Martin Pitt
25a74f7bcd autopkgtest tests: Fix triggers for test cases
We don't want to accept a result for an older package version than what the
trigger says.

Also drop two repeated (and thus unnecessary) results in set_results().
2015-12-01 11:06:29 +01:00
Martin Pitt
23b5ac0116 Stabilize TestAutoPkgTest.test_ppas test case
The test params dictionary order might sometimes be the other way around.
2015-11-30 10:39:49 +01:00
Martin Pitt
400f4087bb Add ADT_PPAS option for adding PPAs to autopkgtest requests
For using britney on PPAs we need to add the "ppas" test parameter to AMQP
autopkgtest requests. Add ADT_PPAS britney.conf option which gets passed
through to test requests.
2015-11-30 10:17:04 +01:00
Martin Pitt
2ebfc0bb8f Stop accepting results without recorded trigger
In situations where we don't have an up to date existing results.cache, the
fallback for handling test results would attribute old test results to new
requests, as we don't have a solid way to map them. This is detrimental for ad
hoc britney instances, like for testing PPAs, and also when we need to rebuild
our cache.

Ignore test results without a package trigger, and drop the code for handling
those.

The main risk here is that if we need to rebuild the cache from scratch we
might miss historic "PASS" results which haven't run since we switched to
recording triggers two months ago. But in these two months most of the
interesting packages have run, in particular for the development series and for
stable kernels, and non-kernel SRUs are not auto-promoted anyway.
2015-11-27 16:36:28 +01:00
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
Didier Roche
611760e996 Match as well sent token to ALWAYSFAILED 2015-11-23 14:20:04 +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
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
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
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