aboutsummaryrefslogtreecommitdiffstats
path: root/testing/net-cpp/0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
blob: ea2379369b5a8dca8045dda84bfa92bcdddeaf36 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
From e028baabc3627d5d13b9a9db2d096990ce7b7459 Mon Sep 17 00:00:00 2001
From: Luca Weiss <luca@z3ntu.xyz>
Date: Sat, 9 Feb 2019 01:32:13 +0100
Subject: [PATCH 2/3] Don't bundle httpbin, don't fail silently

---
 tests/CMakeLists.txt  |   4 ----
 tests/httpbin.h.in    |   2 +-
 tests/httpbin.tar.bz2 | Bin 15383 -> 0 bytes
 3 files changed, 1 insertion(+), 5 deletions(-)
 delete mode 100644 tests/httpbin.tar.bz2

diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index a21e322..0fcea99 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -14,10 +14,6 @@
 #
 # Authored by: Thomas Voss <thomas.voss@canonical.com>
 
-execute_process(
-    COMMAND ${CMAKE_COMMAND} -E tar xf ${CMAKE_CURRENT_SOURCE_DIR}/httpbin.tar.bz2
-    WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
-
 configure_file(
     ${CMAKE_CURRENT_SOURCE_DIR}/httpbin.h.in
     ${CMAKE_CURRENT_BINARY_DIR}/httpbin.h
diff --git a/tests/httpbin.h.in b/tests/httpbin.h.in
index 30703a2..0010068 100644
--- a/tests/httpbin.h.in
+++ b/tests/httpbin.h.in
@@ -42,7 +42,7 @@ struct Instance
     Instance()
         : server
           {
-              core::posix::exec("/usr/bin/python", {"@CMAKE_CURRENT_BINARY_DIR@/httpbin/run.py"}, {}, core::posix::StandardStream::stdout | core::posix::StandardStream::stderr)
+              core::posix::exec("/usr/bin/python3", {"-c", "from httpbin import app; app.run()"}, {}, core::posix::StandardStream::stdout /*| core::posix::StandardStream::stderr*/)
           }
     {
         std::this_thread::sleep_for(std::chrono::milliseconds{1000});

-- 
2.20.1