diff options
Diffstat (limited to 'meta/lib/oeqa/utils/postactions.py')
-rw-r--r-- | meta/lib/oeqa/utils/postactions.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/meta/lib/oeqa/utils/postactions.py b/meta/lib/oeqa/utils/postactions.py index 7014b2830a..008968b56a 100644 --- a/meta/lib/oeqa/utils/postactions.py +++ b/meta/lib/oeqa/utils/postactions.py | |||
@@ -19,6 +19,20 @@ def create_artifacts_directory(d, tc): | |||
19 | os.makedirs(local_artifacts_dir) | 19 | os.makedirs(local_artifacts_dir) |
20 | 20 | ||
21 | ################################################################## | 21 | ################################################################## |
22 | # Host/target statistics | ||
23 | ################################################################## | ||
24 | |||
25 | def get_target_disk_usage(d, tc): | ||
26 | output_file = os.path.join(get_json_result_dir(d), "artifacts", "target_disk_usage.txt") | ||
27 | try: | ||
28 | (status, output) = tc.target.run('df -hl') | ||
29 | with open(output_file, 'w') as f: | ||
30 | f.write(output) | ||
31 | f.write("\n") | ||
32 | except Exception as e: | ||
33 | bb.warn(f"Can not get target disk usage: {e}") | ||
34 | |||
35 | ################################################################## | ||
22 | # Artifacts retrieval | 36 | # Artifacts retrieval |
23 | ################################################################## | 37 | ################################################################## |
24 | 38 | ||
@@ -65,7 +79,8 @@ def list_and_fetch_failed_tests_artifacts(d, tc): | |||
65 | def run_failed_tests_post_actions(d, tc): | 79 | def run_failed_tests_post_actions(d, tc): |
66 | post_actions=[ | 80 | post_actions=[ |
67 | create_artifacts_directory, | 81 | create_artifacts_directory, |
68 | list_and_fetch_failed_tests_artifacts | 82 | list_and_fetch_failed_tests_artifacts, |
83 | get_target_disk_usage | ||
69 | ] | 84 | ] |
70 | 85 | ||
71 | for action in post_actions: | 86 | for action in post_actions: |