From: Damir Tomic Date: Sun, 7 Jun 2015 15:14:49 +0000 (+0200) Subject: removed some spaces from Makefile.am, removed init_auth from setUp, because every... X-Git-Tag: NTP_4_3_40~6^2~21 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2ed0cd57bee24c6db604a473842382f7260b34a3;p=thirdparty%2Fntp.git removed some spaces from Makefile.am, removed init_auth from setUp, because every test was calling it. Added init_auth inside run-test-authkeys.c. This is aproblem because I had to modify an autogenerated file! bk: 55745fe96kr50yxc8edcyQapPlIpsw --- diff --git a/tests/libntp/Makefile.am b/tests/libntp/Makefile.am index ab37af4bb..cdb5a4f5b 100644 --- a/tests/libntp/Makefile.am +++ b/tests/libntp/Makefile.am @@ -179,10 +179,6 @@ test_a_md5encrypt_LDADD = \ -lm $(NULL) - - - - test_atouint_CFLAGS = \ -I$(top_srcdir)/sntp/unity \ $(NULL) @@ -201,6 +197,7 @@ test_authkeys_LDADD = \ -lm \ $(NULL) + #removed one combined test, because unity devs suggested we use one program per test #test_libntp_SOURCES = \ # modetoa.c \ diff --git a/tests/libntp/authkeys.c b/tests/libntp/authkeys.c index 437c73700..bc5883e5e 100644 --- a/tests/libntp/authkeys.c +++ b/tests/libntp/authkeys.c @@ -15,6 +15,8 @@ // old code from google test framework, moved to SetUp() for unity void setUp(void) { + //init_lib(); + /* * init_auth() is called by tests_main.cpp earlier. It * does not initialize global variables like diff --git a/tests/libntp/run-test-authkeys.c b/tests/libntp/run-test-authkeys.c index 5ac6ef52f..eecb25870 100644 --- a/tests/libntp/run-test-authkeys.c +++ b/tests/libntp/run-test-authkeys.c @@ -45,14 +45,16 @@ void resetTest() //=======MAIN===== int main(void) { + init_auth(); + Unity.TestFile = "authkeys.c"; UnityBegin("authkeys.c"); - RUN_TEST(test_AddTrustedKeys, 59); - RUN_TEST(test_AddUntrustedKey, 70); - RUN_TEST(test_HaveKeyCorrect, 78); - RUN_TEST(test_HaveKeyIncorrect, 87); - RUN_TEST(test_AddWithAuthUseKey, 94); - RUN_TEST(test_EmptyKey, 101); + RUN_TEST(test_AddTrustedKeys, 61); + RUN_TEST(test_AddUntrustedKey, 72); + RUN_TEST(test_HaveKeyCorrect, 80); + RUN_TEST(test_HaveKeyIncorrect, 89); + RUN_TEST(test_AddWithAuthUseKey, 96); + RUN_TEST(test_EmptyKey, 103); return (UnityEnd()); }