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

Fix-test-suite-not-run-on-macos #6631

Merged
Merged
Show file tree
Hide file tree
Changes from 43 commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
83dee1f
Bump the Qt version from 6.4.3 to 6.5.3.
brettle Aug 15, 2024
473ce86
Add changelog entry.
brettle Aug 15, 2024
068d715
Merge branch 'master' into fix-to-use-supported-qt-version
brettle Aug 15, 2024
8293c4c
Get Qt from system on ubuntu 22.04 and via aqtinstall on Ubuntu 20.04.
brettle Aug 17, 2024
bc574a2
Move package installation to linux_compilation_dependencies.sh and li…
brettle Aug 17, 2024
6de0828
Fix package name for Qt WebSockets on Ubuntu 22.04.
brettle Aug 17, 2024
b192745
Temporarily move Mac back to Qt 6.4.3 in hopes of getting the test su…
brettle Aug 17, 2024
ef65c5d
Temporarily allow access for debugging.
brettle Aug 18, 2024
79b6b62
Use aqt for all linux because Ubuntu 22.04 only has Qt 6.2 and we nee…
brettle Aug 18, 2024
bd9f821
Add back libxcb-cursor0.
brettle Aug 18, 2024
19287c6
Add openssl as a runtime dep.
brettle Aug 18, 2024
f7a8341
Copy system openssl3 libs on Ubuntu 22.04 and use built libs on Ubunt…
brettle Aug 18, 2024
67e9f26
Build openssl3 from source on Ubuntu 20.04.
brettle Aug 18, 2024
e672407
Get rid of unneeded and unrecognized pushd in Makefile.linux.
brettle Aug 18, 2024
87fa748
Use aqt to install Qt 6.5.3 for mac.
brettle Aug 19, 2024
8a49ced
Allow login to mac if build fails.
brettle Aug 19, 2024
eac55f7
Make sure the Contents/Frameworks folder is created.
brettle Aug 19, 2024
3d313b6
Remove upterm steps that were added for debugging.
brettle Aug 19, 2024
37c0f00
Make openssl just a compilation dependency for Ubuntu 22.04 because w…
brettle Aug 19, 2024
71d6a43
Try to run the test suite during macos CI.
brettle Aug 19, 2024
f1d55d3
Set WEBOTS_HOME_PATH such that tests can find Makefile.include during…
brettle Aug 19, 2024
f4bbf59
Allow login for debugging.
brettle Aug 19, 2024
a0ab607
Change WEBOTS_HOME to Webots.app and add logic to test_suite.py to fi…
brettle Aug 19, 2024
86873a1
Get qt_warning_filters.conf from correct location on macos.
brettle Aug 19, 2024
9417594
Remove accidentally added checkout step.
brettle Aug 19, 2024
d95696e
Hopefully squash clang-format complaint.
brettle Aug 19, 2024
70f7d7b
Ignore (but warn about) error trying to connect to background Webots …
brettle Aug 20, 2024
be29ef1
Fix formatting.
brettle Aug 20, 2024
9488367
On Mac, timeout test after 60 minutes instead of 10.
brettle Aug 20, 2024
f099a99
Merge branch 'master' into fix-test-suite-not-run-on-macos
brettle Aug 25, 2024
4954b9c
Try single threaded build on macos CI.
brettle Aug 26, 2024
554a9cb
Try using macos-13 runner instead of macos-14. The former has twice a…
brettle Aug 26, 2024
60f7682
Merge branch 'master' into fix-test-suite-not-run-on-macos
brettle Aug 27, 2024
4a1c4da
Install urdfdom during macos CI because it is needed by tests suite.
brettle Aug 27, 2024
5e26dbd
Merge branch 'master' into fix-test-suite-not-run-on-macos
brettle Aug 27, 2024
c0c2150
Assert that move succeeds.
brettle Aug 28, 2024
b51cef0
Print age of ode_tmp.dif so we can see how long we should wait on mac…
brettle Aug 28, 2024
892614a
Allow up to 20 seconds for world reload.
brettle Aug 28, 2024
9d850f8
Try waiting longer before timing out.
brettle Aug 29, 2024
ee341c4
Skip billboard.wbt test during macos CI.
brettle Aug 29, 2024
418c422
Restore multithreaded build.
brettle Aug 29, 2024
553c537
Remove unneeded comment.
brettle Aug 29, 2024
b301158
Remove upterm.
brettle Aug 29, 2024
1468e14
Only increase timeout on macos.
brettle Aug 29, 2024
6fbe675
Simplify some syntax.
brettle Aug 30, 2024
60fdb16
Only run the test suite if the "test suite mac" label is present.
brettle Aug 30, 2024
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
18 changes: 11 additions & 7 deletions .github/workflows/test_suite_mac.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test webots build') }}
strategy:
matrix:
os: [macos-14]
os: [macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -33,7 +33,7 @@ jobs:
if: ${{ github.event_name == 'push' || github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'test distribution') || contains(github.event.pull_request.labels.*.name, 'test suite') }}
strategy:
matrix:
os: [macos-14]
os: [macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -70,7 +70,7 @@ jobs:
if: ${{ contains(github.event.pull_request.labels.*.name, 'test suite') }}
strategy:
matrix:
os: [macos-14]
os: [macos-13]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
Expand All @@ -89,17 +89,21 @@ jobs:
with:
python-version: 3.11
- name: Test
run:
run: |
brew install urdfdom
export WEBOTS_DISABLE_SAVE_SCREEN_PERSPECTIVE_ON_CLOSE=true
python scripts/packaging/update_urls.py $(git log -1 --format='%H')
export WEBOTS_HOME=/Applications/Webots.app
# we currently can't run the test suite because of https://github.com/cyberbotics/webots/issues/2110
# python tests/test_suite.py
export TESTS_HOME=$PWD # required by cache group in the test suite
export WEBOTS_HOME_PATH=$PWD # required for tests to find Makefile.include
export BRANCH_HASH=$(git log -1 --format='%H')
python tests/test_suite.py
delete-artifacts:
needs: [build, test-suite]
if: ${{ always() && !contains(github.event.pull_request.labels.*.name, 'test distribution') && !contains(github.event.pull_request.labels.*.name, 'test webots build') }}
strategy:
matrix:
os: [macos-14]
os: [macos-13]
runs-on: ubuntu-latest
steps:
- name: Delete artifacts
Expand Down
6 changes: 5 additions & 1 deletion src/webots/gui/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ int main(int argc, char *argv[]) {
#endif
);

// load qt warning filters from file
#ifdef __APPLE__
QString qtFiltersFilePath = QDir::fromNativeSeparators(webotsDirPath + "/Contents/Resources/qt_warning_filters.conf");
#else
QString qtFiltersFilePath = QDir::fromNativeSeparators(webotsDirPath + "/resources/qt_warning_filters.conf");
#endif
// load qt warning filters from file
QFile qtFiltersFile(qtFiltersFilePath);
if (qtFiltersFile.open(QIODevice::ReadOnly)) {
QTextStream in(&qtFiltersFile);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,7 @@ def run(self):

# 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 = delay * 10
brettle marked this conversation as resolved.
Show resolved Hide resolved
timeout = time.time() + delay

running_controllers_pid = []
Expand Down
6 changes: 3 additions & 3 deletions tests/physics/controllers/determinism/determinism.c
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ int main(int argc, char **argv) {

if (file_exists(ode_tmp_dif)) {
double delta = difftime(now, file_get_creation_time(ode_tmp_dif));
// printf("delta time = %f\n", delta);
if (delta > 2.0) {
// printf("%s is %f seconds old.\n", ode_tmp_dif, delta);
if (delta > 20.0) {
ts_assert_boolean_equal(remove_file(ode_tmp_dif), "Cannot remove ODE tmp dif file");
ts_assert_boolean_not_equal(file_exists(ode_tmp_dif), "Cannot remove ODE tmp dif file");
}
Expand Down Expand Up @@ -60,7 +60,7 @@ int main(int argc, char **argv) {
exit(EXIT_FAILURE);
}
} else {
move_file(ode_dif, ode_tmp_dif);
ts_assert_boolean_equal(move_file(ode_dif, ode_tmp_dif), "Cannot move ODF dif file to ODE tmp dif file");
wb_supervisor_world_reload();
wb_robot_cleanup();
exit(EXIT_SUCCESS);
Expand Down
12 changes: 10 additions & 2 deletions tests/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ def setupWebots():

if sys.platform == 'win32':
webotsFullPath = os.path.join(os.path.normpath(os.environ['WEBOTS_HOME']), 'msys64', 'mingw64', 'bin', 'webots.exe')
elif sys.platform == 'darwin':
webotsFullPath = os.path.join(os.path.normpath(os.environ['WEBOTS_HOME']), 'Contents', 'MacOS', 'webots')
else:
webotsBinary = 'webots'
if 'WEBOTS_HOME' in os.environ:
Expand Down Expand Up @@ -198,12 +200,14 @@ def generateWorldsList(groupName):
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
# billboard test not working in macos 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') and is_ubuntu_22_04) or
(filename.endswith('supervisor_start_stop_movie.wbt') and is_ubuntu_22_04)
(filename.endswith('supervisor_start_stop_movie.wbt') and is_ubuntu_22_04) or
(filename.endswith('billboard.wbt') and sys.platform == 'darwin')
))):
worldsList.append(filename)

Expand Down Expand Up @@ -244,7 +248,11 @@ def runGroupTest(groupName, firstSimulation, worldsCount, failures):
command = Command(webotsArguments)

# redirect stdout and stderr to files
command.runTest(timeout=10 * 60) # 10 minutes
timeoutMinutes = 10
if sys.platform == "darwin":
# Longer timeout on MacOS because Webots takes longer to start there during CI.
timeoutMinutes = 60
command.runTest(timeout=timeoutMinutes * 60)

if command.isTimeout or command.returncode != 0:
if command.isTimeout:
Expand Down
Loading