[Avocado-devel] Wrapping a simple test into an instrumented one

Alan Martinovic alan.martinovic at senic.com
Thu Jul 11 15:09:30 UTC 2019


Hi,
I have a standalone executable written as a form of test which accepts
cli parameters. In it's core it's executed as  `./test  -c parameter`

I'd like to wrap that with some python code so that it becomes an
instrumented
test. That way it can benefit from the the standardized way of passing
parameters.

I've dedicated a directory for both files:
```
wrapper_tests
    |--test
    `--wrapper-test.py
```

The wrapper is executing test with:
```
    subprocess.check_output("./test")
```

As I try to run it with avocado by passing the wrapper_tests as a parameter
two
errors seem to happen:
* subprocess.check_output can't find ./test
* ./test itself is detected as a standalone test to run

Is there a best practice for this situation?

(even though names seem to be the same, this isn't a use case
for the wrapper plugin)

Be Well,
Alan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/avocado-devel/attachments/20190711/4057d274/attachment.htm>


More information about the Avocado-devel mailing list