Skip to content

Commit e314918

Browse files
committed
Minor fix for DSP test
This commit addresses the timing issue to run adsprpcd binary - Here call trace now will accurately show the output - Cleanup is done smoothly Signed-off-by: Vamsee Narapareddi <[email protected]>
1 parent c31b862 commit e314918

File tree

1 file changed

+14
-7
lines changed
  • Runner/suites/Multimedia/DSP_AudioPD

1 file changed

+14
-7
lines changed

Runner/suites/Multimedia/DSP_AudioPD/run.sh

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ check_dependencies adsprpcd
4545
adsprpcd &
4646
PID=$!
4747

48+
sleep 5
49+
4850
if [ -z "$PID" ]; then
4951
echo "Failed to start the binary"
5052
exit 1
@@ -60,20 +62,25 @@ check_stack_trace() {
6062
return 1
6163
fi
6264
}
65+
66+
kill_process() {
67+
log_info "Kill the process"
68+
if kill -0 "$PID" 2>/dev/null; then
69+
kill -9 "$PID"
70+
wait "$PID"
71+
fi
72+
log_info "-------------------Completed $TESTNAME Testcase----------------------------"
73+
}
74+
6375
# Print overall test result
6476
if check_stack_trace "$PID"; then
6577
log_pass "$TESTNAME : Test Passed"
6678
echo "$TESTNAME PASS" > "$res_file"
79+
kill_process
6780
exit 0
6881
else
6982
log_fail "$TESTNAME : Test Failed"
7083
echo "$TESTNAME FAIL" > "$res_file"
84+
kill_process
7185
exit 1
7286
fi
73-
74-
log_info "Kill the process"
75-
if kill -0 "$PID" 2>/dev/null; then
76-
kill -9 "$PID"
77-
wait "$PID"
78-
fi
79-
log_info "-------------------Completed $TESTNAME Testcase----------------------------"

0 commit comments

Comments
 (0)