gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-twister] branch master updated: fix test driver


From: gnunet
Subject: [GNUnet-SVN] [taler-twister] branch master updated: fix test driver
Date: Sat, 20 Jan 2018 18:15:32 +0100

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository twister.

The following commit(s) were added to refs/heads/master by this push:
     new c2c3f8a  fix test driver
c2c3f8a is described below

commit c2c3f8a50440b3cd1693e5602790447803db32c2
Author: Christian Grothoff <address@hidden>
AuthorDate: Sat Jan 20 18:15:26 2018 +0100

    fix test driver
---
 src/test/Makefile.am                       | 8 +++++---
 src/test/{test_twister => test_twister.sh} | 5 +++--
 src/test/test_twister_webserver.c          | 5 ++---
 3 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/src/test/Makefile.am b/src/test/Makefile.am
index 2547d3f..cbe95ad 100644
--- a/src/test/Makefile.am
+++ b/src/test/Makefile.am
@@ -1,11 +1,13 @@
-check_PROGRAMS = \
+noinst_PROGRAMS = \
   test_twister_webserver
 
 test_twister_webserver_SOURCES = \
   test_twister_webserver.c
-
 test_twister_webserver_LDADD = \
   -lmicrohttpd
 
 TESTS = \
-  test_twister # shell script
+  test_twister.sh
+
+EXTRA_DIST = \
+  $(TESTS)
diff --git a/src/test/test_twister b/src/test/test_twister.sh
similarity index 91%
rename from src/test/test_twister
rename to src/test/test_twister.sh
index 86dbac1..bf3075c 100755
--- a/src/test/test_twister
+++ b/src/test/test_twister.sh
@@ -3,14 +3,12 @@
 # Steps:
 
 # 1) Launch the Web server.
-
 ./test_twister_webserver &
 
 # 2) Launch the Twister.
 # 3) Use the Twister-APIs via the C-L tool.
 
 # 4) Use curl to GET /something
-
 status_code=$(curl -s http://localhost:8080/ -o /dev/null \
   -w "%{http_code}")
 
@@ -18,3 +16,6 @@ status_code=$(curl -s http://localhost:8080/ -o /dev/null \
 echo $status_code
 
 # 5) Check the HTTP status code is the hacked! 
+kill %1
+
+# shutdown webserver
diff --git a/src/test/test_twister_webserver.c 
b/src/test/test_twister_webserver.c
index 0cda31f..d4ea655 100644
--- a/src/test/test_twister_webserver.c
+++ b/src/test/test_twister_webserver.c
@@ -22,7 +22,7 @@
 /**
  * This code is in the public domain.
  */
-
+#include <limits.h>
 #include <sys/types.h>
 #ifndef _WIN32
 #include <sys/select.h>
@@ -72,8 +72,7 @@ main (void)
                              &answer_to_connection, NULL, MHD_OPTION_END);
   if (NULL == daemon)
     return 1;
-
-  (void) getchar ();
+  sleep (UINT_MAX);
 
   MHD_stop_daemon (daemon);
   return 0;

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]