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

Re: Request for Rawtran packaging review



Filip Hroch <hroch@physics.muni.cz> writes:
> On Tue, 2016-04-05 at 08:53 +0200, Ole Streicher wrote: 
>> One point here is however that the CI test as you specified it does not
>> work: the source directory is readonly during the tests. And the build
>> environment (namely gcc, make and such) is not installed by default
>> there, it should be specified in the Depends fields of
>> debian/tests/control.
>
> It is possible that the source directory is read only. But the test
> directory must be read write to be able create test files (.fits in
> this case) so I understand that all contents of the package is copied
> to the rw directory and tests are run within it.

The CI tests define a directory that is writable ($ADTTMP), but they
unpack the sources into a directory that is then set readonly, and chdir
into this. So, you cannot issue a "./configure; make" there. You need to
do the compilation in the $ADTTMP directory.

> I test the feature with reccomended command:
>
> adt-run --output-dir /tmp/output-dir ./ --- null
>
> passing -s (--shell) option which provides the development
> environment. It shows that the build tests works clearly.

This does not set the source directory readonly. See [1]:

| The cwd of each test is guaranteed to be the root of the source
| package, which will have been unpacked but not built. *However* note
| that the tests must test the *installed* version of the program. Tests
| may not modify the source tree (and may not have write access to it).

> I see only one problem: I omit of Build-depends because all the tools
> (gcc, make) are installed on my machine.

This is the other problem. They should be specified in the Depends:
field, along with libcfitsio-dev (for fitsio.h).

>> Since your package already contains an executable: wouldn't it be better
>> in the CI test just to create the fits file with rawtran, and then check
>> some headers (and, if you know it, the content)? You could use f.e. the
>> "fitshdr" command from wcslib-tools for that. Or astropy.
>
> Yes. Astropy is the solution in case of read only tests. But I prefers
> the more simple and clear way via C. The upstream needs only plain C
> compiler and any other dependence can importantly complicate life of
> potential users. On the other side, it is not a good idea to maintain
> two identical test suites in C and Python.

It is your decision; I will upload whatever you specify as a
test. You should, however, build the "fitslint" executable and do the
conversion in $ADTTMP instead of the source directory.

Best regards

Ole

[1] http://anonscm.debian.org/gitweb/?p=autopkgtest/autopkgtest.git;a=blob_plain;f=doc/README.package-tests.rst;hb=HEAD


Reply to: