Skip to content

Commit 3bd98cd

Browse files
authored
Merge pull request #58 from vnarapar/result_parser
Fix to get the overall result in LAVA
2 parents 98ac473 + 420e425 commit 3bd98cd

File tree

4 files changed

+31
-0
lines changed

4 files changed

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

0 commit comments

Comments
 (0)