Hi Drew,
That is actually fairly easy!
When running the tests, is there a standard way to obtain information
about what is being tested, or to pass in such information?
To explain, suppose that I define a simple runner script called
'AutoTest' that would be part of the "-tutorials" subpackage, since
those are the best ones for testing if the installation is successful.
This means that in my source tree I would have something like this,
/some/build/path/debian/tests/control
/some/build/path/tutorials/AutoTest
but also
/installed/path/tutorials/AutoTest
Do I hard-code the /installed/path/tutorials into the tests/control ? or
should these be the ones local to the build directory (ie,
/some/build/path/tutorials/AutoTest) ?
I checked the env, but the only seeming relevant entry was
AUTOPKGTEST_ARTIFACTS, which seems to be an empty directory.
When specifying the tests/control, I need them to depend both on the
first binary package being built as well as the tutorials. So a syntax
like this is what I want:
Depends: @, @-tutorials
(obviously doesn't work).
On 2020-04-18 04:43, Drew Parsons wrote:
debci tests are run in a chroot.
But for testing locally (i.e. simply running the tests), you can invoke
autopkgtest -B -- null
It may give some differences from a chroot run depending on what else
you've got installed on your system, but it saves the hassle of
maintaining a chroot.
On 2020-04-18 01:59, Mark Olesen wrote:
I started looking at package tests and some of tutorial information (eg,
https://people.debian.org/~mpitt/autopkgtest/README.running-tests.html
and https://ci.debian.net/doc/file.TUTORIAL.html).
As usual, there is lots of information, but not really sure what is
the most applicable. These tests, for example,
https://salsa.debian.org/science-team/openfoam/-/tree/master/debian%2Ftests
Which particular invocation of autopkgtest would be used for these?
It looks like they are testing on the installed package, or is there a
chroot hidden somewhere and they actually run with the built
debian/prefix/package.. hierarchy?
Since the included tests are very similar, I wanted to wrap them in a
simple "AutoTest" utility in the upstream. However, I'm not sure which
environment or other conditions are passed in there.
Any help would be appreciated.
Cheers,
/mark
--
Dr Mark OLESEN
Principal Engineer, ESI-OpenCFD
Engineering System International GmbH | Einsteinring 24 | 85609 Munich
Mob. +49 171 9710 149
www.openfoam.com | www.esi-group.com | [email protected]