Wednesday 21 October 2020

os.system working with lcov --remove but subprocess.call is not

I'm using lcov, I want to exclude some files/directories from my coverage reports.

When I use os.system():

os.system("lcov --remove  build/unit_test_coverage.info \'*test*\' \'*mock*\' -o build/unit_test_coverage.info")

It excludes the files/directories as I expect.

But when I use subprocess.call() like this:

subprocess.call(["lcov", "--remove", "build/unit_test_coverage.info", "\'*test*\'", "\'*mock*\'", "-o", "build/unit_test_coverage.info"])

The files/directories are not exluded.

Anyone know why?



from os.system working with lcov --remove but subprocess.call is not

No comments:

Post a Comment