[evolution-ews] Bug #711470 - Move tests from src/tests to test and fix make distcheck



commit 8c21dba4bf3c81dd8c984c2433e186669f9483a4
Author: Fabiano Fidêncio <fidencio redhat com>
Date:   Tue Nov 5 09:53:17 2013 +0100

    Bug #711470 - Move tests from src/tests to test and fix make distcheck

 Makefile.am                                        |    9 ++-
 configure.ac                                       |    2 +-
 src/Makefile.am                                    |    7 +--
 src/tests/Makefile.am                              |   33 ----------
 tests/Makefile.am                                  |   63 ++++++++++++++++++++
 {src/tests => tests}/ews-test-camel.c              |    4 +-
 {src/tests => tests}/ews-test-common.c             |    0
 {src/tests => tests}/ews-test-common.h             |    0
 .../folder/create_distinguished_folder_subfolder   |    0
 .../camel/folder/create_existing_folder            |    0
 ...ate_folder_with_invalid_distinguished_parent_id |    0
 ...folder_with_invalid_non_distinguished_parent_id |    0
 .../folder/create_folder_with_malformed_parent_id  |    0
 .../create_non_distinguished_folder_subfolder      |    0
 .../hard_delete_distinguished_folder_subfolder     |    0
 .../hard_delete_non_distinguished_folder_subfolder |    0
 .../camel/folder/hard_delete_root_subfolder        |    0
 ...to_folder_that_has_subfolder_with_the_same_name |    0
 .../camel/folder/move_folder_to_msgfolderroot      |    0
 .../camel/folder/move_folder_to_valid_folder       |    0
 .../folder/move_invalid_folder_to_valid_folder     |    0
 .../folder/move_valid_folder_to_invalid_folder     |    0
 .../folder/create_distinguished_folder_subfolder   |    0
 .../camel/folder/create_existing_folder            |    0
 ...ate_folder_with_invalid_distinguished_parent_id |    0
 ...folder_with_invalid_non_distinguished_parent_id |    0
 .../folder/create_folder_with_malformed_parent_id  |    0
 .../create_non_distinguished_folder_subfolder      |    0
 .../hard_delete_distinguished_folder_subfolder     |    0
 .../hard_delete_non_distinguished_folder_subfolder |    0
 .../camel/folder/hard_delete_root_subfolder        |    0
 ...to_folder_that_has_subfolder_with_the_same_name |    0
 .../camel/folder/move_folder_to_msgfolderroot      |    0
 .../camel/folder/move_folder_to_valid_folder       |    0
 .../folder/move_invalid_folder_to_valid_folder     |    0
 .../folder/move_valid_folder_to_invalid_folder     |    0
 36 files changed, 73 insertions(+), 45 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index ab2f9e9..d6b5232 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,9 +1,12 @@
+if ENABLE_TESTS
+TESTS_DIR = tests
+endif
+
 ACLOCAL_AMFLAGS = -I m4 ${ACLOCAL_FLAGS}
 
 NULL =
 
-SUBDIRS = src po
-DIST_SUBDIRS= src po
+SUBDIRS = src po $(TESTS_DIR)
 
 changelogs = \
        ChangeLog \
@@ -52,7 +55,7 @@ MAINTAINERCLEANFILES = \
 #     once libmspack >= 0.4 becomes more widespread.
 DISTCHECK_CONFIGURE_FLAGS = \
        --with-internal-lzx \
-       --disable-tests \
+       --enable-tests \
        $(NULL)
 
 -include $(top_srcdir)/git.mk
diff --git a/configure.ac b/configure.ac
index bbf505d..f61d111 100644
--- a/configure.ac
+++ b/configure.ac
@@ -378,8 +378,8 @@ src/calendar/Makefile
 src/camel/Makefile
 src/collection/Makefile
 src/configuration/Makefile
-src/tests/Makefile
 po/Makefile.in
+tests/Makefile
 ])
 AC_OUTPUT
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 1b91d6a..38e6615 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,7 +1,3 @@
-if ENABLE_TESTS
-TESTS_DIR = tests
-endif
-
 SUBDIRS = \
        server \
        utils \
@@ -9,7 +5,6 @@ SUBDIRS = \
        calendar \
        addressbook \
        collection \
-       configuration \
-       $(TESTS_DIR)
+       configuration
 
 -include $(top_srcdir)/git.mk
diff --git a/tests/Makefile.am b/tests/Makefile.am
new file mode 100644
index 0000000..99d3197
--- /dev/null
+++ b/tests/Makefile.am
@@ -0,0 +1,63 @@
+include $(top_srcdir)/gtester.mk
+
+AM_CPPFLAGS = \
+       -I$(top_srcdir) \
+       -I$(top_srcdir)/src \
+       -I$(top_builddir) \
+       -I$(top_builddir)/src \
+       -DTEST_FILE_DIR="\"$(top_srcdir)/tests/\"" \
+       -DG_LOG_DOMAIN=\"libeews-tests\" \
+       $(UHTTPMOCK_CFLAGS) \
+       $(LIBEDATASERVER_CFLAGS) \
+       $(NULL)
+
+noinst_PROGRAMS = $(TEST_PROGS)
+
+LIBS = \
+       $(top_builddir)/src/server/libeews-1.2.la \
+       $(top_builddir)/src/utils/libewsutils.la \
+       $(UHTTPMOCK_LIBS) \
+       $(LIBEDATASERVER_LIBS) \
+       $(NULL)
+
+TEST_SRCS = \
+       ews-test-common.c \
+       ews-test-common.h \
+       $(NULL)
+
+EXTRA_DIST += \
+       traces/Exchange2007_SP1/camel/folder/create_distinguished_folder_subfolder \
+       traces/Exchange2007_SP1/camel/folder/create_existing_folder \
+       traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_distinguished_parent_id \
+       traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_non_distinguished_parent_id \
+       traces/Exchange2007_SP1/camel/folder/create_folder_with_malformed_parent_id \
+       traces/Exchange2007_SP1/camel/folder/create_non_distinguished_folder_subfolder \
+       traces/Exchange2007_SP1/camel/folder/hard_delete_distinguished_folder_subfolder \
+       traces/Exchange2007_SP1/camel/folder/hard_delete_non_distinguished_folder_subfolder \
+       traces/Exchange2007_SP1/camel/folder/hard_delete_root_subfolder \
+       traces/Exchange2007_SP1/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name \
+       traces/Exchange2007_SP1/camel/folder/move_folder_to_msgfolderroot \
+       traces/Exchange2007_SP1/camel/folder/move_folder_to_valid_folder \
+       traces/Exchange2007_SP1/camel/folder/move_invalid_folder_to_valid_folder \
+       traces/Exchange2007_SP1/camel/folder/move_valid_folder_to_invalid_folder \
+       \
+       traces/Exchange2010_SP2/camel/folder/create_distinguished_folder_subfolder \
+       traces/Exchange2010_SP2/camel/folder/create_existing_folder \
+       traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_distinguished_parent_id \
+       traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_non_distinguished_parent_id \
+       traces/Exchange2010_SP2/camel/folder/create_folder_with_malformed_parent_id \
+       traces/Exchange2010_SP2/camel/folder/create_non_distinguished_folder_subfolder \
+       traces/Exchange2010_SP2/camel/folder/hard_delete_distinguished_folder_subfolder \
+       traces/Exchange2010_SP2/camel/folder/hard_delete_non_distinguished_folder_subfolder \
+       traces/Exchange2010_SP2/camel/folder/hard_delete_root_subfolder \
+       traces/Exchange2010_SP2/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name \
+       traces/Exchange2010_SP2/camel/folder/move_folder_to_msgfolderroot \
+       traces/Exchange2010_SP2/camel/folder/move_folder_to_valid_folder \
+       traces/Exchange2010_SP2/camel/folder/move_invalid_folder_to_valid_folder \
+       traces/Exchange2010_SP2/camel/folder/move_valid_folder_to_invalid_folder \
+       $(NULL)
+
+TEST_PROGS                     += ews-test-camel
+ews_test_camel_SOURCES          = ews-test-camel.c $(TEST_SRCS)
+
+-include $(top_srcdir)/git.mk
diff --git a/src/tests/ews-test-camel.c b/tests/ews-test-camel.c
similarity index 99%
rename from src/tests/ews-test-camel.c
rename to tests/ews-test-camel.c
index 94dc66f..c22b1e2 100644
--- a/src/tests/ews-test-camel.c
+++ b/tests/ews-test-camel.c
@@ -780,12 +780,12 @@ int main (int argc,
                g_free (message);
 
                message = g_strdup_printf (
-                       "/%s/camel/folder/create_folder_invalid_distinguished_parent_id", etd->version);
+                       "/%s/camel/folder/create_folder_with_invalid_distinguished_parent_id", etd->version);
                g_test_add_data_func (message, etd, test_create_folder_with_invalid_distinguished_parent_id);
                g_free (message);
 
                message = g_strdup_printf (
-                       "/%s/camel/folder/create_folder_invalid_non_distinguished_parent_id", etd->version);
+                       "/%s/camel/folder/create_folder_with_invalid_non_distinguished_parent_id", 
etd->version);
                g_test_add_data_func (message, etd, 
test_create_folder_with_invalid_non_distinguished_parent_id);
                g_free (message);
 
