Feature: logging support

It looks like the test driver argument parser consumes some of the args, erasing them from argc/argv. Running tests with certain arguments created a case where argc==0, and loguru doesn’t like that…

https://gitlab.kitware.com/vtk/vtk/merge_requests/5220 should fix the issue and prevent future issues like this. Can you test it and let me know if that solves it for you?

@allison.vacanti, what confuses me is why this doesn’t happen locally or on the dashboards? These tests are being run with the same arg parsing test driver code everywhere.

The generated test drivers, like [buildDir]/Rendering\Annotation\Testing\Cxx\vtkRenderingAnnotationCxxTests.cxx, do things in main like:

int main(int ac, char *av[])
{
...
ac -= 2;
av += 2;
...
}

and picking the right code paths through can leave ac == 0. I could reproduce this by running the vtkRenderingAnnotationCxxTests executable with no arguments and manually selecting the test by number.

Hi Allison,
The fix you referenced works for me. And yes, I was just running the tests by typing in the number, so it was a miscommunication of workflow. I didn’t realize that you were not testing both ways to run them.

Thanks again, best regards

Jeff

It would be nice if vtkLogger::IsEnabled was controllable application side. RIght now, it is required to play with verbosity to handle the showing, or not, of vtk error messages.

That would be easy to add, should I go ahead and add it @utkarshayachit ?