[gdk-pixbuf/issue-123: 2/4] tests: Skip tests when the ref format is unsupported
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gdk-pixbuf/issue-123: 2/4] tests: Skip tests when the ref format is unsupported
- Date: Thu, 2 Apr 2020 11:49:01 +0000 (UTC)
commit b66add27fc11b876962e8d352f77b938858ba2c3
Author: Emmanuele Bassi <ebassi gnome org>
Date: Thu Apr 2 12:45:10 2020 +0100
tests: Skip tests when the ref format is unsupported
We must skip the reference test when both the source and reference files
are unsupported.
tests/pixbuf-reftest.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
---
diff --git a/tests/pixbuf-reftest.c b/tests/pixbuf-reftest.c
index ac0bb2d46..b760a5e8c 100644
--- a/tests/pixbuf-reftest.c
+++ b/tests/pixbuf-reftest.c
@@ -148,8 +148,16 @@ test_reftest (gconstpointer data)
return;
}
- filename = g_file_get_path (file);
ref_file = make_ref_file (file);
+ if (!file_supported (ref_file))
+ {
+ g_test_skip ("format not supported for reference file");
+ return;
+ }
+
+ filename = g_file_get_path (file);
+
+ g_test_message ("Loading ref file '%s' for test file '%s'", g_file_peek_path (ref_file), filename);
stream = G_INPUT_STREAM (g_file_read (ref_file, NULL, &error));
g_assert_no_error (error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]