From 6d861cac139555a3983d8c2b1eab07835801870a Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 14:39:59 -0800 Subject: [PATCH 01/16] fix race condition --- tests/api/controllers/robot_window_html/robot_window_html.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index 9e38f6c3c37..c18de7cb284 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -17,6 +17,7 @@ int main(int argc, char **argv) { if (strcmp(configure_message, "configure") == 0) { configured = true; wb_robot_wwi_send_text("test wwi functions from complete_test controller."); + break; } else ts_send_error_and_exit("Wrong configure message received from the HTML robot-window: %s", configure_message); } @@ -26,9 +27,10 @@ int main(int argc, char **argv) { 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) + if (strcmp(test_message, "Answer: test wwi functions from complete_test controller.") == 0) { received = true; - else + break; + } else ts_send_error_and_exit("Wrong test message received from the HTML robot-window: %s", test_message); } } From 331655cfd8892415459b59214dfa6eb08383797a Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 14:40:55 -0800 Subject: [PATCH 02/16] run test on all platforms --- tests/test_suite.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_suite.py b/tests/test_suite.py index 6362c27fe67..b42d60a2061 100755 --- a/tests/test_suite.py +++ b/tests/test_suite.py @@ -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 From 444cb37f54c7c55538c692d587106d2732d301ba Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 17:36:16 -0800 Subject: [PATCH 03/16] fix test message to reference correct controller --- tests/api/controllers/robot_window_html/robot_window_html.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index c18de7cb284..54526ca6024 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -16,7 +16,7 @@ int main(int argc, char **argv) { while ((configure_message = wb_robot_wwi_receive_text())) { 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); @@ -27,7 +27,7 @@ int main(int argc, char **argv) { 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) { + if (strcmp(test_message, "Answer: test wwi functions from robot_window_html controller.") == 0) { received = true; break; } else From fdbfc4e454552bf5a2c0006b232a8723309f1e58 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 22:27:14 -0800 Subject: [PATCH 04/16] use non-snap firefox --- .../workflows/test_suite_linux_develop.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index 8855630781e..df98f4abc52 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -103,7 +103,24 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: sudo scripts/install/linux_test_dependencies.sh + run: | + sudo scripts/install/linux_test_dependencies.sh + # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments + if [[ $UBUNTU_VERSION == "24.04" ]]; then + snap remove firefox + add-apt-repository -y ppa:mozillateam/ppa + echo ' + Package: * + Pin: release o=LP-PPA-mozillateam + Pin-Priority: 1001 + + Package: firefox + Pin: version 1:1snap* + Pin-Priority: -1 + ' | tee /etc/apt/preferences.d/mozilla-firefox + apt update + apt install -y firefox + fi - name: Set up Python 3.9 uses: actions/setup-python@v2 with: From 0a7eba2bc2affdda945f3d5708fbadb1a3cdbbcb Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 22:40:36 -0800 Subject: [PATCH 05/16] copy previous commit to main CI script --- .github/workflows/test_suite_linux.yml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index ffed98d8c46..e9cc62fe443 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -105,7 +105,24 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: sudo scripts/install/linux_test_dependencies.sh + run: | + sudo scripts/install/linux_test_dependencies.sh --exclude-ros + # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments + if [[ $UBUNTU_VERSION == "24.04" ]]; then + snap remove firefox + add-apt-repository -y ppa:mozillateam/ppa + echo ' + Package: * + Pin: release o=LP-PPA-mozillateam + Pin-Priority: 1001 + + Package: firefox + Pin: version 1:1snap* + Pin-Priority: -1 + ' | tee /etc/apt/preferences.d/mozilla-firefox + apt update + apt install -y firefox + fi - name: Set up Python 3.9 uses: actions/setup-python@v4 with: From 7823bc7d1aaf36bec50b31bd6233f3c1c004ccda Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 23:15:39 -0800 Subject: [PATCH 06/16] define UBUNTU_VERSION --- .github/workflows/test_suite_linux.yml | 1 + .github/workflows/test_suite_linux_develop.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index e9cc62fe443..684d8ff4ab2 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -108,6 +108,7 @@ jobs: run: | sudo scripts/install/linux_test_dependencies.sh --exclude-ros # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments + UBUNTU_VERSION=$(lsb_release -rs) if [[ $UBUNTU_VERSION == "24.04" ]]; then snap remove firefox add-apt-repository -y ppa:mozillateam/ppa diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index df98f4abc52..2e6c8209a23 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -106,6 +106,7 @@ jobs: run: | sudo scripts/install/linux_test_dependencies.sh # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments + UBUNTU_VERSION=$(lsb_release -rs) if [[ $UBUNTU_VERSION == "24.04" ]]; then snap remove firefox add-apt-repository -y ppa:mozillateam/ppa From 6549a9186a22f274f0b0338eb12903e8d7c229a3 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sat, 11 Jan 2025 23:41:58 -0800 Subject: [PATCH 07/16] add sudo to scripts --- .github/workflows/test_suite_linux.yml | 10 +++++----- .github/workflows/test_suite_linux_develop.yml | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index 684d8ff4ab2..cb62a0f63a7 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -110,8 +110,8 @@ jobs: # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments UBUNTU_VERSION=$(lsb_release -rs) if [[ $UBUNTU_VERSION == "24.04" ]]; then - snap remove firefox - add-apt-repository -y ppa:mozillateam/ppa + sudo snap remove firefox + sudo add-apt-repository -y ppa:mozillateam/ppa echo ' Package: * Pin: release o=LP-PPA-mozillateam @@ -120,9 +120,9 @@ jobs: Package: firefox Pin: version 1:1snap* Pin-Priority: -1 - ' | tee /etc/apt/preferences.d/mozilla-firefox - apt update - apt install -y firefox + ' | sudo tee /etc/apt/preferences.d/mozilla-firefox + sudo apt update + sudo apt install -y firefox fi - name: Set up Python 3.9 uses: actions/setup-python@v4 diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index 2e6c8209a23..f8b25cf66de 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -108,8 +108,8 @@ jobs: # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments UBUNTU_VERSION=$(lsb_release -rs) if [[ $UBUNTU_VERSION == "24.04" ]]; then - snap remove firefox - add-apt-repository -y ppa:mozillateam/ppa + sudo snap remove firefox + sudo add-apt-repository -y ppa:mozillateam/ppa echo ' Package: * Pin: release o=LP-PPA-mozillateam @@ -118,9 +118,9 @@ jobs: Package: firefox Pin: version 1:1snap* Pin-Priority: -1 - ' | tee /etc/apt/preferences.d/mozilla-firefox - apt update - apt install -y firefox + ' | sudo tee /etc/apt/preferences.d/mozilla-firefox + sudo apt update + sudo apt install -y firefox fi - name: Set up Python 3.9 uses: actions/setup-python@v2 From 416313f046fdc02635f90586c8d3b6eac882a1ba Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 00:19:03 -0800 Subject: [PATCH 08/16] use correct formatting in apt preferences --- .github/workflows/test_suite_linux.yml | 2 +- .github/workflows/test_suite_linux_develop.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index cb62a0f63a7..4fa6b139c44 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -105,7 +105,7 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: | + run: |+ sudo scripts/install/linux_test_dependencies.sh --exclude-ros # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments UBUNTU_VERSION=$(lsb_release -rs) diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index f8b25cf66de..00ec05b4c46 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -103,7 +103,7 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: | + run: |+ sudo scripts/install/linux_test_dependencies.sh # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments UBUNTU_VERSION=$(lsb_release -rs) From 416ea4806d3e4daba9d1bffb158d6ff6315166ac Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 01:05:41 -0800 Subject: [PATCH 09/16] specify apt repo in command instead of preferences --- .github/workflows/test_suite_linux.yml | 11 +---------- .github/workflows/test_suite_linux_develop.yml | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index 4fa6b139c44..869db0d00d9 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -112,17 +112,8 @@ jobs: if [[ $UBUNTU_VERSION == "24.04" ]]; then sudo snap remove firefox sudo add-apt-repository -y ppa:mozillateam/ppa - echo ' - Package: * - Pin: release o=LP-PPA-mozillateam - Pin-Priority: 1001 - - Package: firefox - Pin: version 1:1snap* - Pin-Priority: -1 - ' | sudo tee /etc/apt/preferences.d/mozilla-firefox sudo apt update - sudo apt install -y firefox + sudo apt install -y -t o=LP-PPA-mozillateam firefox fi - name: Set up Python 3.9 uses: actions/setup-python@v4 diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index 00ec05b4c46..6f64ed1ea45 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -110,17 +110,8 @@ jobs: if [[ $UBUNTU_VERSION == "24.04" ]]; then sudo snap remove firefox sudo add-apt-repository -y ppa:mozillateam/ppa - echo ' - Package: * - Pin: release o=LP-PPA-mozillateam - Pin-Priority: 1001 - - Package: firefox - Pin: version 1:1snap* - Pin-Priority: -1 - ' | sudo tee /etc/apt/preferences.d/mozilla-firefox sudo apt update - sudo apt install -y firefox + sudo apt install -y -t o=LP-PPA-mozillateam firefox fi - name: Set up Python 3.9 uses: actions/setup-python@v2 From 4d410e64c244832a6a57eff6ee13895bcaee0a62 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 02:02:29 -0800 Subject: [PATCH 10/16] debugging --- tests/api/controllers/robot_window_html/robot_window_html.c | 2 ++ .../controllers/test_suite_supervisor/test_suite_supervisor.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index 54526ca6024..8c041f29152 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -23,6 +23,8 @@ int main(int argc, char **argv) { } } + printf("CONFIGURED!!!!\n"); + while (!received) { // receive message sent by Webots. wb_robot_step(TIME_STEP); const char *test_message; diff --git a/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py b/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py index 6938b4a8c44..2f7c5610d5e 100644 --- a/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py +++ b/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py @@ -239,7 +239,7 @@ def run(self): receiver.enable(basicTimeStep) # 30 seconds before executing the next world, 60 seconds for the robot_window_html test - delay = 60 if self.currentSimulationFilename.endswith('/robot_window_html.wbt') else 30 + delay = 120 if self.currentSimulationFilename.endswith('/robot_window_html.wbt') else 30 if sys.platform == "darwin": # Longer timeout on MacOS because Webots takes longer to start there during CI. delay *= 10 From 1865b9d6e6589f680d9df63d6c46ea6eafb1f138 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 02:06:56 -0800 Subject: [PATCH 11/16] clarify logic --- .../robot_window_html/robot_window_html.c | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index 8c041f29152..6e046afab13 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -7,15 +7,13 @@ #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. + const char *configure_message; + 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())) { + if ((configure_message = wb_robot_wwi_receive_text())) { if (strcmp(configure_message, "configure") == 0) { - configured = true; wb_robot_wwi_send_text("test wwi functions from robot_window_html controller."); break; } else @@ -25,14 +23,13 @@ int main(int argc, char **argv) { printf("CONFIGURED!!!!\n"); - while (!received) { // receive message sent by Webots. + const char *test_message; + 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 robot_window_html controller.") == 0) { - received = true; + if ((test_message = wb_robot_wwi_receive_text())) { + if (strcmp(test_message, "Answer: test wwi functions from robot_window_html controller.") == 0) break; - } else + else ts_send_error_and_exit("Wrong test message received from the HTML robot-window: %s", test_message); } } From dcc524a3431ab8b177db5706cf8e8539745fe68d Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 10:57:18 -0800 Subject: [PATCH 12/16] revert firefox changes --- .github/workflows/test_suite_linux.yml | 11 +---------- .github/workflows/test_suite_linux_develop.yml | 11 +---------- 2 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index 869db0d00d9..7f4c1759636 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -105,16 +105,7 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: |+ - sudo scripts/install/linux_test_dependencies.sh --exclude-ros - # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments - UBUNTU_VERSION=$(lsb_release -rs) - if [[ $UBUNTU_VERSION == "24.04" ]]; then - sudo snap remove firefox - sudo add-apt-repository -y ppa:mozillateam/ppa - sudo apt update - sudo apt install -y -t o=LP-PPA-mozillateam firefox - fi + run: sudo scripts/install/linux_test_dependencies.sh --exclude-ros - name: Set up Python 3.9 uses: actions/setup-python@v4 with: diff --git a/.github/workflows/test_suite_linux_develop.yml b/.github/workflows/test_suite_linux_develop.yml index 6f64ed1ea45..8855630781e 100644 --- a/.github/workflows/test_suite_linux_develop.yml +++ b/.github/workflows/test_suite_linux_develop.yml @@ -103,16 +103,7 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: |+ - sudo scripts/install/linux_test_dependencies.sh - # On Ubuntu 24.04, the default snap-based Firefox does not play well with headless environments - UBUNTU_VERSION=$(lsb_release -rs) - if [[ $UBUNTU_VERSION == "24.04" ]]; then - sudo snap remove firefox - sudo add-apt-repository -y ppa:mozillateam/ppa - sudo apt update - sudo apt install -y -t o=LP-PPA-mozillateam firefox - fi + run: sudo scripts/install/linux_test_dependencies.sh - name: Set up Python 3.9 uses: actions/setup-python@v2 with: From 810d447d9913d36332d124997e2e05ba046a459c Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 10:58:10 -0800 Subject: [PATCH 13/16] revert test-suite change --- .github/workflows/test_suite_linux.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test_suite_linux.yml b/.github/workflows/test_suite_linux.yml index 7f4c1759636..ffed98d8c46 100644 --- a/.github/workflows/test_suite_linux.yml +++ b/.github/workflows/test_suite_linux.yml @@ -105,7 +105,7 @@ jobs: - name: Extract Webots run: tar xjf artifact/webots-*-x86-64*.tar.bz2 -C artifact - name: Install Webots Dependencies - run: sudo scripts/install/linux_test_dependencies.sh --exclude-ros + run: sudo scripts/install/linux_test_dependencies.sh - name: Set up Python 3.9 uses: actions/setup-python@v4 with: From 6684f7c24eaa093644f4d20d4da53ff4989c96a2 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 10:59:17 -0800 Subject: [PATCH 14/16] Revert "debugging" This reverts commit eb1458669856968dc764f72d6d47977718819fec. --- tests/api/controllers/robot_window_html/robot_window_html.c | 2 -- .../controllers/test_suite_supervisor/test_suite_supervisor.py | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index 6e046afab13..fbaeb397c9f 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -21,8 +21,6 @@ int main(int argc, char **argv) { } } - printf("CONFIGURED!!!!\n"); - const char *test_message; for (;;) { // receive message sent by Webots. wb_robot_step(TIME_STEP); diff --git a/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py b/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py index 2f7c5610d5e..6938b4a8c44 100644 --- a/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py +++ b/tests/default/controllers/test_suite_supervisor/test_suite_supervisor.py @@ -239,7 +239,7 @@ def run(self): receiver.enable(basicTimeStep) # 30 seconds before executing the next world, 60 seconds for the robot_window_html test - delay = 120 if self.currentSimulationFilename.endswith('/robot_window_html.wbt') else 30 + delay = 60 if self.currentSimulationFilename.endswith('/robot_window_html.wbt') else 30 if sys.platform == "darwin": # Longer timeout on MacOS because Webots takes longer to start there during CI. delay *= 10 From 60758d1aa3848abd39715335488db5e7e094b4a9 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Sun, 12 Jan 2025 11:00:42 -0800 Subject: [PATCH 15/16] clarify variable initializations --- .../api/controllers/robot_window_html/robot_window_html.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/api/controllers/robot_window_html/robot_window_html.c b/tests/api/controllers/robot_window_html/robot_window_html.c index fbaeb397c9f..be050015a19 100644 --- a/tests/api/controllers/robot_window_html/robot_window_html.c +++ b/tests/api/controllers/robot_window_html/robot_window_html.c @@ -9,10 +9,10 @@ int main(int argc, char **argv) { ts_setup(argv[0]); - const char *configure_message; for (;;) { // receive message sent by the robot window. wb_robot_step(TIME_STEP); - if ((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) { wb_robot_wwi_send_text("test wwi functions from robot_window_html controller."); break; @@ -21,10 +21,10 @@ int main(int argc, char **argv) { } } - const char *test_message; for (;;) { // receive message sent by Webots. wb_robot_step(TIME_STEP); - if ((test_message = wb_robot_wwi_receive_text())) { + 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 From 34be4c9bdebd6e64277cd4cda3275d1e3d318ea8 Mon Sep 17 00:00:00 2001 From: CoolSpy3 Date: Wed, 25 Jun 2025 20:08:37 -0700 Subject: [PATCH 16/16] disable robot_window_html test in CI --- tests/test_suite.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/test_suite.py b/tests/test_suite.py index b42d60a2061..5c945e58ff9 100755 --- a/tests/test_suite.py +++ b/tests/test_suite.py @@ -199,13 +199,15 @@ def generateWorldsList(groupName): # to file for filename in filenames: # speaker test not working on github action because of missing sound drivers - # robot window and movie recording test not working on BETA Ubuntu 22.04 GitHub Action environment + # robot window test cannot open a browser for the robot window in a headless environment + # movie recording test not working on BETA Ubuntu 22.04 GitHub Action environment # billboard test not working in macos GitHub Action environment # billboard and robot window not working on windows GitHub Action environment. if (not filename.endswith('_temp.wbt') and 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') 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