tests: capture dmesg in integration tests

Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
Azat Khuzhin 2022-12-23 15:50:00 +01:00
parent 2fecf420cb
commit 69fadd2193

View File

@ -413,5 +413,11 @@ if __name__ == "__main__":
subprocess.check_call(f"docker kill {' '.join(containers)}", shell=True)
print(f"Containers {containers} killed")
# Avoid overlaps with previous runs
subprocess.check_call("dmesg --clear", shell=True)
print(("Running pytest container as: '" + cmd + "'."))
subprocess.check_call(cmd, shell=True)
# Dump dmesg (to capture possible OOMs)
subprocess.check_call("dmesg -T", shell=True)