pmaports/main/net-cpp/0002-Don-t-bundle-httpbin-don-t-fail-silently.patch
Luca Weiss 8c2a95dbe2
unity8: initial packaging (!27)
* Mir starts up and is able to display system settings
* x86_64 only for now, because at least ubuntu-app-test did not build
  on aarch64

Based on PureTryOut's work. Getting it to this stage was a huge effort
(as it shows in the package count: 111(!)). See the merge request for
details.

[skip ci]: this won't finish in CI; ollieparanoid made sure that
           everything builds for x86_64.
2019-02-13 21:47:29 +01:00

44 lines
1.5 KiB
Diff

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