Open ndim opened 3 years ago
OK, regarding easier to implement... well... teaching tests/testsuite
to skip some tests if necessary is not that difficult.
Possible parts of an implementation:
if HAVE_EXIF
else
endif
exporting an env var like SKIP_TESTS=test037
to the testsuite
process, or TEST_FEATURES="exif foo bar"
.tests/data/*.param
files could contain SKIP_UNLESS=exif
which testsuite
then needs to honor.SKIP_UNLESS
value threatens to need a boolean expression of TEST_FEATURES
, I would tend towards implementing the boolean complexity using nested if HAVE_FOO
AM_CONDITIONAL
s and then passing a single identifier string for that boolean expression via TEST_FEATURES
, which would then be used as the value of SKIP_UNLESS
.If we anticipate other test cases which could make use of that kind of mechanism, I would implement it.
On the other hand, the goal of reducing build complexity would be best served by always requiring libexif
.
Describe the bug
As described in https://github.com/gphoto/gphoto2/issues/420, the
gphoto2
tests/testsuite
bash script runs itstest037
unconditionally, which means that the test suite requires thatgphoto2
is built withlibexif
support.However, the buildsystem and the
gphoto2
source code still support buildinggphoto2
withoutlibexif
support.libgphoto2 and gphoto2 version
To Reproduce Steps to reproduce the behavior:
configure
pkg-config
during theconfigure
run, remove theHAVE_LIBEXIF
definition fromconfig.h
to trick the build into building withoutlibexif
support.make check
make check
has not updatedconfig.h
with anHAVE_LIBEXIF
definitionPossible resolutions
Either
tests/testsuite
shell script to teach it about skipping some tests under some build conditionslibexif
from optional to mandatory (looks easier to implement, and reduces the overall complexity of the build)I do not want to make that decision on my own.