Fix test
This commit is contained in:
@ -533,6 +533,9 @@ int main(int argc, char* argv[]) {
|
|||||||
naive_proxies.push_back(std::move(naive_proxy));
|
naive_proxies.push_back(std::move(naive_proxy));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (getenv("TEST_MARK_STARTUP") != nullptr) {
|
||||||
|
LOG(INFO) << "TEST_MARK_STARTUP";
|
||||||
|
}
|
||||||
base::RunLoop().Run();
|
base::RunLoop().Run();
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
|
|||||||
@ -97,7 +97,9 @@ def start_naive(naive_args, config_file):
|
|||||||
cmdline = [argv.naive]
|
cmdline = [argv.naive]
|
||||||
cmdline.extend(naive_args)
|
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')
|
stderr=subprocess.PIPE, text=True, encoding='utf-8')
|
||||||
print('subprocess.Popen', ' '.join(cmdline), 'pid:', proc.pid)
|
print('subprocess.Popen', ' '.join(cmdline), 'pid:', proc.pid)
|
||||||
|
|
||||||
@ -122,7 +124,7 @@ def start_naive(naive_args, config_file):
|
|||||||
print('terminate pid', proc.pid)
|
print('terminate pid', proc.pid)
|
||||||
proc.terminate()
|
proc.terminate()
|
||||||
return 'Failed to listen'
|
return 'Failed to listen'
|
||||||
elif 'Listening on ' in line:
|
elif 'TEST_MARK_STARTUP' in line:
|
||||||
timeout.cancel()
|
timeout.cancel()
|
||||||
return proc
|
return proc
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user