summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/utils/postactions.py
diff options
context:
space:
mode:
authorAlexis Lothoré <alexis.lothore@bootlin.com>2024-08-12 17:14:04 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-13 09:29:15 +0100
commit292e17315e82aa7a63a93cc6e8671f495217f14e (patch)
tree3e93644c4665f5e0a0ef5e6591707fcd06d3b990 /meta/lib/oeqa/utils/postactions.py
parent3ce0e9b058aaf1ee94dbf956d52d3af77db0034e (diff)
downloadpoky-292e17315e82aa7a63a93cc6e8671f495217f14e.tar.gz
oeqa/postactions: do not uncompress retrieved archive on host
Current postaction module executes a remote tar command, pipe it in a SSH connection, and uncompress the raw stream with another tar command. With this command, the whole artifacts tree is directly available on the host executing the test, but it is not very convenient if we want to download the whole retrieved ptests directory. Stop uncompressing the retrieved ptests archive onto host, just save the archive as it is. The new output then looks like the following: tmp/log/oeqa-artefacts └── oeqa-target-artefacts-20240812-juzqdb80 ├── host_disk_usage.txt ├── target_disk_usage.txt └── tests_artifacts.tar.gz Suggested-By: Alexandre Belloni <alexandre.belloni@bootlin.com> (From OE-Core rev: f90894d996c8a8f980e46c87b7968b176793b3fe) Signed-off-by: Alexis Lothoré <alexis.lothore@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/lib/oeqa/utils/postactions.py')
-rw-r--r--meta/lib/oeqa/utils/postactions.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py
index 3b537146c5..d5080523aa 100644
--- a/meta/lib/oeqa/utils/postactions.py
+++ b/meta/lib/oeqa/utils/postactions.py
@@ -68,7 +68,8 @@ def list_and_fetch_failed_tests_artifacts(d, tc, artifacts_list, outputdir):
68 (status, output) = tc.target.run(cmd, raw = True) 68 (status, output) = tc.target.run(cmd, raw = True)
69 if status != 0 or not output: 69 if status != 0 or not output:
70 raise Exception("Error while fetching compressed artifacts") 70 raise Exception("Error while fetching compressed artifacts")
71 p = subprocess.run(["tar", "zxf", "-", "-C", outputdir], input=output) 71 with open(archive_name, "wb") as f:
72 f.write(output)
72 except Exception as e: 73 except Exception as e:
73 bb.warn(f"Can not retrieve artifacts from test target: {e}") 74 bb.warn(f"Can not retrieve artifacts from test target: {e}")
74 75