Skip to content

Commit 3466887

Browse files
committed
Fix to get the overall result in LAVA
This commit is to update the overall pass/fail status of the LAVA job based on the test results Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent 98ac473 commit 3466887

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed

Runner/plans/meta-ar-ci-premerge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ run:
1818
- $PWD/utils/send-to-lava.sh $PWD/suites/Multimedia/Audio/AudioPlayback/AudioPlayback.res || true
1919
- $PWD/suites/Multimedia/Audio/AudioRecord/run.sh || true
2020
- $PWD/utils/send-to-lava.sh $PWD/suites/Multimedia/Audio/AudioRecord/AudioRecord.res || true
21+
- $PWD/utils/result_parse.sh
2122

Runner/plans/meta-qcom_PreMerge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ run:
5656
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/watchdog.res || true
5757
- $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/run.sh || true
5858
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/wpss_remoteproc.res || true
59+
- $PWD/utils/result_parse.sh

Runner/plans/qcom-next-ci-premerge.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,4 @@ run:
5656
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/watchdog/watchdog.res || true
5757
- $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/run.sh || true
5858
- $PWD/utils/send-to-lava.sh $PWD/suites/Kernel/FunctionalArea/baseport/wpss_remoteproc/wpss_remoteproc.res || true
59+
- $PWD/utils/result_parse.sh

Runner/utils/result_parse.sh

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/sh
2+
3+
# Copyright (c) Qualcomm Technologies, Inc. and/or its subsidiaries.
4+
# SPDX-License-Identifier: BSD-3-Clause-Clear
5+
6+
find / -type f -name "*.res" 2>/dev/null | while IFS= read res_file; do
7+
echo "$res_file"
8+
if [ -f "$res_file" ]; then
9+
while IFS= read line; do
10+
# Skip empty lines
11+
[ -z "$line" ] && continue
12+
13+
# Split line into words
14+
set -- $line
15+
tc_name=$1
16+
result=$2
17+
# Report each test case result to LAVA
18+
if [ -n "$tc_name" ] && [ -n "$result" ]; then
19+
if [ "$result" = "FAIL" ]; then
20+
exit 1
21+
fi
22+
else
23+
echo "Warning: Skipping malformed line: $line"
24+
fi
25+
done < "$res_file"
26+
fi
27+
done

0 commit comments

Comments
 (0)