You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Within my project, I have many test functions. When one fails, finding out which one is tedious. Unity has command line support (when UNITY_USE_COMMAND_LINE_ARGS is defined) through it's -n or -f arg, but I couldn't see how to pass args to Unity via pio. The test_filter option in the .ini isn't useful in this situation, because it filters on test library, not test function.
Idea: Provide a way of filtering by Unity test function, or maybe have a way of passing args to Unity.
ivankravets
changed the title
Request for support to pass extra arguments to the target
Request for support to pass extra arguments to the testing program
May 7, 2022
I know this is an old ticked, but I think my comments are relevant here.
I need to parse args from pio test in a non-native environment, and it looks like the solution here provided that. However, in the latest version of PlatromIO , calling --program-arg with pio test does not set PROGRAM_ARGS.
Did you guys create an alternative for that that I am missing or my understanding is correct?
For completeness, the following makes pio test -a work as I expected:
import os
from platformio.public import UnityTestRunner
class CustomTestRunner(UnityTestRunner):
def setup(self):
if self.options.program_args:
os.environ['PROGRAM_ARGS'] = ' '.join(self.options.program_args)
Feature Request.
I would like to be able to pass extra arguments to a binary e.g. when running on a native platform.
Possible usage, when running Catch2 tests:
The text was updated successfully, but these errors were encountered: