summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2016-03-05 13:41:47 -0500
committerMatthias Clasen <mclasen@redhat.com>2016-03-05 13:41:47 -0500
commitb2e6ad640dc00acbe790cf48d110af08eb9b61e1 (patch)
tree84c40b3fafc41fd364763ada838f8d46e4a1448b /testsuite
parent434b08fe2498017822ea22be5c5e1b8d9b434cd6 (diff)
downloadgtk+-b2e6ad640dc00acbe790cf48d110af08eb9b61e1.tar.gz
Add a test that dumps settings
This is not much of a test, tbh. But it will give us a convenient dump of all GTK+ settings in continuous, which helps with tracking down test failures that might depend on settings.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/tools/Makefile.am13
-rwxr-xr-xtestsuite/tools/test-settings.in17
2 files changed, 27 insertions, 3 deletions
diff --git a/testsuite/tools/Makefile.am b/testsuite/tools/Makefile.am
index 37f7a41aa9..5bc7314f0a 100644
--- a/testsuite/tools/Makefile.am
+++ b/testsuite/tools/Makefile.am
@@ -16,24 +16,31 @@ test_simplify = \
EXTRA_DIST += \
$(test_simplify) \
test-simplify.in \
+ test-settings.in \
$(NULL)
TESTS_ENVIRONMENT = \
- GTK_BUILDER_TOOL="$(top_builddir)/gtk/gtk-builder-tool"
+ GTK_BUILDER_TOOL="$(top_builddir)/gtk/gtk-builder-tool" \
+ GTK_QUERY_SETTINGS="$(top_builddir)/gtk/gtk-query-settings" \
+ $(NULL)
TEST_PROGS += \
test-simplify \
+ test-settings \
$(NULL)
test-simplify:test-simplify.in
$(AM_V_GEN) cp $< $@
+test-settings:test-settings.in
+ $(AM_V_GEN) cp $< $@
+
if BUILDOPT_INSTALL_TESTS
insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)
insttest_SCRIPTS = $(TEST_PROGS)
nobase_insttest_DATA = $(test_simplify)
-test-simplify.test: test-simplify Makefile
+%.test: % Makefile
$(AM_V_GEN) (echo '[Test]' > $@.tmp; \
echo 'Type=session' >> $@.tmp; \
echo 'Output=TAP' >> $@.tmp; \
@@ -43,7 +50,7 @@ test-simplify.test: test-simplify Makefile
test_files = $(TEST_PROGS:=.test)
DISTCLEANFILES = \
- test-simplify \
+ $(TEST_PROGS) \
$(test_files) \
$(NULL)
diff --git a/testsuite/tools/test-settings.in b/testsuite/tools/test-settings.in
new file mode 100755
index 0000000000..a19b4725ff
--- /dev/null
+++ b/testsuite/tools/test-settings.in
@@ -0,0 +1,17 @@
+#! /bin/bash
+
+GTK_QUERY_SETTINGS=${GTK_QUERY_SETTINGS:-gtk-query-settings}
+TEST_RESULT_DIR=${TEST_RESULT_DIR:-/tmp}
+
+shopt -s nullglob
+
+echo "1..1"
+
+name=gtk-query-settings
+result=$TEST_RESULT_DIR/$name.out
+$GTK_QUERY_SETTINGS 2>/dev/null >$result
+if [ $(wc -l $result | cut -f1 -d' ') -eq 82 ]; then
+ echo "ok 1 $name"
+else
+ echo "not ok 1 $name"
+fi