about summary refs log tree commit diff
path: root/src/ci
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-10-26 06:29:47 +0200
committerGitHub <noreply@github.com>2024-10-26 06:29:47 +0200
commit42a0e40e4668e0a2fa0fc1551001bbba8fb0d157 (patch)
tree80a89d904b5157c42ea1c3cfee05e454179372e5 /src/ci
parent8207d89b5e743b1c200a081d1556bb03174317db (diff)
parentce4fc999a77cacc67adf27d81264d498c05a5314 (diff)
downloadrust-42a0e40e4668e0a2fa0fc1551001bbba8fb0d157.tar.gz
rust-42a0e40e4668e0a2fa0fc1551001bbba8fb0d157.zip
Rollup merge of #132163 - claywilkinson:master, r=tmandry
Update Fuchsia CI script for package serving

This updates the "start" and "stop" methods
of the test runner to use the standalone package
server.

r? `@tmandry`
Diffstat (limited to 'src/ci')
-rwxr-xr-xsrc/ci/docker/scripts/fuchsia-test-runner.py52
1 files changed, 22 insertions, 30 deletions
diff --git a/src/ci/docker/scripts/fuchsia-test-runner.py b/src/ci/docker/scripts/fuchsia-test-runner.py
index 1aa9a4a1794..77e2741f9ea 100755
--- a/src/ci/docker/scripts/fuchsia-test-runner.py
+++ b/src/ci/docker/scripts/fuchsia-test-runner.py
@@ -287,7 +287,7 @@ class TestEnvironment:
 
     @property
     def package_server_log_path(self) -> Path:
-        return self.tmp_dir().joinpath("package_server_log")
+        return self.tmp_dir().joinpath(f"repo_{self.TEST_REPO_NAME}.log")
 
     @property
     def emulator_log_path(self) -> Path:
@@ -401,6 +401,7 @@ class TestEnvironment:
         # Set configs
         configs = {
             "log.enabled": "true",
+            "log.dir": self.tmp_dir(),
             "test.is_isolated": "true",
             "test.experimental_structured_output": "true",
         }
@@ -575,43 +576,19 @@ class TestEnvironment:
             stderr_handler=self.subprocess_logger.debug,
         )
 
-        # Add repository
-        check_call_with_logging(
-            [
-                ffx_path,
-                "repository",
-                "add-from-pm",
-                "--repository",
-                self.TEST_REPO_NAME,
-                self.repo_dir(),
-            ],
-            env=ffx_env,
-            stdout_handler=self.subprocess_logger.debug,
-            stderr_handler=self.subprocess_logger.debug,
-        )
-
-        # Start repository server
-        # Note that we must first enable the repository server daemon.
-        check_call_with_logging(
-            [
-                ffx_path,
-                "config",
-                "set",
-                "repository.server.enabled",
-                "true",
-            ],
-            env=ffx_env,
-            stdout_handler=self.subprocess_logger.debug,
-            stderr_handler=self.subprocess_logger.debug,
-        )
         check_call_with_logging(
             [
                 ffx_path,
                 "repository",
                 "server",
                 "start",
+                "--background",
                 "--address",
                 "[::]:0",
+                "--repo-path",
+                self.repo_dir(),
+                "--repository",
+                self.TEST_REPO_NAME
             ],
             env=ffx_env,
             stdout_handler=self.subprocess_logger.debug,
@@ -1009,6 +986,21 @@ class TestEnvironment:
             stderr_handler=self.subprocess_logger.debug,
         )
 
+        # Stop the package server
+        self.env_logger.info("Stopping package server...")
+        check_call_with_logging(
+            [
+                self.tool_path("ffx"),
+                "repository",
+                "server",
+                "stop",
+                self.TEST_REPO_NAME
+            ],
+            env=self.ffx_cmd_env(),
+            stdout_handler=self.subprocess_logger.debug,
+            stderr_handler=self.subprocess_logger.debug,
+        )
+
         # Stop ffx isolation
         self.env_logger.info("Stopping ffx isolation...")
         self.stop_ffx_isolation()