diff --git a/src/tests/ews-test-common.c b/tests/ews-test-common.c
similarity index 100%
rename from src/tests/ews-test-common.c
rename to tests/ews-test-common.c
diff --git a/src/tests/ews-test-common.h b/tests/ews-test-common.h
similarity index 100%
rename from src/tests/ews-test-common.h
rename to tests/ews-test-common.h
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/create_distinguished_folder_subfolder 
b/tests/traces/Exchange2007_SP1/camel/folder/create_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/create_distinguished_folder_subfolder
rename to tests/traces/Exchange2007_SP1/camel/folder/create_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/create_existing_folder 
b/tests/traces/Exchange2007_SP1/camel/folder/create_existing_folder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/create_existing_folder
rename to tests/traces/Exchange2007_SP1/camel/folder/create_existing_folder
diff --git 
a/src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_distinguished_parent_id 
b/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_distinguished_parent_id
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_distinguished_parent_id
rename to tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_distinguished_parent_id
diff --git 
a/src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_non_distinguished_parent_id 
b/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
similarity index 100%
rename from 
src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
rename to tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_malformed_parent_id 
b/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_malformed_parent_id
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_malformed_parent_id
rename to tests/traces/Exchange2007_SP1/camel/folder/create_folder_with_malformed_parent_id
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/create_non_distinguished_folder_subfolder 
b/tests/traces/Exchange2007_SP1/camel/folder/create_non_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/create_non_distinguished_folder_subfolder
rename to tests/traces/Exchange2007_SP1/camel/folder/create_non_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_distinguished_folder_subfolder 
b/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_distinguished_folder_subfolder
rename to tests/traces/Exchange2007_SP1/camel/folder/hard_delete_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_non_distinguished_folder_subfolder 
b/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_non_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_non_distinguished_folder_subfolder
rename to tests/traces/Exchange2007_SP1/camel/folder/hard_delete_non_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_root_subfolder 
b/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_root_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/hard_delete_root_subfolder
rename to tests/traces/Exchange2007_SP1/camel/folder/hard_delete_root_subfolder
diff --git 
a/src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name 
b/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
similarity index 100%
rename from 
src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
rename to 
tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_msgfolderroot 
b/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_msgfolderroot
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_msgfolderroot
rename to tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_msgfolderroot
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_valid_folder 
b/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_valid_folder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_valid_folder
rename to tests/traces/Exchange2007_SP1/camel/folder/move_folder_to_valid_folder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/move_invalid_folder_to_valid_folder 
b/tests/traces/Exchange2007_SP1/camel/folder/move_invalid_folder_to_valid_folder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/move_invalid_folder_to_valid_folder
rename to tests/traces/Exchange2007_SP1/camel/folder/move_invalid_folder_to_valid_folder
diff --git a/src/tests/traces/Exchange2007_SP1/camel/folder/move_valid_folder_to_invalid_folder 
b/tests/traces/Exchange2007_SP1/camel/folder/move_valid_folder_to_invalid_folder
similarity index 100%
rename from src/tests/traces/Exchange2007_SP1/camel/folder/move_valid_folder_to_invalid_folder
rename to tests/traces/Exchange2007_SP1/camel/folder/move_valid_folder_to_invalid_folder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/create_distinguished_folder_subfolder 
b/tests/traces/Exchange2010_SP2/camel/folder/create_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/create_distinguished_folder_subfolder
rename to tests/traces/Exchange2010_SP2/camel/folder/create_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/create_existing_folder 
b/tests/traces/Exchange2010_SP2/camel/folder/create_existing_folder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/create_existing_folder
rename to tests/traces/Exchange2010_SP2/camel/folder/create_existing_folder
diff --git 
a/src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_distinguished_parent_id 
b/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_distinguished_parent_id
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_distinguished_parent_id
rename to tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_distinguished_parent_id
diff --git 
a/src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_non_distinguished_parent_id 
b/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
similarity index 100%
rename from 
src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
rename to tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_invalid_non_distinguished_parent_id
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_malformed_parent_id 
b/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_malformed_parent_id
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_malformed_parent_id
rename to tests/traces/Exchange2010_SP2/camel/folder/create_folder_with_malformed_parent_id
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/create_non_distinguished_folder_subfolder 
b/tests/traces/Exchange2010_SP2/camel/folder/create_non_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/create_non_distinguished_folder_subfolder
rename to tests/traces/Exchange2010_SP2/camel/folder/create_non_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_distinguished_folder_subfolder 
b/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_distinguished_folder_subfolder
rename to tests/traces/Exchange2010_SP2/camel/folder/hard_delete_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_non_distinguished_folder_subfolder 
b/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_non_distinguished_folder_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_non_distinguished_folder_subfolder
rename to tests/traces/Exchange2010_SP2/camel/folder/hard_delete_non_distinguished_folder_subfolder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_root_subfolder 
b/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_root_subfolder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/hard_delete_root_subfolder
rename to tests/traces/Exchange2010_SP2/camel/folder/hard_delete_root_subfolder
diff --git 
a/src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name 
b/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
similarity index 100%
rename from 
src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
rename to 
tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_folder_that_has_subfolder_with_the_same_name
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_msgfolderroot 
b/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_msgfolderroot
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_msgfolderroot
rename to tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_msgfolderroot
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_valid_folder 
b/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_valid_folder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_valid_folder
rename to tests/traces/Exchange2010_SP2/camel/folder/move_folder_to_valid_folder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/move_invalid_folder_to_valid_folder 
b/tests/traces/Exchange2010_SP2/camel/folder/move_invalid_folder_to_valid_folder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/move_invalid_folder_to_valid_folder
rename to tests/traces/Exchange2010_SP2/camel/folder/move_invalid_folder_to_valid_folder
diff --git a/src/tests/traces/Exchange2010_SP2/camel/folder/move_valid_folder_to_invalid_folder 
b/tests/traces/Exchange2010_SP2/camel/folder/move_valid_folder_to_invalid_folder
similarity index 100%
rename from src/tests/traces/Exchange2010_SP2/camel/folder/move_valid_folder_to_invalid_folder
rename to tests/traces/Exchange2010_SP2/camel/folder/move_valid_folder_to_invalid_folder


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