Skip to content
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

Clarify Robot Window HTML Test #6755

Open
wants to merge 18 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 10 additions & 11 deletions tests/api/controllers/robot_window_html/robot_window_html.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,26 @@
#define TIME_STEP 32

int main(int argc, char **argv) {
bool configured = false, received = false;
ts_setup(argv[0]);

while (!configured) { // receive message sent by the robot window.
for (;;) { // receive message sent by the robot window.
wb_robot_step(TIME_STEP);
const char *configure_message;
while ((configure_message = wb_robot_wwi_receive_text())) {
const char *configure_message = wb_robot_wwi_receive_text();
if (configure_message) {
if (strcmp(configure_message, "configure") == 0) {
configured = true;
wb_robot_wwi_send_text("test wwi functions from complete_test controller.");
wb_robot_wwi_send_text("test wwi functions from robot_window_html controller.");
break;
} else
ts_send_error_and_exit("Wrong configure message received from the HTML robot-window: %s", configure_message);
}
}

while (!received) { // receive message sent by Webots.
for (;;) { // receive message sent by Webots.
wb_robot_step(TIME_STEP);
const char *test_message;
while ((test_message = wb_robot_wwi_receive_text())) {
if (strcmp(test_message, "Answer: test wwi functions from complete_test controller.") == 0)
received = true;
const char *test_message = wb_robot_wwi_receive_text();
if (test_message) {
if (strcmp(test_message, "Answer: test wwi functions from robot_window_html controller.") == 0)
break;
else
ts_send_error_and_exit("Wrong test message received from the HTML robot-window: %s", test_message);
}
Expand Down
1 change: 0 additions & 1 deletion tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ def generateWorldsList(groupName):
not ('GITHUB_ACTIONS' in os.environ and (
filename.endswith('speaker.wbt') or
filename.endswith('local_proto_with_texture.wbt') or
(filename.endswith('robot_window_html.wbt') and is_ubuntu_22_04) or
(filename.endswith('supervisor_start_stop_movie.wbt') and is_ubuntu_22_04) or
(filename.endswith('billboard.wbt') and sys.platform == 'darwin') or
(filename.endswith('billboard.wbt') and sys.platform == 'win32') or
Expand Down
Loading