Tests: pretty output.

Hide expected alerts by default.
Silence succesfull "go build" information.
This commit is contained in:
Andrei Zeliankou
2022-12-12 16:24:54 +00:00
parent f67a01b88f
commit 648e91a623
3 changed files with 10 additions and 9 deletions

View File

@@ -67,7 +67,9 @@ replace unit.nginx.org/go => {replace_path}
print("\n$ GOPATH=" + env['GOPATH'] + " " + " ".join(args))
try:
process = subprocess.run(args, env=env, cwd=temp_dir)
output = subprocess.check_output(
args, env=env, cwd=temp_dir, stderr=subprocess.STDOUT
)
except KeyboardInterrupt:
raise
@@ -75,7 +77,7 @@ replace unit.nginx.org/go => {replace_path}
except subprocess.CalledProcessError:
return None
return process
return output
def load(self, script, name='app', **kwargs):
static_build = False

View File

@@ -2,7 +2,5 @@ from unit.applications.lang.go import TestApplicationGo
def check_go():
process = TestApplicationGo.prepare_env('empty')
if process != None and process.returncode == 0:
if TestApplicationGo.prepare_env('empty') is not None:
return True