-
Notifications
You must be signed in to change notification settings - Fork 17
[DRAFT] tests: Implement and add Modbus server testing #87
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DRAFT] tests: Implement and add Modbus server testing #87
Conversation
Includes new test group for the modbus server, alongside the initial test case where the modbus server is coneceted to by a client on the github action's runner. Currently, the github actions runner connects to the modbus server to read and write to the LED and Button register(s). Will need to update test case as registers are implemented in the modbus server container. This commit also includes changes in tests.yml in order to run the test group and store the github artifact. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Changes the modbus server test from using a DHCP IP address to a DNS hostname we can manage seperatly from the codebase. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Merge branch 'main' of github.com:project-ocre/ocre-runtime into test-implement-modbus-server-testing Includes moving changes from tests.yml to build.yml Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Moved the generation of wasm files to a seperate step and upload wasms as artifacts, future steps should download these wasm artificats instead of building locally. Includes addition of Github actions job to flash b_u585i_i0t02a board with the Modbus image by pulling the wasm file artifact and running west build. Affected github actions jobs are: - build-and-run-zephyr-sample - build-and-run-linux-sample - modbus-server-validation-tests Adds the following github action jobs: - build-wasm-files - flash-zephyr-modbus_server-b_u585i_iot02a Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Added step to update submodules of git branch to prevent errors in github action job "build-wasm-files". Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Fixed github actions artifact uploading to pull from existing files. Previous implementationw as attempting to pull files from non-existent sources. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Added ls / echo statements in GHA build workflow to figure out why the .wasm files are failing to build. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Changed path of uploaded wasm artifiact to fix artifacting failure. Build-wasm-files job now copies the wasm-micro-runtime submodule into board-specific to avoid the realtive path issue. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
| "test_cases": [ | ||
| { | ||
| "name": "Check Modbus communication with remote client", | ||
| "exec": "./modbusServer_validation_remote.py" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps snake style the whole script name instead of mixing camelcase and snake style
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fair point, will deal with in a later commit.
Removed bad file path causing Build WASM Sample step to crash. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Changed build step artifact file name and build paths. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Added installation of build tools to relevant build steps. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Updated destination path for downloading wasm artifacts and updated west build arguments for flash-zephyr-modbus_server-b_u585i_iot02a. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Updates to build-and-run-linux-sample job dowloading artifact and flash-zephyr-modbus_server-b_u585i_iot02a job build enviornment. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Removed some uncessary configuration in flash-zephyr-modbus_server-b_u585i_iot02a causing issues. Added check to build-and-run-linux-sample to see why it is currently failing to read file. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Temporary fix for file pathing in west build commands. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Temporary fix for file pathing in west build commands. Changed running container in flash modbus server job. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
…eIOL/ocre-runtime into test-implement-modbus-server-testing
Updated flash-zephyr modbus server job to have same container enviornment other flash / build jobs have. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Redid how artifacts were being downloaded and read so the jobs can successfully read the needed files. Also added a Zephyr setup step to the modbus flash step. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Fixed typo in the flash-zephyr-modbus_server step and renamed test script in modbusServerValidation. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Moved flash-zephyr-base-b_u585i to be closer to subsequent job steps. Included some debugging in flash-zephyr-modbus_server to debug CMake error. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Fixed typo in previous commit that broke a step in the github actions workflow. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Added verbose logs to failing west build command to debug cause of issue. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
Added previosuly ommitted options to west build command that were used in the ./build.sh script. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
…ement-modbus-server-testing
Removed cleanup step in flash-zephyr-modbus_server job. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
0c6b4a5 to
f9cb150
Compare
f9cb150 to
e9719dc
Compare
Initial commit to support larger containers Replace custom functions with zephyr ones Use input container as a name for containers Rename base container Cleanup psram support Fixed container naming Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
If there is already a file in the filesystem with the same name and it is larger than the new size we are writing, the file size will not be truncated and we will end up with junk after the end of the wasm buffer. Use FS_O_TRUNC, so that the file will always be truncated to the new size. Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
* feat(sample_container): use const specifier This will put the sample container in the flash, saving RAM. * feat(generate_ocre_file): use const specifier This will put the generated sample container in the flash, saving RAM. --------- Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
Update wamr's hash to support networking DNS changes. --------- Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
WIP: Using nordic NRF5340DK board for testing and leveraging Ocre containers. Currently adding minimal support to make it compile and run on the actual hardware. Will continue adding configs across with the functionalities Signed-off-by: Federico Roux <rouxfederico@gmail.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
* Add exception handling * Update WAMR's hash --------- Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
* Add linter script file * Add CI file * Update linter file * Replace clang-format-14 to clang-format-16 --------- Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
65dc4b9 to
be712c8
Compare
Increased timeout between starting the modbus server and connecting a client over TCP in order to allow board to complete DHCP process and ensure modbus server was ready to recieve connections over the network. Signed-off-by: Matthew Gee <mgee@iol.unh.edu>
|
Refactored / redone in: #108 |
Description
Added test group for the Modbus server container on the b_u585i_iot02a board. Currently the test ensures the modbus server is able to make a connection, that a client can read from the first two registers (light control and button count) and is able to write to the light control register.
Previously the github actions workflow and the building of the wasm files and the building of the relevant app in the same job. Now these tasks have been separated into different jobs in order to allow for testing to more easily flash the board with the container and reduce code duplication.
Type of change
Please delete options that are not relevant.
How Has This Been Tested?
Modbus server tests have been tested with a serial connection to the b_u585i_iot02a board after flashing the Modbus server container.
Github actions changes will be tested when the PR is opened, given that it is a change to how the GHA workflows are set up.
Test Configuration (required):
Ubuntu 20.04 (arm64)ST Nucleo h723zgSTM32CubeProgrammer)Checklist: