You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/02/29 21:24:25 UTC

(couchdb) branch nouveau/path-handling created (now 92b187451)

This is an automated email from the ASF dual-hosted git repository.

ronny pushed a change to branch nouveau/path-handling
in repository https://gitbox.apache.org/repos/asf/couchdb.git


      at 92b187451 feat(`nouveau`): change path handling for Windows (and *nix) to run tests

This branch includes the following new commits:

     new 92b187451 feat(`nouveau`): change path handling for Windows (and *nix) to run tests

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



(couchdb) 01/01: feat(`nouveau`): change path handling for Windows (and *nix) to run tests

Posted by ro...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ronny pushed a commit to branch nouveau/path-handling
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit 92b187451fb091f8f133f223c67d24839fbc7da5
Author: Ronny Berndt <ro...@apache.org>
AuthorDate: Thu Feb 29 22:24:11 2024 +0100

    feat(`nouveau`): change path handling for Windows (and *nix) to run tests
---
 dev/run | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/dev/run b/dev/run
index 6fcc8927f..a631377e0 100755
--- a/dev/run
+++ b/dev/run
@@ -428,7 +428,7 @@ def generate_nouveau_config(ctx):
         content = handle.read()
 
     for key in config:
-        content = re.sub("{{%s}}" % key, str(config[key]), content)
+        content = content.replace("{{%s}}" % key, f"'{config[key]}'")
 
     with open(tgt, "w") as handle:
         handle.write(content)
@@ -540,23 +540,23 @@ def maybe_boot_nouveau(ctx):
 
 def boot_nouveau(ctx):
     config = os.path.join(ctx["devdir"], "lib", "nouveau.yaml")
+    gradle = "gradlew.bat" if os.name == "nt" else "gradlew"
     cmd = [
-        "./gradlew",
+        os.path.join(ctx["rootdir"], "nouveau", gradle),
         "run",
         "--args",
-        "server {}".format(config),
+        f"server '{config}'"
     ]
     logfname = os.path.join(ctx["devdir"], "logs", "nouveau.log")
     log = open(logfname, "w")
     return sp.Popen(
         cmd,
-        cwd="nouveau",
+        cwd=os.path.join(ctx["rootdir"], "nouveau"),
         stdin=sp.PIPE,
         stdout=log,
         stderr=sp.STDOUT,
     )
 
-
 JAVA_VERSION_RE = re.compile(r'"(\d+\.\d+).*"')