[Patch] test doesn't use the correct paths
When building the dia package under Debian, Debian's dh_auto_test
will run among other things make check-local
in each subdirectory of dia's source code distribution.
In particular this will execute make check-local
inside the tests
subdirectory, where this will run the test
target:
$ cat tests/Makefile.am
[...]
# rum make test as part of make check
check-local: test
[...]
The test
target:
- will run dia
- will lint a shape file (as far as I understand)
- and will run the
objects
test
$ cat tests/Makefile.am
[...]
test: $(TEST_PROGS)
../app/run_dia.sh $(top_srcdir)/samples/render-test.dia --export=rt.shape && \
xmllint --dtdvalid $(top_srcdir)/doc/shape.dtd rt.shape && rm rt.shape && rm rt.png
./objects ../objects//
[...]
The problem here is, while the run_dia.sh
script will correctly set component paths via environment variables (that is DIA_SHAPE_PATH
, DIA_LINE_PATH
et al. - see #5 for a request and patch to document these variables), the objects
script does not set those paths correctly. The result is, that the objects
test will run its test with components from the default dia paths which is /usr/share/dia
on my system here. If that path contains components that fail the tests - such as the shape files installed by Debian's dia-shapes package - then the objects
test will fail.
This is the case under Debian, and that is why the Debian build dependencies contain an explicitly declared conflict with the dia-package:
$ cat debian/control
[...]
Build-Conflicts: autoconf2.13,
dia-shapes
[...]
It would be better though if dia's tests during the build would run against the contents of it's own source code distribution exclusively and not against any locally installed, potentially buggy components. Also running the tests against any external components makes the test non-idempotent (aka on a clean system the build will not find anything under /usr/share/dia
, however after make install
/usr/share/dia
will be populated.