-
Notifications
You must be signed in to change notification settings - Fork 914
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Rostest results deleted by concurrent test run #1359
Comments
It is currently not supported to run the tests concurrently. The naming of the result file is just one symptom. Tests might also in various other ways not be safe to be run concurrently. So it is unlikely that this use case will be supported in the future. Please feel free to contribute a pull request to support this use case. |
I just stumbled over this because my tests are run in parallel, too. Otherwise it would be too much of an impediment. A fix to this problem is fairly easy (just find a unique name for all rostests in a package), but I have some thoughts about this issue:
|
Any package with multiple Gazebo-based tests is going to have significant issues as the Gazebo port is currently fixed (see previous discussion on this under #903). This is just one example of the kind of external dependency that kills parallelism for ROS testing. Conceivably a lightweight container framework (or even LD_PRELOAD port redirection hackery) could address these kind of thing, but it would be a game of whack-a-mole to find and deal with the particular cases. Certainly there are lots of scenarios where it's useful to be able to run a bunch of tests at once, particularly if you want to be able to do things like check for breakages in your dependencies pre-merge (which ros_buildfarm doesn't currently make any effort toward). Anyway, if you pursue this, it's likely you'd be looking at a tooling level solution rather than something that could be built into catkin itself. For example, building the |
@mikepurvis Thanks for the suggestion, I will take a look. Coming back to the original issue, during investigation I found that the reason is not the concurrency, actually. The problem arises when two tests (the test-name parameter in the launch file) have the same name. Even if they are not in the same launch file and all tests are run sequentially, one test will overwrite the result of the other because the result file names collide. This also results in one less test being reported by catkin_test_results than actually exist. I see two options to fix this:
|
If I run a test case concurrently from different console windows (e.g. to catch an unfrequent timing issue), I get rostest failures although the underlying gtest succeeded:
The error message is: "did not generate test results"
The problem seems to be: Every test instance starts its own roscore on separate ports, but the file name for the test results is always the same:
ros_comm/tools/rostest/src/rostest/runner.py
Line 128 in 2474592
I'd suggest do add the roscore port number to the xml filename to circumvent this problem.
The text was updated successfully, but these errors were encountered: