tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit b60c123daa3f1616689ca1c7f8a13e4c803f6042
parent fdc920a64e87b8bd2ead1a740c545a9236ac5deb
Author: Greg Mierzwinski <gmierz2@outlook.com>
Date:   Wed, 15 Oct 2025 19:14:45 +0000

Bug 1893092 - Change browser profile location to TASK_WORKDIR in CI. r=perftest-reviewers,aglavic

This patch fixes an issue in talos where the profile directory gets deleted partway through a test. It changes the location of the profile directory from the temporary location (e.g. `LOCALAPPDATA` for windows) to `TASK_WORKDIR`. The profile directory is still cleaned up at the end of the test run as well.

Differential Revision: https://phabricator.services.mozilla.com/D267775

Diffstat:
Mtesting/talos/talos/ffsetup.py | 8+++++++-
1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/testing/talos/talos/ffsetup.py b/testing/talos/talos/ffsetup.py @@ -51,8 +51,14 @@ class FFSetup: def __init__(self, browser_config, test_config): self.browser_config, self.test_config = browser_config, test_config - self._tmp_dir = tempfile.mkdtemp() self.env = None + + if "MOZ_AUTOMATION" in os.environ: + # Bug 1893092 - Windows is deleting temporary dirs during the test runs in CI + self._tmp_dir = os.path.join(os.environ["TASK_WORKDIR"], "temp") + else: + self._tmp_dir = tempfile.mkdtemp() + # The profile dir must be named 'profile' because of xperf analysis # (in etlparser.py). TODO fix that ? self.profile_dir = os.path.join(self._tmp_dir, "profile")