[gtk+] Add a test that dumps settings



commit b2e6ad640dc00acbe790cf48d110af08eb9b61e1
Author: Matthias Clasen <mclasen redhat com>
Date:   Sat Mar 5 13:41:47 2016 -0500

    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.

 testsuite/tools/Makefile.am      |   13 ++++++++++---
 testsuite/tools/test-settings.in |   17 +++++++++++++++++
 2 files changed, 27 insertions(+), 3 deletions(-)
---
diff --git a/testsuite/tools/Makefile.am b/testsuite/tools/Makefile.am
index 37f7a41..5bc7314 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 0000000..a19b472
--- /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


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]