Skip to content

Commit dfd5e95

Browse files
committed
Flush output to avoid missing test status
1 parent 8dbf239 commit dfd5e95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

ci_test.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919

2020
def run_command(cmd, log_file=None):
2121
print("Running: {}".format(cmd))
22+
sys.stdout.flush()
2223
if log_file:
2324
file = open(log_file, "w")
2425
p = subprocess.Popen(cmd, shell=True, stdout=file, stderr=file)
@@ -56,6 +57,7 @@ def main():
5657
for dockerfile in dockerfiles:
5758
docker_dir = os.path.dirname(os.path.realpath(__file__))
5859
print("Testing {}".format(dockerfile))
60+
sys.stdout.flush()
5961
log_file = dockerfile.replace(docker_dir,"").replace("/", "_")
6062
log_file = "{}.log".format(log_file)
6163
cmd = "docker build --no-cache=true {}".format(dockerfile)
@@ -70,6 +72,7 @@ def main():
7072
cmd = "mv {log} {results}{log}".format(log=log_file, results=results[dockerfile])
7173
run_command(cmd)
7274
print("[{}] - {}".format(results[dockerfile], dockerfile))
75+
sys.stdout.flush()
7376

7477
for dockerfile in dockerfiles:
7578
if results[dockerfile] == "FAILED":

0 commit comments

Comments
 (0)