-
Notifications
You must be signed in to change notification settings - Fork 1
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
Nacho/fix xunit report #8
Conversation
This caused test failures for me for previously passing tests.
|
This means it's good for you right :D ? |
Well, it's running, but it's failing to run the test code. So no, I wouldn't recommend merging it in the current state. Let me know if there's anything I can help with. |
@Ryanf55 could you confirm the version of
You can |
Yep, I'll let you know by end of day. |
25639c8
to
5079183
Compare
@Ryanf55 let me know if it works with that version of |
Will do. If I don't reply tonight, ship it 🚀 |
OS environmentHere's my OS environment without your PR changes: $ sudo apt install black
[sudo] password for ryan:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
black is already the newest version (21.12b0-1). $ python3 -m pip list | grep black
ament-black 0.2.3
black 23.11.0 Creating a test package$ ros2 pkg create my_black_test --build-type ament_cmake --dependencies ament_cmake_black Modify package.xml and CMakeLists.txt as originally reported # find dependencies
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_black REQUIRED)
if(BUILD_TESTING)
# Add linters.
find_package(ament_lint_auto REQUIRED)
ament_lint_auto_find_test_dependencies()
endif() <test_depend>ament_lint_auto</test_depend>
<test_depend>ament_cmake_black</test_depend> $ git clone --branch nacho/fix_xunit_report [email protected]:botsandus/ament_black.git touch my_black_test/myfile.py
>>> Add some unformatted content Running Tests$ colcon build
$ colcon build
Starting >>> ament_black
--- stderr: ament_black
/home/ryan/.local/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
---
Finished <<< ament_black [0.84s]
Starting >>> ament_cmake_black
Finished <<< ament_cmake_black [0.16s]
Starting >>> my_black_test
Finished <<< my_black_test [0.29s]
Summary: 3 packages finished [1.91s]
1 package had stderr output: ament_black $ source install/setup.bash
$ colcon test --packages-select my_black_test --event-handlers=console_cohesion+
Starting >>> my_black_test
--- output: my_black_test
UpdateCTestConfiguration from :/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/CTestConfiguration.ini
Parse Config file:/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/CTestConfiguration.ini
Site: B650-970
Build name: (empty)
Add coverage exclude regular expressions.
Create new tag: 20240118-0505 - Experimental
UpdateCTestConfiguration from :/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/CTestConfiguration.ini
Parse Config file:/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/CTestConfiguration.ini
Test project /home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test
Constructing a list of tests
Done constructing a list of tests
Updating test list for fixtures
Added 0 tests to meet fixture requirements
Checking test dependency graph...
Checking test dependency graph end
test 1
Start 1: black
1: Test command: /usr/bin/python3.10 "-u" "/opt/ros/humble/share/ament_cmake_test/cmake/run_test.py" "/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/test_results/my_black_test/black.xunit.xml" "--package-name" "my_black_test" "--output-file" "/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/ament_black/black.txt" "--command" "/opt/ros/humble/bin/ament_black" "--xunit-file" "/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/test_results/my_black_test/black.xunit.xml"
1: Test timeout computed to be: 60
1: -- run_test.py: invoking following command in '/home/ryan/Dev/ros2_ws/src/black_test/my_black_test':
1: - /opt/ros/humble/bin/ament_black --xunit-file /home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/test_results/my_black_test/black.xunit.xml
1: Traceback (most recent call last):
1: File "/opt/ros/humble/bin/ament_black", line 33, in <module>
1: sys.exit(load_entry_point('ament-black==0.2.3', 'console_scripts', 'ament_black')())
1: File "/home/ryan/Dev/ros2_ws/src/black_test/install/ament_black/lib/python3.10/site-packages/ament_black/main.py", line 79, in main
1: sources = get_sources(
1: TypeError: get_sources() missing required keyword-only argument 'root'
1: -- run_test.py: return code 1
1: -- run_test.py: generate result file '/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/test_results/my_black_test/black.xunit.xml' with failed test
1: -- run_test.py: verify result file '/home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/test_results/my_black_test/black.xunit.xml'
1/1 Test #1: black ............................***Failed 0.12 sec
0% tests passed, 1 tests failed out of 1
Label Time Summary:
black = 0.12 sec*proc (1 test)
linter = 0.12 sec*proc (1 test)
Total Test time (real) = 0.12 sec
The following tests FAILED:
1 - black (Failed)
Errors while running CTest
Output from these tests are in: /home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
---
--- stderr: my_black_test
Errors while running CTest
Output from these tests are in: /home/ryan/Dev/ros2_ws/src/black_test/build/my_black_test/Testing/Temporary/LastTest.log
Use "--rerun-failed --output-on-failure" to re-run the failed cases verbosely.
---
Finished <<< my_black_test [0.20s] [ with test failures ]
Summary: 1 package finished [0.73s]
1 package had stderr output: my_black_test
1 package had test failures: my_black_test More info$ black --version
black, 23.11.0 (compiled: yes)
Python (CPython) 3.10.12 Attempting to override the OS black with newer version:
And, retest, same failure.
Sorry, I honestly don't know how to get your PR to work. If you need it reproduced in a dockerfile with the above, I can do that. |
Hey look! AN ABI break that's affecting my OS. Sadly, I broke my OS: https://stackoverflow.com/questions/71673404/importerror-cannot-import-name-unicodefun-from-click
|
If I'm understanding this correctly, Ubuntu 22.04 installs
Now, no one has filed a bug on Ubuntu, so I did: And, It's still broken. Typically, we rely on |
@Ryanf55 I'm sorry you struggled this much! And happy with all the detailed information. I already fought with such monsters when dealing with Python packages and it's horrible What I would probably do in your case to uninstall all We DO NOT have/allow Let me know if you can solve the |
Mergin this as it's working with the ubuntu-supported |
Fixes #6, and Timple#6
Use black Python API to fetch the sources that are being checked