]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
Crypto test file
authorLokesh Walase <lokeshw24@ntp.org>
Sat, 20 Jun 2015 10:41:49 +0000 (16:11 +0530)
committerLokesh Walase <lokeshw24@ntp.org>
Sat, 20 Jun 2015 10:41:49 +0000 (16:11 +0530)
bk: 5585436dpHON7mPJCS4D5bbadUWbEg

sntp/tests/Makefile.am
sntp/tests/crypto.c

index 591fd101e80d11e382b6fd7152023a9aac2a8deb..9ec4b2693c1a92994c86725bfe09dd4c21606616 100644 (file)
@@ -11,6 +11,7 @@ run_unity =   cd $(srcdir) && ruby ../../sntp/unity/auto/generate_test_runner.rb
 #EXTRA_PROGRAMS +=     test-keyFile
 
 check_PROGRAMS =               \
+       test-crypto         \
        test-keyFile            \
        test-kodDatabase        \
        test-kodFile            \
@@ -33,7 +34,7 @@ base_SOURCES =                        \
 
 tests_SOURCES =                        \
        $(base_SOURCES)         \
-       crypto.cpp              \
+       g_crypto.cpp            \
        g_keyFile.cpp           \
        g_kodDatabase.cpp       \
        g_kodFile.cpp           \
@@ -108,12 +109,29 @@ AM_CPPFLAGS += $(CPPFLAGS_NTP)
 AM_LDFLAGS = $(LDFLAGS_NTP)
 
 BUILT_SOURCES +=                       \
+       $(srcdir)/run-crypto.c          \
        $(srcdir)/run-keyFile.c         \
        $(srcdir)/run-kodDatabase.c     \
        $(srcdir)/run-kodFile.c         \
        $(srcdir)/run-networking.c      \
        $(NULL)
 
+test_crypto_CFLAGS =                   \
+       -I$(top_srcdir)/unity           \
+       $(NULL)
+
+test_crypto_LDADD =                    \
+       $(unity_tests_LDADD)            \
+       $(NULL)
+
+test_crypto_SOURCES =                  \
+       crypto.c                        \
+       run-crypto.c                    \
+       $(top_builddir)/version.c       \
+       $(NULL)
+
+$(srcdir)/run-crypto.c: $(srcdir)/crypto.c $(std_unity_list)
+       $(run_unity) crypto.c run-crypto.c
 
 test_keyFile_CFLAGS =                  \
        -I$(top_srcdir)/unity           \
index 15ba803a0eff7f8d1a15f5ba1d8dd17ac93592ae..a51275205d12ac41d04bc8ba18e4521bc617af6c 100644 (file)
@@ -2,7 +2,7 @@
 #include "unity.h"
 #include "ntp_types.h"
 
-#include "c_sntptest.h"
+#include "sntptest.h"
 #include "crypto.h"
 
 #define MD5_LENGTH 16