]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Makefile.am:
authorDamir Tomic <viperus@ntp.org>
Wed, 17 Jun 2015 08:59:42 +0000 (10:59 +0200)
committerDamir Tomic <viperus@ntp.org>
Wed, 17 Jun 2015 08:59:42 +0000 (10:59 +0200)
  builds another test
  added ../version.c so kodDatabase builds. Should be done via a rule, needs fixing!
  added c_fileHandlingTest.h to noinst_HEADERS
  GTEST_AVAILABLE check moved into /sntp/tests/Makefile.am so unity tests can be run

bk: 558136feL52vTCTGLtTZJ1soVv_MjA

sntp/Makefile.am
sntp/tests/Makefile.am

index d09bc58ffd8d3f07e5ab0ccde1b9ba38610e45bf..1bd8d4bf26ffe58fa8f5eb3ecbba88d46093424c 100644 (file)
@@ -67,9 +67,9 @@ endif
 
 if BUILD_SNTP
 noinst_LIBRARIES = libsntp.a
-if GTEST_AVAILABLE
+#if GTEST_AVAILABLE
 SUBDIRS += tests
-endif
+#endif
 endif
 
 DIST_SUBDIRS += libopts tests
index 4b75e5f99b39aec340721004e94d378db1bae0c9..3c32047c2d71d9b71ad89bee1d435537446dc388 100644 (file)
@@ -6,6 +6,7 @@ run_unity =     cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
 
 check_PROGRAMS =               \
        test-networking         \
+       test-kodDatabase        \
        $(NULL)
 
 if GTEST_AVAILABLE
@@ -38,6 +39,7 @@ noinst_HEADERS =              \
        sntptest.h              \
        c_sntptest.h            \
        fileHandlingTest.h      \
+       c_fileHandlingTest.h    \
        $(NULL)
 
 dist_check_SCRIPTS =   tests-runner
@@ -81,7 +83,7 @@ LDADD =                                               \
 
 unity_tests_LDADD =                            \
        $(LDADD)                                \
-       $(top_builddir)/sntp/unity/libunity.a   \
+       $(top_builddir)/unity/libunity.a        \
        $(NULL)
 
 AM_CFLAGS   = $(CFLAGS_NTP)
@@ -103,22 +105,43 @@ test_networking_CFLAGS =                  \
        $(NULL)
 
 test_networking_LDADD =                                \
-       $(LDADD)                                \
-       $(top_builddir)/unity/libunity.a        \
+       $(unity_tests_LDADD)                    \
+       $(NULL)
+
+test_kodDatabase_CFLAGS =              \
+       -I$(top_srcdir)/unity           \
+       $(NULL)
+
+test_kodDatabase_LDADD =                       \
+       $(unity_tests_LDADD)                    \
        $(NULL)
 
+
 BUILT_SOURCES +=                                       \
        $(srcdir)/networking.c run-test-networking.c    \
+       $(srcdir)/kodDatabase.c run-test-kodDatabase.c  \
        $(NULL)
 
-test_networking_SOURCES =                      \
+test_networking_SOURCES =              \
        networking.c                    \
        run-test-networking.c           \
        $(NULL)
 
+test_kodDatabase_SOURCES =             \
+       kodDatabase.c                   \
+       run-test-kodDatabase.c          \
+       ../version.c                    \
+       $(NULL)
+
 $(srcdir)/run-test-networking.c: $(srcdir)/networking.c $(std_unity_list)
        $(run_unity) networking.c run-test-networking.c
 
+$(srcdir)/run-test-kodDatabase.c: $(srcdir)/kodDatabase.c $(std_unity_list)
+       $(run_unity) kodDatabase.c run-test-kodDatabase.c
+
+#$(srcdir)/../version.c: $(srcdir)/../version.c
+#      gcc -o version.o ../version.c
+
 TESTS = 
 
 if !NTP_CROSSCOMPILE