config: get "stty technique" working again on MacOS X.
[openssl.git] / test / enginetest.c
index 89107a3b1e222e2a6acda49bf9dff8d368d60285..4e782778598f57cdcdbe63eec74fce155fbf0106 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2000-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 2000-2017 The OpenSSL Project Authors. All Rights Reserved.
  *
  * Licensed under the OpenSSL license (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
@@ -9,21 +9,16 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <stdlib.h>
 #include <openssl/e_os2.h>
 
-#ifdef OPENSSL_NO_ENGINE
-int main(int argc, char *argv[])
-{
-    printf("No ENGINE support\n");
-    return (0);
-}
-#else
+# include "testutil.h"
+
+#ifndef OPENSSL_NO_ENGINE
 # include <openssl/buffer.h>
 # include <openssl/crypto.h>
 # include <openssl/engine.h>
 # include <openssl/err.h>
-# include "testutil.h"
-# include "test_main.h"
 
 static void display_engine_list(void)
 {
@@ -152,9 +147,9 @@ static int test_engines(void)
     }
     for (loop = 0; loop < NUMTOADD; loop++) {
         if (!TEST_true(ENGINE_add(block[loop]))) {
-            printf("Adding stopped at %d, (%s,%s)",
-                   loop, ENGINE_get_id(block[loop]),
-                   ENGINE_get_name(block[loop]));
+            test_note("Adding stopped at %d, (%s,%s)",
+                      loop, ENGINE_get_id(block[loop]),
+                      ENGINE_get_name(block[loop]));
             goto cleanup_loop;
         }
     }
@@ -180,9 +175,14 @@ static int test_engines(void)
         ENGINE_free(block[loop]);
     return to_return;
 }
+#endif
 
-void register_tests(void)
+int setup_tests(void)
 {
+#ifdef OPENSSL_NO_ENGINE
+    TEST_note("No ENGINE support");
+#else
     ADD_TEST(test_engines);
-}
 #endif
+    return 1;
+}