-
-
Notifications
You must be signed in to change notification settings - Fork 791
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
Allow for pyserial serial URL's when unit testing (test_port) #4229
Comments
What is your use case for the socket connection? We are working on the new unit testing engine and new documentation. It would be great to describe this case as an example of the custom runner that is a part of PlatformIO Core 6.0. |
Thanks for the feature request. Please re-test with Does it work for you? |
Thanks! Well In my case it would allow me to be able to run unit tests from within an qemu emulator, of which it's serial output is connected via sockets. I'll test it on my machine shortly! |
No need to use sockets here. Please use the custom testing command. See docs https://docs.platformio.org/en/latest/advanced/unit-testing/simulators/qemu.html |
I can't get the test command to be executed. |
Each argument in the new line? |
That seems to have at least started the test. I'm getting a hang up error right now, how do I enable the test output? |
Does it work without PlatformIO if you run in a separate command shell? |
It doesn't, thanks. I suppose I can combine commands by adding the & in between the command and the next line? I need to run a command that prepares the binary before I can start the emulator |
You can create a Python script that does multiple operations and prints output to the stdout. Later, use this script as a broker. |
I forgot. If these commands are part of upload process, you take a look at the advanced scripting (see docs), and leverage AddPost method for upload target. In other words, you have multiple options. PlatformIO Unit Testing just needs the raw output from the testing program. |
What kind of issue is this?
Start by telling us what problem you’re trying to solve. Often a solution
already exists! Don’t send pull requests to implement new features without first getting our
support. Sometimes we leave features out on purpose to keep the project small.
Configuration
Operating system: Windows 11
PlatformIO Version (
platformio --version
): PlatformIO Core, version 5.2.5Description of problem
I'd like to request that the test_port behaves the same as the upload_port and monitor_port. You can put in an custom URL, with a socket connection in all but the test_port. I'd like to have the test_port behave the same.
The text was updated successfully, but these errors were encountered: