passenger 5.3.5 → 5.3.6

Sign up to get free protection for your applications and to get access to all the features.
Files changed (211) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +13 -0
  3. data/README.md +2 -1
  4. data/Rakefile +0 -5
  5. data/build/agent.rb +2 -1
  6. data/build/cxx_tests.rb +18 -20
  7. data/build/integration_tests.rb +6 -2
  8. data/build/support/cxx_dependency_map.rb +2019 -1966
  9. data/dev/colorize-logs +272 -0
  10. data/src/agent/Core/AdminPanelConnector.h +3 -3
  11. data/src/agent/Core/ApiServer.h +4 -4
  12. data/src/agent/Core/ApplicationPool/BasicProcessInfo.h +2 -2
  13. data/src/agent/Core/ApplicationPool/Group/OutOfBandWork.cpp +2 -2
  14. data/src/agent/Core/ApplicationPool/Implementation.cpp +5 -5
  15. data/src/agent/Core/ApplicationPool/Pool.h +4 -4
  16. data/src/agent/Core/ApplicationPool/Process.h +10 -15
  17. data/src/agent/Core/ApplicationPool/Socket.h +2 -2
  18. data/src/agent/Core/ApplicationPool/TestSession.h +3 -3
  19. data/src/agent/Core/Config.h +4 -2
  20. data/src/agent/Core/Controller.h +4 -4
  21. data/src/agent/Core/Controller/Config.h +1 -1
  22. data/src/agent/Core/Controller/SendRequest.cpp +2 -2
  23. data/src/agent/Core/Controller/TurboCaching.h +2 -2
  24. data/src/agent/Core/CoreMain.cpp +2 -2
  25. data/src/agent/Core/OptionParser.h +2 -2
  26. data/src/agent/Core/ResponseCache.h +3 -3
  27. data/src/agent/Core/SecurityUpdateChecker.h +2 -2
  28. data/src/agent/Core/SpawningKit/Config.h +2 -1
  29. data/src/agent/Core/SpawningKit/Config/AutoGeneratedCode.h +1 -1
  30. data/src/agent/Core/SpawningKit/Context.h +1 -1
  31. data/src/agent/Core/SpawningKit/DirectSpawner.h +3 -3
  32. data/src/agent/Core/SpawningKit/DummySpawner.h +3 -3
  33. data/src/agent/Core/SpawningKit/ErrorRenderer.h +1 -1
  34. data/src/agent/Core/SpawningKit/Exceptions.h +2 -2
  35. data/src/agent/Core/SpawningKit/Factory.h +1 -1
  36. data/src/agent/Core/SpawningKit/Handshake/BackgroundIOCapturer.h +1 -1
  37. data/src/agent/Core/SpawningKit/Handshake/Perform.h +13 -2
  38. data/src/agent/Core/SpawningKit/Handshake/Prepare.h +3 -3
  39. data/src/agent/Core/SpawningKit/Handshake/WorkDir.h +1 -1
  40. data/src/agent/Core/SpawningKit/Journey.h +4 -5
  41. data/src/agent/Core/SpawningKit/PipeWatcher.h +1 -1
  42. data/src/agent/Core/SpawningKit/Result.h +20 -8
  43. data/src/agent/Core/SpawningKit/Result/AutoGeneratedCode.h +1 -1
  44. data/src/agent/Core/SpawningKit/SmartSpawner.h +6 -6
  45. data/src/agent/Core/SpawningKit/Spawner.h +2 -2
  46. data/src/agent/Core/TelemetryCollector.h +13 -7
  47. data/src/agent/ExecHelper/ExecHelperMain.cpp +1 -1
  48. data/src/agent/README.md +1 -1
  49. data/src/agent/Shared/ApiAccountUtils.h +1 -1
  50. data/src/agent/Shared/ApiServerUtils.h +3 -3
  51. data/src/agent/Shared/ApplicationPoolApiKey.h +2 -2
  52. data/src/agent/Shared/Fundamentals/Initialization.cpp +4 -4
  53. data/src/agent/SpawnEnvSetupper/SpawnEnvSetupperMain.cpp +1 -1
  54. data/src/agent/SystemMetrics/SystemMetricsMain.cpp +4 -3
  55. data/src/agent/Watchdog/ApiServer.h +3 -3
  56. data/src/agent/Watchdog/Config.h +3 -2
  57. data/src/agent/Watchdog/CoreWatcher.cpp +2 -2
  58. data/src/agent/Watchdog/WatchdogMain.cpp +93 -27
  59. data/src/apache2_module/Config.cpp +14 -14
  60. data/src/apache2_module/Config.h +8 -16
  61. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp +505 -491
  62. data/src/apache2_module/ConfigGeneral/AutoGeneratedDefinitions.cpp.cxxcodebuilder +39 -17
  63. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp +24 -1
  64. data/src/apache2_module/ConfigGeneral/AutoGeneratedSetterFuncs.cpp.cxxcodebuilder +31 -1
  65. data/src/{cxx_supportlib/Utils/MemoryBarrier.h → apache2_module/ConfigGeneral/Common.h} +17 -25
  66. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp +12 -1
  67. data/src/apache2_module/DirConfig/AutoGeneratedCreateFunction.cpp.cxxcodebuilder +16 -1
  68. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp +19 -5
  69. data/src/apache2_module/DirConfig/AutoGeneratedHeaderSerialization.cpp.cxxcodebuilder +26 -9
  70. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp +6 -1
  71. data/src/apache2_module/DirConfig/AutoGeneratedManifestGeneration.cpp.cxxcodebuilder +10 -1
  72. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp +7 -1
  73. data/src/apache2_module/DirConfig/AutoGeneratedMergeFunction.cpp.cxxcodebuilder +11 -1
  74. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h +23 -1
  75. data/src/apache2_module/DirConfig/AutoGeneratedStruct.h.cxxcodebuilder +34 -1
  76. data/src/apache2_module/Hooks.cpp +3 -3
  77. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h +24 -1
  78. data/src/apache2_module/ServerConfig/AutoGeneratedStruct.h.cxxcodebuilder +36 -1
  79. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.cpp +2 -2
  80. data/src/cxx_supportlib/{Utils → Algorithms}/Hasher.h +4 -4
  81. data/src/cxx_supportlib/AppTypeDetector/Detector.h +1 -1
  82. data/src/cxx_supportlib/ConfigKit/Schema.h +2 -2
  83. data/src/cxx_supportlib/ConfigKit/Store.h +1 -1
  84. data/src/cxx_supportlib/Constants.h +1 -1
  85. data/src/cxx_supportlib/{Utils → DataStructures}/HashMap.h +4 -4
  86. data/src/cxx_supportlib/DataStructures/HashedStaticString.h +5 -5
  87. data/src/cxx_supportlib/DataStructures/LString.h +3 -3
  88. data/src/cxx_supportlib/{Utils → DataStructures}/StringMap.h +36 -36
  89. data/src/cxx_supportlib/FileTools/FileManip.cpp +1 -1
  90. data/src/cxx_supportlib/FileTools/PathManip.cpp +2 -2
  91. data/src/cxx_supportlib/FileTools/PathSecurityCheck.cpp +1 -1
  92. data/src/cxx_supportlib/Hooks.h +2 -2
  93. data/src/cxx_supportlib/{Utils → IOTools}/BufferedIO.h +5 -5
  94. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.cpp +2 -2
  95. data/src/cxx_supportlib/{Utils → IOTools}/IOUtils.h +3 -3
  96. data/src/cxx_supportlib/{Utils → IOTools}/MessageIO.h +7 -7
  97. data/src/cxx_supportlib/{MessageReadersWriters.h → IOTools/MessageSerialization.h} +5 -5
  98. data/src/cxx_supportlib/InstanceDirectory.h +4 -4
  99. data/src/cxx_supportlib/Integrations/LibevJsonUtils.h +3 -3
  100. data/src/cxx_supportlib/{Utils → JsonTools}/JsonUtils.h +5 -5
  101. data/src/cxx_supportlib/LoggingKit/Context.h +2 -2
  102. data/src/cxx_supportlib/LoggingKit/Implementation.cpp +3 -3
  103. data/src/cxx_supportlib/MemoryKit/mbuf.cpp +2 -2
  104. data/src/cxx_supportlib/ProcessManagement/Spawn.cpp +5 -5
  105. data/src/cxx_supportlib/ProcessManagement/Utils.h +10 -0
  106. data/src/cxx_supportlib/RandomGenerator.h +2 -2
  107. data/src/cxx_supportlib/{Crypto.cpp → SecurityKit/Crypto.cpp} +4 -4
  108. data/src/cxx_supportlib/{Crypto.h → SecurityKit/Crypto.h} +4 -4
  109. data/src/cxx_supportlib/{Utils → SecurityKit}/MemZeroGuard.h +0 -0
  110. data/src/cxx_supportlib/ServerKit/AcceptLoadBalancer.h +2 -2
  111. data/src/cxx_supportlib/ServerKit/Channel.h +1 -1
  112. data/src/cxx_supportlib/ServerKit/Context.h +2 -2
  113. data/src/cxx_supportlib/ServerKit/FileBufferedChannel.h +1 -1
  114. data/src/cxx_supportlib/ServerKit/HttpHeaderParser.h +3 -3
  115. data/src/cxx_supportlib/ServerKit/HttpHeaderParserState.h +2 -2
  116. data/src/cxx_supportlib/ServerKit/HttpServer.h +16 -10
  117. data/src/cxx_supportlib/ServerKit/Server.h +3 -3
  118. data/src/cxx_supportlib/{Utils → StrIntTools}/DateParsing.h +5 -5
  119. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.cpp +3 -3
  120. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtils.h +0 -0
  121. data/src/cxx_supportlib/{Utils → StrIntTools}/StrIntUtilsNoStrictAliasing.cpp +2 -2
  122. data/src/cxx_supportlib/{Utils → StrIntTools}/StringScanning.h +5 -5
  123. data/src/cxx_supportlib/{Utils → StrIntTools}/Template.h +30 -5
  124. data/src/cxx_supportlib/SystemTools/ContainerHelpers.h +34 -0
  125. data/src/cxx_supportlib/{Utils → SystemTools}/ProcessMetricsCollector.h +6 -6
  126. data/src/cxx_supportlib/{Utils → SystemTools}/SystemMetricsCollector.h +3 -3
  127. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.cpp +1 -1
  128. data/src/cxx_supportlib/{Utils → SystemTools}/SystemTime.h +0 -0
  129. data/src/cxx_supportlib/SystemTools/UserDatabase.h +1 -1
  130. data/src/cxx_supportlib/Utils.cpp +2 -2
  131. data/src/cxx_supportlib/Utils/CachedFileStat.hpp +3 -3
  132. data/src/cxx_supportlib/Utils/Curl.h +2 -2
  133. data/src/cxx_supportlib/Utils/FileChangeChecker.h +2 -2
  134. data/src/cxx_supportlib/Utils/MessagePassing.h +1 -1
  135. data/src/cxx_supportlib/Utils/SpeedMeter.h +2 -2
  136. data/src/cxx_supportlib/Utils/Timer.h +2 -2
  137. data/src/cxx_supportlib/Utils/VariantMap.h +3 -3
  138. data/src/cxx_supportlib/WatchdogLauncher.h +3 -3
  139. data/src/cxx_supportlib/WebSocketCommandReverseServer.h +1 -1
  140. data/src/cxx_supportlib/WrapperRegistry/Registry.h +1 -1
  141. data/src/cxx_supportlib/vendor-modified/psg_sysqueue.h +3 -0
  142. data/src/ruby_supportlib/phusion_passenger.rb +1 -1
  143. data/src/ruby_supportlib/phusion_passenger/common_library.rb +11 -11
  144. data/src/ruby_supportlib/phusion_passenger/config/agent_compiler.rb +4 -4
  145. data/src/ruby_supportlib/phusion_passenger/config/nginx_engine_compiler.rb +1 -1
  146. data/src/ruby_supportlib/phusion_passenger/message_channel.rb +2 -2
  147. data/src/ruby_supportlib/phusion_passenger/packaging.rb +20 -19
  148. data/src/ruby_supportlib/phusion_passenger/platform_info/apache.rb +22 -4
  149. data/src/ruby_supportlib/phusion_passenger/platform_info/ruby.rb +33 -13
  150. data/src/schema_printer/SchemaPrinterMain.cpp +2 -0
  151. metadata +28 -86
  152. data/.editorconfig +0 -134
  153. data/CODE_OF_CONDUCT.md +0 -52
  154. data/dev/boost-patches/0001-Patch-boost-thread-so-that-oxt-thread-can-use-it.patch +0 -48
  155. data/dev/boost-patches/0002-Make-boost-thread_interrupted-derive-from-oxt-tracab.patch +0 -33
  156. data/dev/boost-patches/0003-Disable-a-Clang-pragma-to-prevent-warnings-on-OS-X.patch +0 -25
  157. data/dev/ci/README.md +0 -134
  158. data/dev/ci/lib/functions.sh +0 -129
  159. data/dev/ci/lib/set-container-envvars.sh +0 -53
  160. data/dev/ci/lib/setup-container.sh +0 -46
  161. data/dev/ci/run-tests-natively +0 -24
  162. data/dev/ci/run-tests-with-docker +0 -42
  163. data/dev/ci/scripts/debug-console-wrapper.sh +0 -29
  164. data/dev/ci/scripts/docker-entrypoint-stage2.sh +0 -17
  165. data/dev/ci/scripts/docker-entrypoint.sh +0 -17
  166. data/dev/ci/scripts/inituidgid +0 -17
  167. data/dev/ci/scripts/run-tests-natively-stage2.sh +0 -17
  168. data/dev/ci/scripts/setup-host-natively.sh +0 -11
  169. data/dev/ci/setup-host +0 -56
  170. data/dev/ci/tests/apache2/run +0 -6
  171. data/dev/ci/tests/apache2/setup +0 -4
  172. data/dev/ci/tests/binaries/Jenkinsfile +0 -105
  173. data/dev/ci/tests/binaries/build-linux +0 -38
  174. data/dev/ci/tests/binaries/build-macos +0 -40
  175. data/dev/ci/tests/binaries/prepare-macos +0 -38
  176. data/dev/ci/tests/binaries/test-linux +0 -45
  177. data/dev/ci/tests/binaries/test-macos +0 -38
  178. data/dev/ci/tests/cxx/run +0 -9
  179. data/dev/ci/tests/cxx/setup +0 -4
  180. data/dev/ci/tests/debian/Jenkinsfile +0 -89
  181. data/dev/ci/tests/debian/run +0 -60
  182. data/dev/ci/tests/nginx-dynamic/run +0 -20
  183. data/dev/ci/tests/nginx-dynamic/setup +0 -4
  184. data/dev/ci/tests/nginx/run +0 -5
  185. data/dev/ci/tests/nginx/setup +0 -4
  186. data/dev/ci/tests/nodejs/run +0 -4
  187. data/dev/ci/tests/nodejs/setup +0 -4
  188. data/dev/ci/tests/rpm/Jenkinsfile +0 -68
  189. data/dev/ci/tests/rpm/run +0 -63
  190. data/dev/ci/tests/ruby/run +0 -4
  191. data/dev/ci/tests/ruby/setup +0 -4
  192. data/dev/ci/tests/source-packaging/run +0 -4
  193. data/dev/ci/tests/source-packaging/setup +0 -4
  194. data/dev/ci/tests/standalone/run +0 -4
  195. data/dev/ci/tests/standalone/setup +0 -4
  196. data/dev/configkit-schemas/index.json +0 -1850
  197. data/dev/configkit-schemas/update_schema_inline_comments.rb +0 -118
  198. data/dev/rack.test/config.ru +0 -5
  199. data/dev/rack.test/public/asset.txt +0 -1
  200. data/dev/vagrant/apache_default_site.conf +0 -35
  201. data/dev/vagrant/apache_passenger.conf +0 -5
  202. data/dev/vagrant/apache_passenger.load +0 -1
  203. data/dev/vagrant/apache_ports.conf +0 -24
  204. data/dev/vagrant/apache_rack_test.conf +0 -9
  205. data/dev/vagrant/bashrc +0 -23
  206. data/dev/vagrant/nginx.conf +0 -39
  207. data/dev/vagrant/nginx_rakefile +0 -33
  208. data/dev/vagrant/nginx_start +0 -32
  209. data/dev/vagrant/provision.sh +0 -117
  210. data/dev/vagrant/sudoers.conf +0 -5
  211. data/resources/templates/error_renderer/.editorconfig +0 -19
