-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Mbed] Add integration tests for example applications (#12039)
* Move mbed unit test to test_driver/mbed/unit_test directory Add integration test dir and files Cahnge unit test path in launch.json, task.json and mbed_unit_tests.sh * Add pytest and mbed-ls to pigweed env * Fix realpath in unit_test Cmake file * Improve serial data parsing Update lock and lightings apps smoke tests * Add network fixture Add utlis file with common ble and wifi functions Add wifi provisioning test * Remove device_controller fixture is singleton al all Update wifi provisioning tests * Move unit test README file to right directory Add Pigweed-app integration test and pigweed client * Add shell app tests Improve unit tests check * Add RPC tests to lock and lighting apps * Add wlan access point class - run Wi-Fi AP Add access point as fixture Use AP in shell wifi connect test * Fix wlan AP * Improve BoardAllocator - checking connected device Improve unit-test checking * Add mount new mbed device script * Add close ble connection * Add wait for wifi connection log and close ble to wifi provisioning tests * Remove serial device warnings * Improve lock-app test and refactor to get more common functions * Improve lighting-app tests Cleanup lock-app and shell tests * Lock, ligthing and shell apps tests improvements Change log sfor ZCL command send * Changes restyle Remove redundant changes Remove acces point class - not ready to merge Code cleanup * Add integration tests README file Improve relative paths in unit test README file * Improve spelling * Add new .wordlist exceptions * Restore 40s timeout for session establishment in device controller * Add resolve step in wifi_provisioning tests * Improve lock and light control tests add wifi provisioning and resolve node steps * Changes restyle
- Loading branch information
Showing
34 changed files
with
1,994 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
mbed-tools>=7.0.0 ; platform_machine != 'aarch64' and sys_platform == 'linux' | ||
prettytable==0.7.2 ; platform_machine != 'aarch64' and sys_platform == 'linux' | ||
pytest==6.2.5 ; platform_machine != 'aarch64' and sys_platform == 'linux' | ||
mbed-ls==1.8.11 ; platform_machine != 'aarch64' and sys_platform == 'linux' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env bash | ||
DIR=/dev/disk/by-id | ||
DEVICE_CONFIG_FILE=/etc/fstab | ||
|
||
echo "Add new device start..." | ||
echo "Connect your device via USB" | ||
|
||
res=$(inotifywait "$DIR") | ||
if [[ ${res} != *"CREATE"* ]]; then | ||
echo "Create new device in /dev/disk/by-id directory error" | ||
exit 1 | ||
fi | ||
|
||
new_device_id=$(echo "$res" | awk '{printf $NF}') | ||
|
||
if sudo cat "$DEVICE_CONFIG_FILE" | grep -q "$new_device_id"; then | ||
echo "$new_device_id device is already set" | ||
exit 0 | ||
fi | ||
|
||
device_index=1 | ||
|
||
while :; do | ||
dir_name="MBED_$device_index" | ||
if [ ! -d /media/"$dir_name" ]; then | ||
break | ||
fi | ||
|
||
((device_index++)) | ||
done | ||
|
||
sudo mkdir -p /media/MBED_"$device_index" | ||
line="/dev/disk/by-id/$new_device_id /media/MBED_$device_index vfat rw,user,sync,nofail,umask=007,gid=20 0 0" | ||
echo "$line" | sudo tee -a "$DEVICE_CONFIG_FILE" | ||
|
||
echo "Finished" |
Oops, something went wrong.