diff --git a/src/net/tools/naive/naive_proxy_bin.cc b/src/net/tools/naive/naive_proxy_bin.cc index 3177de6e..1a5406c1 100644 --- a/src/net/tools/naive/naive_proxy_bin.cc +++ b/src/net/tools/naive/naive_proxy_bin.cc @@ -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; diff --git a/tests/basic.py b/tests/basic.py index a684a649..010cb5ea 100644 --- a/tests/basic.py +++ b/tests/basic.py @@ -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