ros2 / build_farmer

0 stars 0 forks source link

nightly_win_deb pytest failures #262

Closed mjcarroll closed 4 years ago

mjcarroll commented 4 years ago

There have been an uptick in test failures in the nightly_win_deb build, for example: https://ci.ros2.org/view/nightly/job/nightly_win_deb/1510/testReport/

There is a consistent theme of pytest.missing_result failures.

A representative failure:

--- stderr: test_cli
01:58:24 CMake Warning at C:/J/workspace/nightly_win_deb/ws/install/share/ament_cmake_pytest/cmake/ament_add_pytest_test.cmake:77 (message):
01:58:24   The Python module 'pytest' was not found, pytests can not be run (e.g.  on
01:58:24   Ubuntu/Debian install the package 'python3-pytest')
01:58:24 Call Stack (most recent call first):
01:58:24   CMakeLists.txt:35 (ament_add_pytest_test)
01:58:24 
mjcarroll commented 4 years ago

nightly_win_rel seems not to be impacted.

mjcarroll commented 4 years ago

It looks like the root cause was pytest being unable to import sqlite3 when using the Python debug interpreter. I opted to reinstall python3.7.5 on portable as an initial test, using the python installer as we now do in the container builds: https://github.com/ros2/ci/blob/94e2c543f0b373b59f9217eb3e65b3806fb05fb8/windows_docker_resources/Dockerfile.msvc2019#L44-L48

Before (run on windshield, which still has the issue): Build Status (14 failures) After (on portable): Build Status (1 failure)

mjcarroll commented 4 years ago

I'm going to apply the same fix to windshield and icecube.

choco pin remove --name=python
choco pin remove --name=python3
choco uninstall python
choco uninstall python3
rmdir C:\Python37

Then reboot the system.

cd C:\
curl https://www.python.org/ftp/python/3.7.5/python-3.7.5-amd64.exe --output python-37.exe
C:\python-37.exe /quiet TargetDir=C:\Python37 PrepandPath=1 Include_debug=1 Include_symbols=1
mjcarroll commented 4 years ago

Testing on icecube: https://ci.ros2.org/job/ci_windows/9228/ Testing on windshield: https://ci.ros2.org/job/ci_windows/9231/

mjcarroll commented 4 years ago

This broke nighly windows packaging: https://ci.ros2.org/view/packaging/job/packaging_windows_debug/595/console

mjcarroll commented 4 years ago

One off to verify if those errors are gone: https://ci.ros2.org/job/ci_windows/9307/

nuclearsandwich commented 4 years ago

@mjcarroll's changes fixed the issue and I've opened https://github.com/ros2/ros2_documentation/pull/544 to update our installation instructions to match.