959 Commits

Author SHA1 Message Date
Martin Pitt
cd3ac8cfbf Autopkgtest: Trim triggered tests for gccgo-6
Similar to commit 504, gccgo-6 builds all binary packages of gcc-5.
2016-02-11 09:56:40 +01:00
Martin Pitt
83f1635e6b Don't use latest timestamp from results.cache if it is shared
When using a shared results cache with PPAs (silos) we cannot rely on the
latest time stamp from the distro's results.cache. As soon as there is a new
run for a package in Ubuntu proper, that updated time stamp hides all previous
results for the PPA, and causes tests to be re-requested unnecessarily.
2016-02-09 16:58:09 +01:00
Martin Pitt
7636d1c862 Remove extra debug logging again
Revert commit 568, LP#1537866 is understood now.
2016-02-09 16:15:26 +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
b5fd32ec7b Fail hard on unexpected HTTP errors
In the CI train we sometimes run into transient "HTTP Error 502: Proxy Error".
As we don't keep a results.cache there, this leads to retrying tests for which
we already have a result in swift, but can't download it. Treat this as a hard
failure now, to let the next britney run try again. This will also tell us if
we need to handle any other status code than 200, 204 (empty result), or 401
(container does not exist).
2016-02-04 15:13:17 +01:00
Martin Pitt
d395524307 mock_swift.py: Use status code 401 on nonexisting container, like the real Swift 2016-02-04 14:08:40 +01:00
Martin Pitt
b2af42ee8b Add more debug logging to investigate LP#1537866 2016-02-03 20:21:27 +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
80a9121f62 show full diff on test failures 2016-01-25 10:39:42 +01:00
Martin Pitt
18dc37dca5 Don't create heidi files if HEIDI_OUTPUT option is empty 2016-01-20 10:16:02 +01:00
Robert Bruce Park
f196cb5ae9 Oops. 2016-01-19 18:16:57 -08:00
Robert Bruce Park
e2425bb6fb Make Heidi optional. 2016-01-19 17:33:01 -08: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
Robert Bruce Park
fbb4293091 Stop setting artifacts link if log is running.shtml. 2016-01-19 12:05:32 -08:00
Robert Bruce Park
7478b80b85 Iterate. 2016-01-19 11:34:12 -08:00
Robert Bruce Park
b2ed1ce367 Fix URL. 2016-01-19 11:25:04 -08:00
Robert Bruce Park
e412932daf Set artifacts link if ADT_PPAS is defined. 2016-01-19 11:08:11 -08:00
Didier Roche
b17221164f Add new env, test-git and test-bzr parameters to run-autopkgtest 2016-01-08 15:52:36 +01: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
7fc34b1ab6 Autopkgtest: Do not leak full AMQP url to log, it contains a password 2015-12-15 06:43:35 +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
6d0c3a1fa6 Autopkgtest: Keep the actual run IDs
Don't clobber passed run IDs with newer failed results. This is potentially a
bit more expensive as we might re-fetch failed results at every run after a
PASS, but the IDs in our cache will be correct so that we can expose them in
the UI.
2015-12-08 14:17:58 +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
19883522b3 Fix crash from previous hint reorganization
Traceback (most recent call last):
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3380, in <module>
    Britney().main()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 3329, in main
    self.write_excuses()
  File "/home/ubuntu-archive/proposed-migration/code/b2/britney.py", line 1992, in write_excuses
    upgrade_me.remove(e.name)
ValueError: list.remove(x): x not in list
2015-12-04 18:17:27 +01:00
Martin Pitt
855387b013 Provide default if ADT_PPAS option is absent 2015-12-04 17:51:06 +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
ea1c335992 Autopkgtest: Simplify test request and result retrieval workflow
Splitting up the processes of request(), submit(), and collect() makes our data
structures, house keeping, and code unnecessarily complicated. Drop the latter
two and now do all of it in just request(). This avoids having to have a
separate requested_test map, having to fetch test results twice, and gets rid
of some state keeping.
2015-12-01 23:57:52 +01:00
Martin Pitt
f94c2c0ade Autopkgtest: Drop trigger argument from fetch_swift_results()
This could have led to (re-)fetching results more than once when we only got
the latest ID from the few triggers we were currently looking at, not for all
possible triggers of a package. Drop this kludge, and replace it with a proper
full iteration and caching.
2015-12-01 23:05:00 +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
5714690df4 autopkgtest.py: Drop unused function 2015-12-01 08:39:10 +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
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