diff options
author | David Herrmann <dh.herrmann@gmail.com> | 2014-05-14 13:00:16 +0200 |
---|---|---|
committer | David Herrmann <dh.herrmann@gmail.com> | 2014-05-14 13:00:16 +0200 |
commit | a214453f2d31fde9d17c0b32f04722d143fa030a (patch) | |
tree | 413208811399cb71dff21e345c738ebb82e4aea7 | |
parent | 773f24ba3a901ea93b8e04fefa19c7e3ee07d3e4 (diff) |
test: skip tests if the font-file is not available
"make distcheck" runs "make check" before running "make install" so the
font-file might not be available. Skip the tests if so.
Signed-off-by: David Herrmann <dh.herrmann@gmail.com>
-rw-r--r-- | test/test-glyphs.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/test/test-glyphs.c b/test/test-glyphs.c index 9c8f621..46e4529 100644 --- a/test/test-glyphs.c +++ b/test/test-glyphs.c @@ -208,9 +208,12 @@ TEST_DEFINE_CASE(misc) TEST(test_misc_draw) TEST_END_CASE -TEST_DEFINE( - TEST_SUITE(glyphs, - TEST_CASE(misc), - TEST_END - ) -) +int main(int argc, char **argv) +{ + if (access(PKGDATADIR "/mmap-unifont.bin", F_OK)) + return 77; + + return test_run_suite(TEST_SUITE(glyphs, + TEST_CASE(misc), + TEST_END)); +} |