@@ -1,33 +0,0 @@
1
- From 581af47e251b34f0ae410c29758884c1f033610e Mon Sep 17 00:00:00 2001
2
- From: "Hongli Lai (Phusion)" <hongli@phusion.nl>
3
- Date: Mon, 15 Feb 2016 12:22:44 +0100
4
- Subject: [PATCH] Make boost::thread_interrupted derive from
5
- oxt::tracable_exception
6
-
7
- ---
8
- src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp | 2 ++
9
- 1 file changed, 2 insertions(+)
10
-
11
- diff --git a/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp b/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp
12
- index d97465b75..3f780bfb1 100644
13
- --- a/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp
14
- +++ b/src/cxx_supportlib/vendor-modified/boost/thread/exceptions.hpp
15
- @@ -21,6 +21,7 @@
16
- #include <stdexcept>
17
- #include <boost/system/system_error.hpp>
18
- #include <boost/system/error_code.hpp>
19
- +#include <oxt/tracable_exception.hpp>
20
-
21
-
22
- #include <boost/config/abi_prefix.hpp>
23
- @@ -30,6 +31,7 @@ namespace boost
24
-
25
- #if defined BOOST_THREAD_PROVIDES_INTERRUPTIONS
26
- class BOOST_SYMBOL_VISIBLE thread_interrupted
27
- + : public oxt::tracable_exception
28
- {};
29
- #endif
30
-
31
- --
32
- 2.13.0
33
-
@@ -1,25 +0,0 @@
1
- From 4503df46a907a46a37238bbff04f887c65c7f376 Mon Sep 17 00:00:00 2001
2
- From: "Hongli Lai (Phusion)" <hongli@phusion.nl>
3
- Date: Mon, 15 Feb 2016 12:38:22 +0100
4
- Subject: [PATCH] Disable a Clang pragma to prevent warnings on OS X
5
-
6
- ---
7
- src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp | 2 +-
8
- 1 file changed, 1 insertion(+), 1 deletion(-)
9
-
10
- diff --git a/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp b/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp
11
- index 05ac71a68..5e63db629 100644
12
- --- a/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp
13
- +++ b/src/cxx_supportlib/vendor-modified/boost/regex/v4/instances.hpp
14
- @@ -121,7 +121,7 @@ template class BOOST_REGEX_TEMPLATE_DECL ::boost::BOOST_REGEX_DETAIL_NS::perl_ma
15
-
16
- #ifdef __clang__
17
- #pragma clang diagnostic push
18
- -#pragma clang diagnostic ignored "-Wkeyword-macro"
19
- +//#pragma clang diagnostic ignored "-Wkeyword-macro"
20
- #endif
21
-
22
- # ifndef BOOST_REGEX_INSTANTIATE
23
- --
24
- 2.13.0
25
-
@@ -1,134 +0,0 @@
1
- # Continuous integration test suite
2
-
3
- This directory contains scripts that invoke the Passenger test suite. These scripts are invoked from the Passenger continuous integration environment, based on Jenkins.
4
-
5
- The following diagrams explain how the different files fit together.
6
-
7
- ## Flow on Linux
8
-
9
- ~~~
10
- Invoke: dev/ci/setup-host
11
- | |
12
- | +-- Load: dev/ci/scripts/setup-host
13
- | |
14
- | +-- Relax file permissions (if in Jenkins)
15
- | |
16
- | +-- Create cache directories
17
- | |
18
- | +-- Create buildout directory
19
- |
20
- Invoke: dev/ci/run-tests-with-docker <test name>
21
- |
22
- +-- Exec: Docker container
23
- Entrypoint: dev/ci/scripts/docker-entrypoint.sh
24
- |
25
- +-- Exec: dev/ci/scripts/debug-console-wrapper.sh dev/ci/scripts/docker-entrypoint-stage2.sh
26
- |
27
- +-- Invoke: dev/ci/scripts/docker-entrypoint-stage2.sh
28
- | |
29
- | +-- Load: dev/ci/lib/setup-container.sh <test name>
30
- | | |
31
- | | +-- Create test/config.json
32
- | | |
33
- | | +-- Relax home permission
34
- | | |
35
- | | +-- Remove previous build products
36
- | | |
37
- | | +-- Load: dev/ci/lib/set-container-envvars.sh
38
- | | | |
39
- | | | +-- Set RVM version and various envvars
40
- | | |
41
- | | +-- Load: dev/ci/tests/<test name>/setup
42
- | |
43
- | +-- Load: dev/ci/tests/<test name>/run
44
- |
45
- +-- (if docker-entrypoint-stage2.sh exited with an error)
46
- | Populate buildout/testlogs
47
- |
48
- +-- (if docker-entrypoint-stage2.sh exited with an error,
49
- | and DEBUG_CONSOLE is set to 0)
50
- | Print error message and exit
51
- |
52
- +-- (if docker-entrypoint-stage2.sh exited with an error,
53
- and DEBUG_CONSOLE is set to 1)
54
- |
55
- +-- Load: dev/ci/lib/set-container-envvars.sh
56
- | |
57
- | +-- Set RVM version and various envvars
58
- |
59
- +-- Invoke: bash
60
- ~~~
61
-
62
- ## Flow on macOS
63
-
64
- ~~~
65
- Invoke: dev/ci/setup-host <test name>
66
- | |
67
- | +-- Relax file permissions (if in Jenkins)
68
- | |
69
- | +-- Create cache directories
70
- | |
71
- | +-- Create buildout directory
72
- | |
73
- | +-- Exec: dev/ci/scripts/debug-console-wrapper.sh dev/ci/scripts/setup-host-natively.sh <test name>
74
- | |
75
- | +-- Invoke: dev/ci/scripts/setup-host-natively.sh
76
- | | |
77
- | | +-- Load: dev/ci/lib/setup-container.sh
78
- | | |
79
- | | +-- Create test/config.json
80
- | | |
81
- | | +-- Relax home permission
82
- | | |
83
- | | +-- Remove previous build products
84
- | | |
85
- | | +-- Load: dev/ci/lib/set-container-envvars.sh
86
- | | | |
87
- | | | +-- Set RVM version and various envvars
88
- | | |
89
- | | +-- Load: dev/ci/tests/<test name>/setup
90
- | |
91
- | +-- (if setup-host-natively.sh exited with an error)
92
- | | Populate buildout/testlogs
93
- | |
94
- | +-- (if setup-host-natively.sh exited with an error,
95
- | | and DEBUG_CONSOLE is set to 0)
96
- | | Print error message and exit
97
- | |
98
- | +-- (if setup-host-natively.sh exited with an error,
99
- | and DEBUG_CONSOLE is set to 1)
100
- | |
101
- | +-- Load: dev/ci/lib/set-container-envvars.sh
102
- | | |
103
- | | +-- Set RVM version and various envvars
104
- | |
105
- | +-- Invoke: bash
106
- |
107
- Invoke: dev/ci/run-tests-natively <test name>
108
- |
109
- +-- Exec: dev/ci/scripts/debug-console-wrapper.sh dev/ci/scripts/run-tests-natively-stage2.sh <test name>
110
- |
111
- +-- Invoke: dev/ci/scripts/run-tests-natively-stage2.sh
112
- | |
113
- | +-- Load: dev/lib/set-container-envvars.sh
114
- | | |
115
- | | +-- Set RVM version and various envvars
116
- | |
117
- | +-- Load: dev/ci/tests/<test name>/run
118
- |
119
- +-- (if run-tests-natively-stage2.sh exited with an error)
120
- | Populate buildout/testlogs
121
- |
122
- +-- (if run-tests-natively-stage2.sh exited with an error,
123
- | and DEBUG_CONSOLE is set to 0)
124
- | Print error message and exit
125
- |
126
- +-- (if run-tests-natively-stage2.sh exited with an error,
127
- and DEBUG_CONSOLE is set to 1)
128
- |
129
- +-- Load: dev/ci/lib/set-container-envvars.sh
130
- | |
131
- | +-- Set RVM version and various envvars
132
- |
133
- +-- Invoke: bash
134
- ~~~
@@ -1,129 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -e
3
-
4
- RESET=$(echo -e "\033[0m")
5
- BOLD=$(echo -e "\033[1m")
6
- YELLOW=$(echo -e "\033[33m")
7
- BLUE_BG=$(echo -e "\033[44m")
8
-
9
- function header()
10
- {
11
- local title="$1"
12
- echo "${BLUE_BG}${YELLOW}${BOLD}${title}${RESET}"
13
- echo "------------------------------------------"
14
- }
15
-
16
- function header2()
17
- {
18
- local title="$1"
19
- echo "### ${BOLD}${title}${RESET}"
20
- echo
21
- }
22
-
23
- function run()
24
- {
25
- echo "+ $*"
26
- "$@"
27
- }
28
-
29
- function run_exec()
30
- {
31
- echo "+ exec $*"
32
- exec "$@"
33
- }
34
-
35
- function retry_run()
36
- {
37
- local reset='\x1B[0m'
38
- local red='\x1B[31m'
39
- local yellow='\x1B[33m'
40
-
41
- local max_tries="$1"
42
- local number=2
43
- shift
44
-
45
- echo "+ $*"
46
- while true; do
47
- if "$@"; then
48
- return 0
49
- elif [[ $number -le $max_tries ]]; then
50
- echo -e "${yellow}The command \"$*\" failed. Retrying, $number of $max_tries:${reset}"
51
- (( number++ ))
52
- else
53
- echo -e "${red}The command \"$*\" failed after $max_tries attempts. Giving up.${reset}"
54
- return 1
55
- fi
56
- done
57
- }
58
-
59
- function autodetect_environment()
60
- {
61
- echo "Environment autodetection results:"
62
- if [[ "$JENKINS_HOME" != "" ]]; then
63
- echo "Running in Jenkins: yes"
64
- export IN_JEKINS=true
65
- export CACHE_DIR="$JENKINS_HOME/cache/$JOB_NAME/executor-$EXECUTOR_NUMBER"
66
- else
67
- echo "Running in Jenkins: no"
68
- export IN_JENKINS=false
69
- export CACHE_DIR="$PASSENGER_ROOT/.ci_cache"
70
- fi
71
- if [[ -e /usr/bin/sw_vers ]]; then
72
- echo "Operating system: macOS"
73
- export OS=macos
74
- else
75
- echo "Operating system: Linux"
76
- export OS=linux
77
- fi
78
- echo "Cache directory: $CACHE_DIR"
79
- }
80
-
81
- function sanity_check_environment()
82
- {
83
- if $IN_JENKINS; then
84
- if [[ "$JOB_NAME" = "" ]]; then
85
- echo "ERROR: Jenkins environment detected, but JOB_NAME environment variable not set." >&2
86
- return 1
87
- fi
88
- if [[ "$EXECUTOR_NUMBER" = "" ]]; then
89
- echo "ERROR: Jenkins environment detected, but EXECUTOR_NUMBER environment variable not set." >&2
90
- return 1
91
- fi
92
- fi
93
- }
94
-
95
- # The following is necessary to make the C++ tests work.
96
- # They invoke Ruby scripts which require gems installed
97
- # by Bundler, but these scripts are not invoked with
98
- # Bundler, so they can only find these gems through GEM_PATH.
99
- function add_bundler_path_to_gem_path()
100
- {
101
- local bundle_path
102
-
103
- if bundle_path=$(bundle show rake); then
104
- bundle_path=$(dirname "$bundle_path")
105
- bundle_path=$(dirname "$bundle_path")
106
- echo "Adding $bundle_path to GEM_PATH"
107
- export GEM_PATH="$bundle_path:$GEM_PATH"
108
-
109
- local bundle_bin_path="$bundle_path/bin"
110
- echo "Adding $bundle_bin_path to PATH"
111
- export PATH="$bundle_bin_path:$PATH"
112
- fi
113
- }
114
-
115
- function _cleanup()
116
- {
117
- set +e
118
- local pids
119
- pids=$(jobs -p)
120
- if [[ "$pids" != "" ]]; then
121
- # shellcheck disable=SC2086
122
- kill $pids 2>/dev/null
123
- fi
124
- if [[ $(type -t cleanup) == function ]]; then
125
- cleanup
126
- fi
127
- }
128
-
129
- trap _cleanup EXIT
@@ -1,53 +0,0 @@
1
- #!/usr/bin/env bash
2
- # Do not `set -e` here because debug-console-wrapper.sh
3
- # relies on this fact.
4
-
5
- export DEVDEPS_DEFAULT=no
6
- # shellcheck disable=SC2153
7
- export DEPS_TARGET="$CACHE_DIR/bundle"
8
- export USE_CCACHE=true
9
- export COMPILE_CONCURRENCY=${COMPILE_CONCURRENCY:-2}
10
- export YARN_ARGS="--cache-folder='$CACHE_DIR/yarn'"
11
- export CCACHE_DIR="$CACHE_DIR/ccache"
12
- export CCACHE_COMPRESS=1
13
- export CCACHE_COMPRESSLEVEL=3
14
- export CCACHE_BASEDIR="$PASSENGER_ROOT"
15
- export CCACHE_SLOPPINESS=time_macros
16
- export CCACHE_LOGFILE="$(pwd)/buildout/testlogs/ccache.log"
17
- # We want Bundler invocations to be explicit. For example,
18
- # when running 'rake test:install_deps', we do not want
19
- # to invoke Bundler there because the goal might be to
20
- # install the Rake version as specified in the Gemfile,
21
- # which we may not have yet.
22
- export NOEXEC_DISABLE=1
23
-
24
- if [[ "$EXECUTOR_NUMBER" != "" ]]; then
25
- (( TEST_PORT_BASE=64000+EXECUTOR_NUMBER*10 ))
26
- export TEST_PORT_BASE
27
- fi
28
-
29
- if [[ "$OS" = macos ]]; then
30
- # Ensure that Homebrew tools can be found
31
- export PATH=$PATH:/usr/local/bin
32
- else
33
- export LC_CTYPE=C.UTF-8
34
- fi
35
-
36
- if [[ -f ~/.rvm/scripts/rvm ]]; then
37
- # shellcheck source=/dev/null
38
- source ~/.rvm/scripts/rvm
39
- else
40
- # shellcheck source=/dev/null
41
- source /usr/local/rvm/scripts/rvm
42
- fi
43
-
44
- if [[ "$TEST_RUBY_VERSION" != "" ]]; then
45
- header2 "Using Ruby version $TEST_RUBY_VERSION"
46
- run rvm use "$TEST_RUBY_VERSION"
47
- echo
48
- fi
49
-
50
- # RVM's cd override causes problems (probably thanks to bash
51
- # error handling being weird and quirky:
52
- # https://news.ycombinator.com/item?id=14321213)
53
- unset cd
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- if ! grep -q passenger.test /etc/hosts; then
4
- header2 "Updating /etc/hosts"
5
- sudo sh -c "cat >> /etc/hosts" <<EOF
6
- 127.0.0.1 passenger.test
7
- 127.0.0.1 mycook.passenger.test
8
- 127.0.0.1 zsfa.passenger.test
9
- 127.0.0.1 norails.passenger.test
10
- 127.0.0.1 1.passenger.test 2.passenger.test 3.passenger.test
11
- 127.0.0.1 4.passenger.test 5.passenger.test 6.passenger.test
12
- 127.0.0.1 7.passenger.test 8.passenger.test 9.passenger.test
13
- EOF
14
- echo
15
- fi
16
-
17
- header2 "Creating test/config.json"
18
- if [[ "$OS" = linux ]]; then
19
- run cp test/config.json.travis test/config.json
20
- else
21
- sed -e "s/_USER_/$USER/" test/config.json.travis-osx > test/config.json
22
- fi
23
- echo "+ Done."
24
- echo
25
-
26
- # Relax permissions on home directory so that the application root
27
- # permission checks pass.
28
- header2 "Relaxing home permission"
29
- run chmod g+x,o+x "$HOME"
30
- echo
31
-
32
- header2 "Removing previous build products"
33
- run rm -rf buildout/*
34
- run mkdir buildout/testlogs
35
- run rm -f test/test.log
36
- run rm -rf /tmp/psg-test-* /tmp/passenger-error-*.html
37
- echo
38
-
39
- # shellcheck source=../lib/set-container-envvars.sh
40
- source "$PASSENGER_ROOT/dev/ci/lib/set-container-envvars.sh"
41
-
42
- header "Running test-specific preparations"
43
- # shellcheck source=/dev/null
44
- source "$PASSENGER_ROOT/dev/ci/tests/$1/setup"
45
- echo '+ Done.'
46
- echo
@@ -1,24 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -eo pipefail
3
-
4
- SELFDIR=$(dirname "$0")
5
- SELFDIR=$(cd "$SELFDIR" && pwd)
6
- PASSENGER_ROOT=$(cd "$SELFDIR/../.." && pwd)
7
- # shellcheck source=lib/functions.sh
8
- source "$SELFDIR/lib/functions.sh"
9
- cd "$PASSENGER_ROOT"
10
-
11
- autodetect_environment
12
- sanity_check_environment
13
- echo
14
-
15
- if [[ "$OS" != macos ]]; then
16
- echo "ERROR: this script can only be run on macOS." >&2
17
- exit 1
18
- fi
19
-
20
- security unlock-keychain -p `cat ~/.password` ~/Library/Keychains/login.keychain
21
-
22
- export CI_COMMAND="./dev/ci/run-tests-natively $*"
23
- exec "$PASSENGER_ROOT/dev/ci/scripts/debug-console-wrapper.sh" \
24
- "$PASSENGER_ROOT/dev/ci/scripts/run-tests-natively-stage2.sh" "$@"