tests: bluetooth gatt settings: Fix random test failures

These tests are creating and deleting temporary files.
But they deleted them with a wildcard that
matched each other's temporary files causing failures
when the tests run in parallel.
Avoid it by only deleting the files for each test.

As a freeby: Add the option to pass arbitrary commands to Phy from the
calling script, as with most other tests

Signed-off-by: Alberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
This commit is contained in:
Alberto Escolar Piedras 2023-03-08 19:39:28 +01:00 committed by Alberto Escolar
parent da97ab6ee8
commit 8cf65fa282
2 changed files with 8 additions and 6 deletions

View file

@ -26,10 +26,11 @@ function Execute() {
cd ${BSIM_OUT_PATH}/bin
# Remove the files used by the custom SETTINGS backend
echo "remove settings files ${simulation_id}_*.log"
rm ${simulation_id}_*.log || true
TO_DELETE="${simulation_id}_server.log ${simulation_id}_client.log"
echo "remove settings files ${TO_DELETE}"
rm ${TO_DELETE} || true
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6 $@
# Only one `server` device is really running at a time. This is a necessary hack
# because bsim doesn't support plugging devices in and out of a running

View file

@ -26,10 +26,11 @@ function Execute() {
cd ${BSIM_OUT_PATH}/bin
# Remove the files used by the custom SETTINGS backend
echo "remove settings files ${simulation_id}_*.log"
rm ${simulation_id}_*.log || true
TO_DELETE="${simulation_id}_server_2.log ${simulation_id}_client_2.log"
echo "remove settings files ${TO_DELETE}"
rm ${TO_DELETE} || true
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6
Execute ./bs_2G4_phy_v1 -v=${verbosity_level} -s="${simulation_id}" -D=8 -sim_length=30e6 $@
# Only one `server` device is really running at a time. This is a necessary hack
# because bsim doesn't support plugging devices in and out of a running