From 22c8c77983428b9eb65180ff177d849fa6100382 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sat, 24 May 2014 15:04:45 +0200
Subject: [PATCH] Testsuite: Moved the async TLS close tests.

The async TLS close tests are now run from the main SSL testsuite,
to avoid missing them when running restricted tests.

FIXME: Consider moving the async_tls_close_test.pike script
somewhere else (Tools.Standalone?).
---
 lib/modules/SSL.pmod/testsuite.in | 12 ++++++++++++
 src/modules/_Stdio/testsuite.in   |  6 ------
 2 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/lib/modules/SSL.pmod/testsuite.in b/lib/modules/SSL.pmod/testsuite.in
index 8286447f51..95e8d34249 100644
--- a/lib/modules/SSL.pmod/testsuite.in
+++ b/lib/modules/SSL.pmod/testsuite.in
@@ -230,6 +230,18 @@ test_do([[
   add_constant("parse_fields");
 ]])
 
+define(run_sub_test, [[
+  test_tests([[
+    array a() {return Tools.Testsuite.run_script ($1);}
+  ]])
+]])
+
+dnl Displaced tests for SSL.sslfile.
+run_sub_test(({"SRCDIR../../../src/modules/_Stdio/async_tls_close_test.pike", "0", "0"}))
+run_sub_test(({"SRCDIR../../../src/modules/_Stdio/async_tls_close_test.pike", "0", "1"}))
+run_sub_test(({"SRCDIR../../../src/modules/_Stdio/async_tls_close_test.pike", "1", "0"}))
+run_sub_test(({"SRCDIR../../../src/modules/_Stdio/async_tls_close_test.pike", "1", "1"}))
+
 test_do([[
 #define ASSERT(X) if(!(X)) error("Assertion failed.\n")
 
diff --git a/src/modules/_Stdio/testsuite.in b/src/modules/_Stdio/testsuite.in
index 9fdc1068d1..5cc1df9377 100644
--- a/src/modules/_Stdio/testsuite.in
+++ b/src/modules/_Stdio/testsuite.in
@@ -379,10 +379,4 @@ cond_begin([[ Pike["PollDeviceBackend"] && Pike["PollDeviceBackend"]["HAVE_KQUEU
 cond_end
 
 
-dnl Displaced tests for SSL.sslfile.
-run_sub_test(({"SRCDIR/async_tls_close_test.pike", "0", "0"}))
-run_sub_test(({"SRCDIR/async_tls_close_test.pike", "0", "1"}))
-run_sub_test(({"SRCDIR/async_tls_close_test.pike", "1", "0"}))
-run_sub_test(({"SRCDIR/async_tls_close_test.pike", "1", "1"}))
-
 END_MARKER
-- 
GitLab