Add exe suffix to reclient commands

Bug: b/250643500
Change-Id: I5da88a0a1c8d3797a2c553c4ab06f713c2853607
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/tools/depot_tools/+/4539481
Reviewed-by: Ramy Medhat <abdelaal@google.com>
Commit-Queue: Ben Segall <bentekkie@google.com>
changes/81/4539481/2
Ben Segall 2 years ago committed by LUCI CQ
parent 44c05276d7
commit cdefe67b38

@ -45,15 +45,17 @@ def run(cmd_args):
def start_reproxy(reclient_cfg, reclient_bin_dir):
return run([
os.path.join(reclient_bin_dir, 'bootstrap'),
'--re_proxy=' + os.path.join(reclient_bin_dir, 'reproxy'),
os.path.join(reclient_bin_dir,
'bootstrap' + gclient_paths.GetExeSuffix()), '--re_proxy=' +
os.path.join(reclient_bin_dir, 'reproxy' + gclient_paths.GetExeSuffix()),
'--cfg=' + reclient_cfg
])
def stop_reproxy(reclient_cfg, reclient_bin_dir):
return run([
os.path.join(reclient_bin_dir, 'bootstrap'), '--shutdown',
os.path.join(reclient_bin_dir,
'bootstrap' + gclient_paths.GetExeSuffix()), '--shutdown',
'--cfg=' + reclient_cfg
])

@ -13,6 +13,7 @@ import unittest.mock
ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.insert(0, ROOT_DIR)
import gclient_paths
import ninja_reclient
from testing_support import trial_dir
@ -92,12 +93,15 @@ class NinjaReclientTest(trial_dir.TestCase):
mock_call.assert_has_calls([
unittest.mock.call([
os.path.join(self.root_dir, reclient_bin_dir,
'bootstrap'), "--re_proxy=" +
os.path.join(self.root_dir, reclient_bin_dir, 'reproxy'),
'bootstrap' + gclient_paths.GetExeSuffix()),
"--re_proxy=" +
os.path.join(self.root_dir, reclient_bin_dir,
'reproxy' + gclient_paths.GetExeSuffix()),
"--cfg=" + os.path.join(self.root_dir, reclient_cfg)
]),
unittest.mock.call([
os.path.join(self.root_dir, reclient_bin_dir, 'bootstrap'),
os.path.join(self.root_dir, reclient_bin_dir,
'bootstrap' + gclient_paths.GetExeSuffix()),
"--shutdown", "--cfg=" + os.path.join(self.root_dir, reclient_cfg)
]),
])
@ -120,12 +124,15 @@ class NinjaReclientTest(trial_dir.TestCase):
mock_call.assert_has_calls([
unittest.mock.call([
os.path.join(self.root_dir, reclient_bin_dir,
'bootstrap'), "--re_proxy=" +
os.path.join(self.root_dir, reclient_bin_dir, 'reproxy'),
'bootstrap' + gclient_paths.GetExeSuffix()),
"--re_proxy=" +
os.path.join(self.root_dir, reclient_bin_dir,
'reproxy' + gclient_paths.GetExeSuffix()),
"--cfg=" + os.path.join(self.root_dir, reclient_cfg)
]),
unittest.mock.call([
os.path.join(self.root_dir, reclient_bin_dir, 'bootstrap'),
os.path.join(self.root_dir, reclient_bin_dir,
'bootstrap' + gclient_paths.GetExeSuffix()),
"--shutdown", "--cfg=" + os.path.join(self.root_dir, reclient_cfg)
]),
])

Loading…
Cancel
Save