This commit is contained in:
klzgrad
2025-09-25 07:43:45 +08:00
parent 20ce2c897c
commit a30cf1b39b
2 changed files with 7 additions and 2 deletions

View File

@ -533,6 +533,9 @@ int main(int argc, char* argv[]) {
naive_proxies.push_back(std::move(naive_proxy));
}
if (getenv("TEST_MARK_STARTUP") != nullptr) {
LOG(INFO) << "TEST_MARK_STARTUP";
}
base::RunLoop().Run();
return EXIT_SUCCESS;

View File

@ -97,7 +97,9 @@ def start_naive(naive_args, config_file):
cmdline = [argv.naive]
cmdline.extend(naive_args)
proc = subprocess.Popen(cmdline, stdout=subprocess.DEVNULL,
env = os.environ.copy()
env["TEST_MARK_STARTUP"] = "yes"
proc = subprocess.Popen(cmdline, stdout=subprocess.DEVNULL, env=env,
stderr=subprocess.PIPE, text=True, encoding='utf-8')
print('subprocess.Popen', ' '.join(cmdline), 'pid:', proc.pid)
@ -122,7 +124,7 @@ def start_naive(naive_args, config_file):
print('terminate pid', proc.pid)
proc.terminate()
return 'Failed to listen'
elif 'Listening on ' in line:
elif 'TEST_MARK_STARTUP' in line:
timeout.cancel()
return proc