[java-idp-integration-tests] 01/02: Add env vars to debugging command script
Tom Zeller
tzeller at dragonacea.biz
Sat Jan 7 18:43:30 UTC 2023
This is an automated email from the git hooks/post-receive script.
tzeller pushed a commit to branch main
in repository java-idp-integration-tests.
View the commit online:
http://git.shibboleth.net/view/?p=java-idp-integration-tests.git;a=commit;h=44baa5e15091618824e39983ad222f71f4c5664c
commit 44baa5e15091618824e39983ad222f71f4c5664c
Author: Tom Zeller <tzeller at dragonacea.biz>
AuthorDate: Sat Jan 7 12:42:49 2023 -0600
Add env vars to debugging command script
---
.../idp/integration/tests/AbstractServerProcess.java | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/src/test/java/net/shibboleth/idp/integration/tests/AbstractServerProcess.java b/src/test/java/net/shibboleth/idp/integration/tests/AbstractServerProcess.java
index ef2c8dd..78f1f42 100644
--- a/src/test/java/net/shibboleth/idp/integration/tests/AbstractServerProcess.java
+++ b/src/test/java/net/shibboleth/idp/integration/tests/AbstractServerProcess.java
@@ -287,6 +287,22 @@ public class AbstractServerProcess extends AbstractInitializableComponent implem
log.debug("Will start server using command '{}'", processBuilder.command());
log.debug("Writing command to start server to '{}'", pathToContainerBase.resolve("start.sh"));
Files.write(pathToContainerBase.resolve("start.sh"), String.join(" ", processBuilder.command()).getBytes());
+
+ // Write command to start server to file to help debugging tests
+ log.debug("Writing command to start server to '{}'", pathToContainerBase.resolve("start.sh"));
+ String commandToStartServer = "";
+ for (final String envVar : new String[] {
+ "JETTY_BASE",
+ "JETTY_HOME",
+ "CATALINA_HOME",
+ "CATALINA_BASE" }) {
+ if (processBuilder.environment().containsKey(envVar)) {
+ commandToStartServer += envVar + "=" + processBuilder.environment().get(envVar) + " ";
+ }
+ }
+ commandToStartServer += String.join(" ", processBuilder.command());
+ Files.write(pathToContainerBase.resolve("start.sh"), commandToStartServer.getBytes());
+
final Stopwatch stopwatch = Stopwatch.createStarted();
// Workaround Maven Surefire Plugin freeze if Jetty 10 writes to stdout or stderr
processBuilder.redirectOutput(Redirect.INHERIT);
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list