Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make dist not complete #85

Merged
merged 3 commits into from
Sep 22, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[submodule "src/googletest"]
path = src/googletest
[submodule "src/tests/googletest"]
path = src/tests/googletest
url = https://github.com/google/googletest.git
10 changes: 8 additions & 2 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,18 @@ SUBDIRS = \
src

EXTRA_DIST = \
COPYING \
autogen.sh \
COPYING-LGPL2.1 \
README.md \
packaging \
ChangeLog

ChangeLog:
git log --name-status --pretty="format:%ai %aN <%aE> (%h)%n%n%w(80,4,4)%s%n%n%b" . > ChangeLog || rm -f ChangeLog

DISTCLEANFILES = \
$(top_builddir)/run-test.sh


distcleancheck:
@:

18 changes: 15 additions & 3 deletions configure.ac
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
# Copyright (c) 2017 Tallence AG and the authors, see the included COPYING file
#
# Copyright (c) 2017 Tallence AG and the authors
#
# This is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1, as published by the Free Software
# Foundation. See file COPYING.

AC_PREREQ([2.59])

AC_INIT([Dovecot Ceph plugins], [0.0.1], [https://github.com/tallence/dovecot-ceph-plugin/issues/new], ,[https://github.com/tallence/dovecot-ceph-plugin])
AC_INIT([dovecot-ceph-plugin], [0.0.1], [https://github.com/ceph-dovecot/dovecot-ceph-plugin/issues/new], ,[https://github.com/ceph-dovecot/dovecot-ceph-plugin])
AC_CONFIG_AUX_DIR([.])
AC_CONFIG_SRCDIR([src])
AC_CONFIG_MACRO_DIR([m4])
Expand Down Expand Up @@ -62,7 +68,13 @@ AC_ARG_WITH(tests,
AS_HELP_STRING([--with-tests[=ARG]], [Build with [ARG=yes] or without [ARG=no] RADOS librmb tests (yes)]),
TEST_WITH(tests, $withval),
want_tests=yes)
AM_CONDITIONAL(BUILD_LIBRMB_TESTS, test "$want_tests" = "yes")
AM_CONDITIONAL(BUILD_TESTS, test "$want_tests" = "yes")

AC_ARG_WITH(integration-tests,
AS_HELP_STRING([--with-integration-tests[=ARG]], [Build with [ARG=yes] or without [ARG=no] integration tests (no)]),
TEST_WITH(integration-tests, $withval),
want_integration_tests=no)
AM_CONDITIONAL(BUILD_INTEGRATION_TESTS, test "$want_integration_tests" = "yes")

AC_PROG_CC_C99
AC_PROG_CXX
Expand Down
10 changes: 7 additions & 3 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,19 @@
if BUILD_DICT_RADOS
DICT_RADOS = dict-rados
endif

if BUILD_STORAGE_RBOX
STORAGE_RBOX = storage-rbox
endif
if BUILD_LIBRMB_TESTS
BUILD_LIBRMB_TESTS = tests

if BUILD_TESTS
PLUGIN_TESTS = tests
endif

SUBDIRS = \
librmb \
$(DICT_RADOS) \
$(STORAGE_RBOX) \
$(BUILD_LIBRMB_TESTS)
$(PLUGIN_TESTS)


8 changes: 6 additions & 2 deletions src/dict-rados/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AUTOMAKE_OPTIONS = subdir-objects
LIBDICT_RADOS_PLUGIN = libdict_rados_plugin.la

shlibs = \
$(top_srcdir)/src/librmb/librmb.la
$(top_builddir)/src/librmb/librmb.la

libdict_rados_plugin_la_DEPENDENCIES = $(LIBDOVECOT_DEPS)
libdict_rados_plugin_la_LDFLAGS = -module -avoid-version
Expand All @@ -27,5 +27,9 @@ module_LTLIBRARIES = \

libdict_rados_plugin_la_SOURCES = \
libdict-rados-plugin.c \
dict-rados.cpp
dict-rados.cpp \
dovecot-dict.h \
libdict-rados-plugin.h \
dict-rados.h


2 changes: 1 addition & 1 deletion src/dict-rados/libdict-rados-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ struct dict dict_driver_rados = {.name = "rados",
static int plugin_ref_count = 0;

void dict_rados_plugin_init(struct module *module ATTR_UNUSED) {
i_debug("%s v%s dictionary starting up", DOVECOT_CEPH_PLUGINS_PACKAGE_NAME, DOVECOT_CEPH_PLUGINS_PACKAGE_VERSION);
i_debug("%s v%s dictionary starting up", DOVECOT_CEPH_PLUGIN_PACKAGE_NAME, DOVECOT_CEPH_PLUGIN_PACKAGE_VERSION);
if (plugin_ref_count++ > 0)
return;
dict_driver_register(&dict_driver_rados);
Expand Down
2 changes: 1 addition & 1 deletion src/dict-rados/libdict-rados-plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define SRC_DICT_RADOS_LIBDICT_RADOS_PLUGIN_H_

#ifdef HAVE_CONFIG_H
#include "dovecot-ceph-plugins-config.h"
#include "dovecot-ceph-plugin-config.h"
#endif

struct module;
Expand Down
1 change: 0 additions & 1 deletion src/googletest
Submodule googletest deleted from 1fe692
17 changes: 11 additions & 6 deletions src/librmb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,27 @@ SUBDIRS = . tools
lib_LTLIBRARIES = \
librmb.la

librmb_la_SOURCES = \
rados-cluster.cpp \
rados-storage.cpp \
rados-dictionary.cpp \
rados-mail-object.cpp

headers = \
interfaces/rados-cluster-interface.h \
interfaces/rados-dictionary-interface.h \
interfaces/rados-storage-interface.h \
encoding.h \
rados-cluster.h \
rados-storage.h \
rados-dictionary.h \
rados-mail-object.h

librmb_la_SOURCES = \
$(headers) \
rados-cluster.cpp \
rados-storage.cpp \
rados-dictionary.cpp \
rados-mail-object.cpp


pkginc_libdir=$(pkgincludedir)
#
# skip header installation because all parts are in one projekt right now
# pkginc_lib_HEADERS = $(headers)


15 changes: 10 additions & 5 deletions src/librmb/tools/rmb/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,17 @@ AM_CPPFLAGS = \
-I$(top_srcdir)/src/librmb

shlibs = \
$(top_srcdir)/src/librmb/librmb.la
$(top_builddir)/src/librmb/librmb.la

bin_PROGRAMS = rmb
rmb_SOURCES = mailbox_tools.cpp \
ls_cmd_parser.cpp \
rmb.cpp

rmb_SOURCES = \
mailbox_tools.cpp \
mailbox_tools.h \
ls_cmd_parser.cpp \
ls_cmd_parser.h \
rmb.cpp \
rmb.h

rmb_LDADD = $(shlibs)


17 changes: 15 additions & 2 deletions src/storage-rbox/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
LIBSTORAGE_RBOX_PLUGIN = libstorage_rbox_plugin.la

shlibs = \
../librmb/librmb.la
$(top_builddir)/src/librmb/librmb.la

libstorage_rbox_plugin_la_CPPFLAGS = \
$(LIBDOVECOT_INCLUDE) \
Expand All @@ -32,4 +32,17 @@ libstorage_rbox_plugin_la_SOURCES = \
rbox-sync.cpp \
rbox-storage.cpp \
rbox-sync-rebuild.cpp \
debug-helper.c
debug-helper.c \
debug-helper.h \
dovecot-all.h \
libstorage-rbox-plugin.h \
rbox-copy.h \
rbox-mail.h \
rbox-save.h \
rbox-storage-struct.h \
rbox-storage.h \
rbox-storage.hpp \
rbox-sync-rebuild.h \
rbox-sync.h \
typeof-def.h

2 changes: 1 addition & 1 deletion src/storage-rbox/libstorage-rbox-plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ struct mail_storage rbox_storage = {
}};

void storage_rbox_plugin_init(struct module *module ATTR_UNUSED) {
i_debug("%s v%s storage starting up", DOVECOT_CEPH_PLUGINS_PACKAGE_NAME, DOVECOT_CEPH_PLUGINS_PACKAGE_VERSION);
i_debug("%s v%s storage starting up", DOVECOT_CEPH_PLUGIN_PACKAGE_NAME, DOVECOT_CEPH_PLUGIN_PACKAGE_VERSION);
if (refcount++ > 0)
return;
mail_storage_class_register(&rbox_storage);
Expand Down
2 changes: 1 addition & 1 deletion src/storage-rbox/libstorage-rbox-plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#define SRC_STORAGE_RBOX_LIBSTORAGE_RBOX_PLUGIN_H_

#ifdef HAVE_CONFIG_H
#include "dovecot-ceph-plugins-config.h"
#include "dovecot-ceph-plugin-config.h"
#endif

void storage_rbox_plugin_init(struct module *module);
Expand Down
83 changes: 39 additions & 44 deletions src/tests/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,71 +6,66 @@
# License version 2.1, as published by the Free Software
# Foundation. See file COPYING.

AM_CPPFLAGS = -isystem $(top_srcdir)/src/googletest/googletest/include -I$(top_srcdir)/src/googletest/googlemock/include -I$(top_srcdir)/src -Imocks -I$(top_srcdir)/src/librmb -I$(top_srcdir)/src/dict-rados -I$(top_srcdir)/src/storage-rbox $(GTEST_CPPFLAGS)
AM_CXXFLAGS = -g -O0 $(GTEST_CXXFLAGS)

TESTS =
check_PROGRAMS =
AM_CPPFLAGS = -isystem $(top_srcdir)/src/tests/googletest/googletest/include -I$(top_srcdir)/src/tests/googletest/googlemock/include -I$(top_srcdir)/src -Imocks -I$(top_srcdir)/src/librmb -I$(top_srcdir)/src/dict-rados -I$(top_srcdir)/src/storage-rbox $(GTEST_CPPFLAGS)
AM_CXXFLAGS = $(GTEST_CXXFLAGS)

check_LTLIBRARIES = libgtest.la
libgtest_la_SOURCES = ../googletest/googletest/src/gtest-all.cc
libgtest_la_CPPFLAGS = -I$(top_srcdir)/src/googletest/googletest/include -I$(top_srcdir)/src/googletest/googletest
libgtest_la_SOURCES = googletest/googletest/src/gtest-all.cc
libgtest_la_CPPFLAGS = -I$(top_srcdir)/src/tests/googletest/googletest/include -I$(top_srcdir)/src/tests/googletest/googletest
libgtest_la_LDFLAGS = -pthread


check_LTLIBRARIES += libgmock.la
libgmock_la_SOURCES = ../googletest/googlemock/src/gmock-all.cc
libgmock_la_CPPFLAGS = -I$(top_srcdir)/src/googletest/googlemock/include -I$(top_srcdir)/src/googletest/googlemock -I$(top_srcdir)/src/googletest/googletest/include -I$(top_srcdir)/src/googletest/googletest
libgmock_la_SOURCES = googletest/googlemock/src/gmock-all.cc
libgmock_la_CPPFLAGS = -I$(top_srcdir)/src/tests/googletest/googlemock/include -I$(top_srcdir)/src/tests/googletest/googlemock -I$(top_srcdir)/src/tests/googletest/googletest/include -I$(top_srcdir)/src/tests/googletest/googletest
libgmock_la_LDFLAGS = -pthread

EXTRA_DIST = googletest

rmb_shlibs = \
$(top_srcdir)/src/librmb/librmb.la
$(top_builddir)/src/librmb/librmb.la
dict_shlibs = \
$(top_builddir)/src/dict-rados/libdict_rados_plugin.la $(LIBDOVECOT_STORAGE) $(LIBDOVECOT) $(rmb_shlibs)
storage_shlibs = \
$(top_builddir)/src/storage-rbox/libstorage_rbox_plugin.la $(LIBDOVECOT_STORAGE) $(LIBDOVECOT) $(rmb_shlibs)


TESTS = test_rmb
test_rmb_SOURCES = rmb/test_rmb.cpp mocks/mock_test.h
test_rmb_LDADD = $(rmb_shlibs) $(top_builddir)/src/librmb/tools/rmb/ls_cmd_parser.o $(top_builddir)/src/librmb/tools/rmb/mailbox_tools.o $(check_LTLIBRARIES)

TESTS += test_storage_mock_rbox
test_storage_mock_rbox_SOURCES = storage-mock-rbox/test_storage_mock_rbox.cpp storage-mock-rbox/TestCase.cpp storage-mock-rbox/TestCase.h mocks/mock_test.h
test_storage_mock_rbox_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
test_storage_mock_rbox_LDADD = $(storage_shlibs) $(check_LTLIBRARIES)

if BUILD_INTEGRATION_TESTS

TESTS += it_test_librmb
check_PROGRAMS += it_test_librmb
it_test_librmb_SOURCES = librmb/it_test_librmb.cpp
it_test_librmb_LDADD = $(rmb_shlibs) $(top_srcdir)/src/librmb/tools/rmb/ls_cmd_parser.o $(top_srcdir)/src/librmb/tools/rmb/mailbox_tools.o libgtest.la libgmock.la

TESTS += test_rmb
check_PROGRAMS += test_rmb
test_rmb_SOURCES = rmb/test_rmb.cpp
test_rmb_LDADD = $(rmb_shlibs) $(top_srcdir)/src/librmb/tools/rmb/ls_cmd_parser.o $(top_srcdir)/src/librmb/tools/rmb/mailbox_tools.o libgtest.la libgmock.la
it_test_librmb_LDADD = $(rmb_shlibs) $(top_builddir)/src/librmb/tools/rmb/ls_cmd_parser.o $(top_builddir)/src/librmb/tools/rmb/mailbox_tools.o $(check_LTLIBRARIES)

dict_shlibs = \
$(top_srcdir)/src/dict-rados/libdict_rados_plugin.la $(LIBDOVECOT_STORAGE) $(LIBDOVECOT) $(rmb_shlibs)

TESTS += it_test_dict_rados
check_PROGRAMS += it_test_dict_rados
it_test_dict_rados_SOURCES = dict-rados/it_test_dict_rados.cpp dict-rados/TestCase.cpp
it_test_dict_rados_SOURCES = dict-rados/it_test_dict_rados.cpp dict-rados/TestCase.cpp dict-rados/TestCase.h
it_test_dict_rados_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
it_test_dict_rados_LDADD = $(dict_shlibs) libgtest.la libgmock.la

storage_shlibs = \
$(top_srcdir)/src/storage-rbox/libstorage_rbox_plugin.la $(LIBDOVECOT_STORAGE) $(LIBDOVECOT) $(rmb_shlibs)
it_test_dict_rados_LDADD = $(dict_shlibs) $(check_LTLIBRARIES)

TESTS += it_test_storage_rbox
check_PROGRAMS += it_test_storage_rbox
it_test_storage_rbox_SOURCES = storage-rbox/it_test_storage_rbox.cpp storage-rbox/TestCase.cpp
it_test_storage_rbox_SOURCES = storage-rbox/it_test_storage_rbox.cpp storage-rbox/TestCase.cpp storage-rbox/TestCase.h
it_test_storage_rbox_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
it_test_storage_rbox_LDADD = $(storage_shlibs) libgtest.la libgmock.la


TESTS += test_storage_mock_rbox
check_PROGRAMS += test_storage_mock_rbox
test_storage_mock_rbox_SOURCES = storage-mock-rbox/test_storage_mock_rbox.cpp storage-mock-rbox/TestCase.cpp
test_storage_mock_rbox_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
test_storage_mock_rbox_LDADD = $(storage_shlibs) libgtest.la libgmock.la
it_test_storage_rbox_LDADD = $(storage_shlibs) $(check_LTLIBRARIES)

TESTS += it_test_sync_rbox
check_PROGRAMS += it_test_sync_rbox
it_test_sync_rbox_SOURCES = sync-rbox/it_test_sync_rbox.cpp sync-rbox/TestCase.cpp
it_test_sync_rbox_SOURCES = sync-rbox/it_test_sync_rbox.cpp sync-rbox/TestCase.cpp sync-rbox/TestCase.h
it_test_sync_rbox_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
it_test_sync_rbox_LDADD = $(storage_shlibs) libgtest.la libgmock.la
it_test_sync_rbox_LDADD = $(storage_shlibs) $(check_LTLIBRARIES)

TESTS += it_test_sync_rbox_2
check_PROGRAMS += it_test_sync_rbox_2
it_test_sync_rbox_2_SOURCES = sync-rbox/it_test_sync_rbox_2.cpp sync-rbox/TestCase.cpp
it_test_sync_rbox_2_SOURCES = sync-rbox/it_test_sync_rbox_2.cpp sync-rbox/TestCase.cpp sync-rbox/TestCase.h
it_test_sync_rbox_2_CPPFLAGS = $(AM_CPPFLAGS) $(LIBDOVECOT_INCLUDE)
it_test_sync_rbox_2_LDADD = $(storage_shlibs) libgtest.la libgmock.la

it_test_sync_rbox_2_LDADD = $(storage_shlibs) $(check_LTLIBRARIES)

endif

check_PROGRAMS = $(TESTS)
noinst_PROGRAMS = $(TESTS)

2 changes: 1 addition & 1 deletion src/tests/dict-rados/TestCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Foundation. See file COPYING.
*/

#include "src/tests/dict-rados/TestCase.h"
#include "TestCase.h"

#include <errno.h>

Expand Down
1 change: 1 addition & 0 deletions src/tests/googletest
Submodule googletest added at bfc0ff
2 changes: 1 addition & 1 deletion src/tests/storage-mock-rbox/TestCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Foundation. See file COPYING.
*/

#include "src/tests/storage-mock-rbox/TestCase.h"
#include "TestCase.h"

#include <errno.h>

Expand Down
2 changes: 1 addition & 1 deletion src/tests/storage-rbox/TestCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Foundation. See file COPYING.
*/

#include "src/tests/storage-rbox/TestCase.h"
#include "TestCase.h"

#include <errno.h>

Expand Down
2 changes: 1 addition & 1 deletion src/tests/sync-rbox/TestCase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Foundation. See file COPYING.
*/

#include "src/tests/sync-rbox/TestCase.h"
#include "TestCase.h"

#include <errno.h>

Expand Down