summaryrefslogtreecommitdiff
path: root/test/pdf-mime-data.c
diff options
context:
space:
mode:
authorUli Schlachter <psychon@znc.in>2021-03-08 17:31:37 +0100
committerUli Schlachter <psychon@znc.in>2021-03-08 17:31:37 +0100
commit2f25fa68c0d59c3ed3577e0e85b745985467c6fd (patch)
treed8c45c344f8d0b248293f20ec088b71c142d1e51 /test/pdf-mime-data.c
parent2a8d90c6fce458151f7bd3982fcaa964c4f72195 (diff)
downloadcairo-2f25fa68c0d59c3ed3577e0e85b745985467c6fd.tar.gz
test/pdf-mime-data.c: Check for pdfimages
Currently, the pdf-mime-data check just fails for me with the following output: sh: 1: pdfimages: not found pdf-mime-data: FAIL pdf-mime-data.log contains: pdfimages failed with exit status 32512 Since I do not have pdfimages installed... yeah. This commit "fixes" that problem by skipping the test if pdfimages is not available. No idea if it would pass if it were available, but I do not feel like installing pdfimages just to test. Signed-off-by: Uli Schlachter <psychon@znc.in>
Diffstat (limited to 'test/pdf-mime-data.c')
-rw-r--r--test/pdf-mime-data.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/pdf-mime-data.c b/test/pdf-mime-data.c
index beefa01b3..5052f3dac 100644
--- a/test/pdf-mime-data.c
+++ b/test/pdf-mime-data.c
@@ -112,6 +112,12 @@ preamble (cairo_test_context_t *ctx)
if (! cairo_test_is_target_enabled (ctx, "pdf"))
return CAIRO_TEST_UNTESTED;
+ exit_status = system ("command -v pdfimages");
+ if (exit_status) {
+ cairo_test_log (ctx, "pdfimages not available\n");
+ return CAIRO_TEST_UNTESTED;
+ }
+
image = cairo_test_create_surface_from_png (ctx, IMAGE_FILE ".png");
test_status = read_file (ctx, IMAGE_FILE ".jpg", &data, &len);
if (test_status) {