← Back to team overview

canonical-ci-engineering team mailing list archive

Re: Restricting dep8 tests to run on the phone

 

Francis Ginther [2014-12-09  9:43 -0600]:
> Is there a specific pattern for this?

I'd say @unittest.skipIf() and related, or the main() could just exit
with 0 if they don't see something which they expect. In the simplest
case this could just be subprocess.call(['pidof', 'unity8']) == 0, but
that would be quite limiting: most things don't actually need unity8.

For many tests, "'UPSTART_SESSION' in os.environ" could be an adequate
check, but it really depends on the test I'd say.

I wouldn't overzealously limit tests to "must be run on the phone" as
this would just needlessly forbid running them in containers, on your
desktop, or similar uses.

> I think this is the core issue at hand. AIUI, these new tests are
> being written with the assumption that they will be executed
> directly on a phone via adt-run and they will fail if executed under
> britney and therefore fail promotion.

That is, "if they run in a minimal VM". So indeed we need to get our
infrastructure to the point where we can actually run the tests, and
then we can teach britney to DTRT depending on Classes:

But they won't fail promotion -- an autopkgtest which never succeeded
just counts as "broken" and isn't considered. We only block on
regressions, i. e. if the test ever succeeded.

Martin

-- 
Martin Pitt                        | http://www.piware.de
Ubuntu Developer (www.ubuntu.com)  | Debian Developer  (www.debian.org)


Follow ups

References