[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: CI tests



On 2015-04-09 09:33, Ole Streicher wrote:
> for one of my packages (python-astropy), I want to create a Continuous
> Integration test. However, I seem to not understand some basics:
> 
> * Are the tests done with the installed package, or with the installed
>   sources, or both?

The tests are supposed to be executed against the installed package. So
if upstream provides a test suite, you may need to modify it
accordingly. For example, if the test suite invokes ./build/foobin, you
should adapt the test to use foobin from $PATH instead.

> * I would need just one one-liner per test, so my debian/tests/control
>   file looks like:
> 
> --------------------------8<-----------------------------
> Test-Command: python -c "import astropy; astropy.test()"
> Depends: python-astropy
> 
> Test-Command: python3 -c "import astropy; astropy.test()"
> Depends: python3-astropy
> --------------------------8<-----------------------------

Looks right to me.

>   Is this enough? Shall I "cd $ADTTMP" before (or what is the cwd when
>   the test starts)?

I would do that, in order to be safe. You start out in the root of your
source package, so if there is a directory 'astropy' in there, the
"import astropy" will try that first instead of the 'astropy'
as-installed. 

Furthermore, it is my understanding that if you need to write something,
you should do it in $ADTTMP. For example, even with the 'rw-build-tree'
restriction, there are limits to what you are allowed to do to the
original source.

Using $ADTTMP in general seems like a good idea though. It provides some
isolation, and simplifies cleanup.

> * On which distribution is CI run? unstable? testing? experimental?
>   Does it run on non-free or contrib distriutions?

Looking at http://ci.debian.net/data/status/, it looks as if tests are
run only on unstable/amd64. Sorry, no idea about contrib and non-free...

Regards,
Christian


Reply to: