[gtksourceview/wip/gsv-next: 4/6] Move unit tests to testsuite/ directory
- From: Sébastien Wilmet <swilmet src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview/wip/gsv-next: 4/6] Move unit tests to testsuite/ directory
- Date: Sun, 27 Mar 2016 06:23:27 +0000 (UTC)
commit 2bf7cfe7cc3249aef06fb838e9e2a1d18200fda6
Author: Sébastien Wilmet <swilmet gnome org>
Date: Sat Mar 26 20:50:40 2016 +0100
Move unit tests to testsuite/ directory
https://bugzilla.gnome.org/show_bug.cgi?id=761365
Makefile.am | 2 +-
configure.ac | 1 +
tests/Makefile.am | 101 +----------------
testsuite/Makefile.am | 125 ++++++++++++++++++++
.../language-specs/test-empty.lang | 0
{tests => testsuite}/language-specs/test-full.lang | 0
{tests => testsuite}/setup-file-saver.sh | 0
{tests => testsuite}/styles/classic.xml | 0
{tests => testsuite}/styles/test.xml | 0
{tests => testsuite}/test-buffer-input-stream.c | 0
{tests => testsuite}/test-buffer-output-stream.c | 0
{tests => testsuite}/test-buffer.c | 0
{tests => testsuite}/test-completion-model.c | 0
{tests => testsuite}/test-completion-words.c | 0
{tests => testsuite}/test-encoding.c | 0
{tests => testsuite}/test-file-loader.c | 0
{tests => testsuite}/test-file-saver.c | 0
{tests => testsuite}/test-iter.c | 0
{tests => testsuite}/test-language.c | 0
{tests => testsuite}/test-languagemanager.c | 0
{tests => testsuite}/test-mark.c | 0
{tests => testsuite}/test-printcompositor.c | 0
{tests => testsuite}/test-regex.c | 0
{tests => testsuite}/test-region.c | 0
{tests => testsuite}/test-search-context.c | 0
{tests => testsuite}/test-stylescheme.c | 0
{tests => testsuite}/test-styleschememanager.c | 0
{tests => testsuite}/test-undo-manager.c | 0
{tests => testsuite}/test-utils.c | 0
29 files changed, 128 insertions(+), 101 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 278599e..06c286a 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
-SUBDIRS = gtksourceview po data docs tests build
+SUBDIRS = gtksourceview po data docs tests testsuite build
pkgconfig_DATA = gtksourceview-3.0.pc
diff --git a/configure.ac b/configure.ac
index c04c94c..9216771 100644
--- a/configure.ac
+++ b/configure.ac
@@ -244,6 +244,7 @@ gtksourceview/completion-providers/Makefile
gtksourceview/completion-providers/words/Makefile
po/Makefile.in
tests/Makefile
+testsuite/Makefile
])
AC_OUTPUT
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 5109f16..e284254 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -18,7 +18,7 @@ LDADD = $(top_builddir)/gtksourceview/completion-providers/words/libgtksourcecom
$(DEP_LIBS) \
$(TESTS_LIBS)
-noinst_PROGRAMS = $(TEST_PROGS) $(UNIT_TEST_PROGS)
+noinst_PROGRAMS = $(TEST_PROGS)
BUILT_SOURCES = \
test-completion-resources.c \
@@ -69,79 +69,11 @@ test_widget_LDADD = \
$(DEP_LIBS) \
$(TESTS_LIBS)
-UNIT_TEST_PROGS = test-buffer
-test_buffer_SOURCES = test-buffer.c
-
-UNIT_TEST_PROGS += test-buffer-input-stream
-test_buffer_input_stream_SOURCES = test-buffer-input-stream.c
-
-UNIT_TEST_PROGS += test-buffer-output-stream
-test_buffer_output_stream_SOURCES = test-buffer-output-stream.c
-
-UNIT_TEST_PROGS += test-completion-model
-test_completion_model_SOURCES = test-completion-model.c
-
-UNIT_TEST_PROGS += test-completion-words
-test_completion_words_SOURCES = test-completion-words.c
-
-UNIT_TEST_PROGS += test-encoding
-test_encoding_SOURCES = test-encoding.c
-
-UNIT_TEST_PROGS += test-file-loader
-test_file_loader_SOURCES = test-file-loader.c
-
-UNIT_TEST_PROGS += test-file-saver
-test_file_saver_SOURCES = test-file-saver.c
-
-UNIT_TEST_PROGS += test-iter
-test_iter_SOURCES = test-iter.c
-
-UNIT_TEST_PROGS += test-language
-test_language_SOURCES = test-language.c
-
-UNIT_TEST_PROGS += test-languagemanager
-test_languagemanager_SOURCES = test-languagemanager.c
-
-UNIT_TEST_PROGS += test-mark
-test_mark_SOURCES = test-mark.c
-
-UNIT_TEST_PROGS += test-printcompositor
-test_printcompositor_SOURCES = test-printcompositor.c
-
-UNIT_TEST_PROGS += test-regex
-test_regex_SOURCES = test-regex.c
-
-UNIT_TEST_PROGS += test-region
-test_region_SOURCES = test-region.c
-
-UNIT_TEST_PROGS += test-search-context
-test_search_context_SOURCES = test-search-context.c
-
-UNIT_TEST_PROGS += test-stylescheme
-test_stylescheme_SOURCES = test-stylescheme.c
-
-UNIT_TEST_PROGS += test-styleschememanager
-test_styleschememanager_SOURCES = test-styleschememanager.c
-
-UNIT_TEST_PROGS += test-undo-manager
-test_undo_manager_SOURCES = test-undo-manager.c
-
-UNIT_TEST_PROGS += test-utils
-test_utils_SOURCES = test-utils.c
-
python_tests = \
test-completion.py \
test-widget.py
-TESTS_ENVIRONMENT = G_TEST_SRCDIR="$(abs_srcdir)"
-TESTS = $(UNIT_TEST_PROGS)
-
EXTRA_DIST = \
- language-specs/test-empty.lang \
- language-specs/test-full.lang \
- setup-file-saver.sh \
- styles/classic.xml \
- styles/test.xml \
syntax-highlighting \
test-completion.gresource.xml \
test-completion.ui \
@@ -151,35 +83,4 @@ EXTRA_DIST = \
test-widget.ui \
$(python_tests)
-if INSTALLED_TESTS
-insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0
-insttest_PROGRAMS = $(UNIT_TEST_PROGS)
-
-insttestlangdir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0/language-specs
-insttestlang_DATA = \
- language-specs/test-empty.lang \
- language-specs/test-full.lang
-
-instteststyledir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0/styles
-instteststyle_DATA = \
- styles/classic.xml \
- styles/test.xml
-
-%.test: %$(EXEEXT) Makefile
- $(AM_V_GEN) (echo '[Test]' > $ tmp; \
- echo 'Description=GtkSourceView test' >> $ tmp; \
- echo 'Exec=$(insttestdir)/$<' >> $ tmp; \
- echo 'Type=session' >> $ tmp; \
- echo 'Output=TAP' >> $ tmp; \
- mv $ tmp $@)
-
-test_files = $(UNIT_TEST_PROGS:=.test)
-
-DISTCLEANFILES = $(test_files)
-
-testmetadir = $(datadir)/installed-tests/$(PACKAGE)-3.0
-testmeta_DATA = $(test_files)
-
-endif # INSTALLED_TESTS
-
-include $(top_srcdir)/git.mk
diff --git a/testsuite/Makefile.am b/testsuite/Makefile.am
new file mode 100644
index 0000000..cba8ddb
--- /dev/null
+++ b/testsuite/Makefile.am
@@ -0,0 +1,125 @@
+ CODE_COVERAGE_RULES@
+
+AM_CPPFLAGS = \
+ -DDATADIR=\""$(datadir)"\" \
+ -DG_LOG_DOMAIN=\"GtkSourceView\"\
+ -I$(top_srcdir) -I$(srcdir) \
+ -DTOP_SRCDIR=\""$(ABS_TOP_SRCDIR)"\"\
+ $(DISABLE_DEPRECATED_CFLAGS) \
+ $(WARN_CFLAGS) \
+ $(DEP_CFLAGS) \
+ $(TESTS_CFLAGS)
+
+AM_LDFLAGS = $(WARN_LDFLAGS)
+
+LDADD = $(top_builddir)/gtksourceview/completion-providers/words/libgtksourcecompletionwords.la \
+ $(top_builddir)/gtksourceview/libgtksourceview-core.la \
+ -lm \
+ $(DEP_LIBS) \
+ $(TESTS_LIBS)
+
+UNIT_TEST_PROGS =
+
+UNIT_TEST_PROGS += test-buffer
+test_buffer_SOURCES = test-buffer.c
+
+UNIT_TEST_PROGS += test-buffer-input-stream
+test_buffer_input_stream_SOURCES = test-buffer-input-stream.c
+
+UNIT_TEST_PROGS += test-buffer-output-stream
+test_buffer_output_stream_SOURCES = test-buffer-output-stream.c
+
+UNIT_TEST_PROGS += test-completion-model
+test_completion_model_SOURCES = test-completion-model.c
+
+UNIT_TEST_PROGS += test-completion-words
+test_completion_words_SOURCES = test-completion-words.c
+
+UNIT_TEST_PROGS += test-encoding
+test_encoding_SOURCES = test-encoding.c
+
+UNIT_TEST_PROGS += test-file-loader
+test_file_loader_SOURCES = test-file-loader.c
+
+UNIT_TEST_PROGS += test-file-saver
+test_file_saver_SOURCES = test-file-saver.c
+
+UNIT_TEST_PROGS += test-iter
+test_iter_SOURCES = test-iter.c
+
+UNIT_TEST_PROGS += test-language
+test_language_SOURCES = test-language.c
+
+UNIT_TEST_PROGS += test-languagemanager
+test_languagemanager_SOURCES = test-languagemanager.c
+
+UNIT_TEST_PROGS += test-mark
+test_mark_SOURCES = test-mark.c
+
+UNIT_TEST_PROGS += test-printcompositor
+test_printcompositor_SOURCES = test-printcompositor.c
+
+UNIT_TEST_PROGS += test-regex
+test_regex_SOURCES = test-regex.c
+
+UNIT_TEST_PROGS += test-region
+test_region_SOURCES = test-region.c
+
+UNIT_TEST_PROGS += test-search-context
+test_search_context_SOURCES = test-search-context.c
+
+UNIT_TEST_PROGS += test-stylescheme
+test_stylescheme_SOURCES = test-stylescheme.c
+
+UNIT_TEST_PROGS += test-styleschememanager
+test_styleschememanager_SOURCES = test-styleschememanager.c
+
+UNIT_TEST_PROGS += test-undo-manager
+test_undo_manager_SOURCES = test-undo-manager.c
+
+UNIT_TEST_PROGS += test-utils
+test_utils_SOURCES = test-utils.c
+
+TESTS_ENVIRONMENT = G_TEST_SRCDIR="$(abs_srcdir)"
+TESTS = $(UNIT_TEST_PROGS)
+noinst_PROGRAMS = $(UNIT_TEST_PROGS)
+
+EXTRA_DIST = \
+ language-specs/test-empty.lang \
+ language-specs/test-full.lang \
+ setup-file-saver.sh \
+ styles/classic.xml \
+ styles/test.xml
+
+if INSTALLED_TESTS
+insttestdir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0
+insttest_PROGRAMS = $(UNIT_TEST_PROGS)
+
+insttestlangdir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0/language-specs
+insttestlang_DATA = \
+ language-specs/test-empty.lang \
+ language-specs/test-full.lang
+
+instteststyledir = $(libexecdir)/installed-tests/$(PACKAGE)-3.0/styles
+instteststyle_DATA = \
+ styles/classic.xml \
+ styles/test.xml
+
+%.test: %$(EXEEXT) Makefile
+ $(AM_V_GEN) (echo '[Test]' > $ tmp; \
+ echo 'Description=GtkSourceView test' >> $ tmp; \
+ echo 'Exec=$(insttestdir)/$<' >> $ tmp; \
+ echo 'Type=session' >> $ tmp; \
+ echo 'Output=TAP' >> $ tmp; \
+ mv $ tmp $@)
+
+test_files = $(UNIT_TEST_PROGS:=.test)
+
+DISTCLEANFILES = $(test_files)
+
+testmetadir = $(datadir)/installed-tests/$(PACKAGE)-3.0
+testmeta_DATA = $(test_files)
+
+endif # INSTALLED_TESTS
+
+-include $(top_srcdir)/git.mk
diff --git a/tests/language-specs/test-empty.lang b/testsuite/language-specs/test-empty.lang
similarity index 100%
rename from tests/language-specs/test-empty.lang
rename to testsuite/language-specs/test-empty.lang
diff --git a/tests/language-specs/test-full.lang b/testsuite/language-specs/test-full.lang
similarity index 100%
rename from tests/language-specs/test-full.lang
rename to testsuite/language-specs/test-full.lang
diff --git a/tests/setup-file-saver.sh b/testsuite/setup-file-saver.sh
similarity index 100%
rename from tests/setup-file-saver.sh
rename to testsuite/setup-file-saver.sh
diff --git a/tests/styles/classic.xml b/testsuite/styles/classic.xml
similarity index 100%
rename from tests/styles/classic.xml
rename to testsuite/styles/classic.xml
diff --git a/tests/styles/test.xml b/testsuite/styles/test.xml
similarity index 100%
rename from tests/styles/test.xml
rename to testsuite/styles/test.xml
diff --git a/tests/test-buffer-input-stream.c b/testsuite/test-buffer-input-stream.c
similarity index 100%
rename from tests/test-buffer-input-stream.c
rename to testsuite/test-buffer-input-stream.c
diff --git a/tests/test-buffer-output-stream.c b/testsuite/test-buffer-output-stream.c
similarity index 100%
rename from tests/test-buffer-output-stream.c
rename to testsuite/test-buffer-output-stream.c
diff --git a/tests/test-buffer.c b/testsuite/test-buffer.c
similarity index 100%
rename from tests/test-buffer.c
rename to testsuite/test-buffer.c
diff --git a/tests/test-completion-model.c b/testsuite/test-completion-model.c
similarity index 100%
rename from tests/test-completion-model.c
rename to testsuite/test-completion-model.c
diff --git a/tests/test-completion-words.c b/testsuite/test-completion-words.c
similarity index 100%
rename from tests/test-completion-words.c
rename to testsuite/test-completion-words.c
diff --git a/tests/test-encoding.c b/testsuite/test-encoding.c
similarity index 100%
rename from tests/test-encoding.c
rename to testsuite/test-encoding.c
diff --git a/tests/test-file-loader.c b/testsuite/test-file-loader.c
similarity index 100%
rename from tests/test-file-loader.c
rename to testsuite/test-file-loader.c
diff --git a/tests/test-file-saver.c b/testsuite/test-file-saver.c
similarity index 100%
rename from tests/test-file-saver.c
rename to testsuite/test-file-saver.c
diff --git a/tests/test-iter.c b/testsuite/test-iter.c
similarity index 100%
rename from tests/test-iter.c
rename to testsuite/test-iter.c
diff --git a/tests/test-language.c b/testsuite/test-language.c
similarity index 100%
rename from tests/test-language.c
rename to testsuite/test-language.c
diff --git a/tests/test-languagemanager.c b/testsuite/test-languagemanager.c
similarity index 100%
rename from tests/test-languagemanager.c
rename to testsuite/test-languagemanager.c
diff --git a/tests/test-mark.c b/testsuite/test-mark.c
similarity index 100%
rename from tests/test-mark.c
rename to testsuite/test-mark.c
diff --git a/tests/test-printcompositor.c b/testsuite/test-printcompositor.c
similarity index 100%
rename from tests/test-printcompositor.c
rename to testsuite/test-printcompositor.c
diff --git a/tests/test-regex.c b/testsuite/test-regex.c
similarity index 100%
rename from tests/test-regex.c
rename to testsuite/test-regex.c
diff --git a/tests/test-region.c b/testsuite/test-region.c
similarity index 100%
rename from tests/test-region.c
rename to testsuite/test-region.c
diff --git a/tests/test-search-context.c b/testsuite/test-search-context.c
similarity index 100%
rename from tests/test-search-context.c
rename to testsuite/test-search-context.c
diff --git a/tests/test-stylescheme.c b/testsuite/test-stylescheme.c
similarity index 100%
rename from tests/test-stylescheme.c
rename to testsuite/test-stylescheme.c
diff --git a/tests/test-styleschememanager.c b/testsuite/test-styleschememanager.c
similarity index 100%
rename from tests/test-styleschememanager.c
rename to testsuite/test-styleschememanager.c
diff --git a/tests/test-undo-manager.c b/testsuite/test-undo-manager.c
similarity index 100%
rename from tests/test-undo-manager.c
rename to testsuite/test-undo-manager.c
diff --git a/tests/test-utils.c b/testsuite/test-utils.c
similarity index 100%
rename from tests/test-utils.c
rename to testsuite/test-utils.c
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]