summaryrefslogtreecommitdiff
path: root/tests/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'tests/meson.build')
-rw-r--r--tests/meson.build43
1 files changed, 43 insertions, 0 deletions
diff --git a/tests/meson.build b/tests/meson.build
index 4c02ccd..76d4962 100644
--- a/tests/meson.build
+++ b/tests/meson.build
@@ -9,6 +9,17 @@
# Coverage: meson setup -Db_coverage=true build
# meson test -C build
# ninja -C build coverage (needs lcov + genhtml)
+#
+# Fixture dirs are passed to tests via env vars:
+# GGAZE_FIXTURES_DIR committed tests/fixtures/ (CI-portable baseline)
+# GGAZE_SAMPLE_DIR local ./sample-images (not git-tracked; tests skip
+# cleanly when absent so CI stays green)
+
+fixtures_env = environment()
+fixtures_env.set('GGAZE_FIXTURES_DIR',
+ join_paths(meson.project_source_root(), 'tests', 'fixtures'))
+fixtures_env.set('GGAZE_SAMPLE_DIR',
+ join_paths(meson.project_source_root(), 'sample-images'))
# --- unit track ---
test_bootstrap = executable(
@@ -34,6 +45,26 @@ test('app', test_app,
depends : ggaze_exe,
)
+test_detect = executable(
+ 'test_detect',
+ ['test_detect.c', ggaze_conf_h],
+ include_directories : [inc, src_inc],
+ dependencies : [glib_dep],
+ link_with : ggaze_lib,
+ install : false,
+)
+test('detect', test_detect, suite : 'unit', env : fixtures_env)
+
+test_loader_pixbuf = executable(
+ 'test_loader_pixbuf',
+ ['test_loader_pixbuf.c', ggaze_conf_h],
+ include_directories : [inc, src_inc],
+ dependencies : [gdkpixbuf_dep, gtk4_dep, glib_dep, gio_dep],
+ link_with : ggaze_lib,
+ install : false,
+)
+test('loader_pixbuf', test_loader_pixbuf, suite : 'unit', env : fixtures_env)
+
# --- integration track (needs a display; CI uses xvfb-run) ---
test_window = executable(
'test_window',
@@ -45,4 +76,16 @@ test_window = executable(
)
test('window', test_window, suite : 'integration')
+test_open_and_show = executable(
+ 'test_open_and_show',
+ ['test_open_and_show.c', ggaze_conf_h],
+ include_directories : [inc, src_inc],
+ dependencies : ggaze_deps,
+ link_with : ggaze_lib,
+ install : false,
+)
+test('open_and_show', test_open_and_show,
+ suite : 'integration',
+ env : fixtures_env)
+
subdir('integration') \ No newline at end of file