Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Cem Aksoylar <[email protected]>
  • Loading branch information
petejohanson and caksoylar authored Dec 2, 2023
1 parent ed295be commit 3160c9b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/run-ble-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ if [ -z "$1" ]; then
exit 1
fi

path="$1"
if [ $path = "all" ]; then
path=$1
if [ "$path" = "all" ]; then
path="tests"
fi

Expand Down Expand Up @@ -61,24 +61,24 @@ exe_name=${testcase//\//_}

start_dir=$(pwd)
cp build/$testcase/zephyr/zmk.exe "${BSIM_OUT_PATH}/bin/${exe_name}"
pushd "${BSIM_OUT_PATH}/bin" 2>&1 > /dev/null
pushd "${BSIM_OUT_PATH}/bin" > /dev/null 2>&1
if [ -e "${start_dir}/build/$testcase/output.log" ]; then
rm "${start_dir}/build/$testcase/output.log"
fi

central_counts=`wc -l ${start_dir}/${testcase}/centrals.txt | cut -d' ' -f1`
central_counts=$(wc -l ${start_dir}/${testcase}/centrals.txt | cut -d' ' -f1)
./${exe_name} -d=0 -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" &
./bs_device_handbrake -s=${exe_name} -d=1 -r=10 > "${output_dev}" &

cat ${start_dir}/${testcase}/centrals.txt |
while IFS= read line
cat "${start_dir}/${testcase}/centrals.txt" |
while IFS= read -r line
do
${line} -s=${exe_name} | tee -a "${start_dir}/build/$testcase/output.log" > "${output_dev}" &
done

./bs_2G4_phy_v1 -s=${exe_name} -D=`expr 2 + $central_counts` -sim_length=50e6 2>&1 > "${output_dev}"
./bs_2G4_phy_v1 -s=${exe_name} -D=$(( 2 + central_counts )) -sim_length=50e6 > "${output_dev}" 2>&1

popd 2>&1 > /dev/null
popd > /dev/null 2>&1

cat build/$testcase/output.log | sed -E -n -f $testcase/events.patterns > build/$testcase/filtered_output.log

Expand Down

0 comments on commit 3160c9b

Please sign in to comment.