]> git.ipfire.org Git - thirdparty/ntp.git/commitdiff
generate_test_runner.rb:
authorDamir Tomic <viperus@ntp.org>
Fri, 12 Jun 2015 08:50:27 +0000 (10:50 +0200)
committerDamir Tomic <viperus@ntp.org>
Fri, 12 Jun 2015 08:50:27 +0000 (10:50 +0200)
  test runners main() will always call init_lib() and init_auth()

bk: 557a9d53GrmxgMwf6PkEcLXtbIttdQ

sntp/unity/auto/generate_test_runner.rb
tests/libntp/authkeys.c

index 4f1e709c8d55fb97757d347fe637a29f49fec7eb..0a02c70f1f2ab1e9d5e7114f77ee9421b0befb2b 100644 (file)
@@ -250,7 +250,8 @@ class UnityTestRunnerGenerator
     #output.puts("\nu_long current_time = 4; // needed by authkeys. Used only in to calculate lifetime.\n");
   
     output.puts("  progname = argv[0];\n")    
-
+    output.puts("  init_lib();\n")
+    output.puts("  init_auth();\n")    
     output.puts("  suite_setup();") unless @options[:suite_setup].nil?
     output.puts("  Unity.TestFile = \"#{filename}\";")
     output.puts("  UnityBegin(\"#{filename}\");")
index 1fbb8e3c1107c44c6ea1b96b1f67785ad5609130..c1cc85b3710a6435f3e7480f6d75d038bec15d5e 100644 (file)
@@ -17,7 +17,8 @@ u_long current_time = 4;
 // old code from google test framework, moved to SetUp() for unity
 void setUp(void)
 { 
-       //init_lib();
+//     init_lib();
+//     init_auth(); //causes segfault
        
 /*
         * init_auth() is called by tests_main.cpp earlier.  It
@@ -34,6 +35,7 @@ void setUp(void)
        cache_flags = 0;
        cache_secret = NULL;
        cache_secretsize = 0;
+
 }
 
 void tearDown(void)