[vtk-developers] Quality testing new VTK tree: discussion at Kitware

Berk Geveci berk.geveci at kitware.com
Thu Aug 30 10:06:43 EDT 2001


VTK Quality: August 24, 2001
> 
> Bill Lorensen, Jim Miller GE CRD
> Ken Martin, Berk Geveci, Will Schroeder, Brad King, Bill Hoffman Kitware
> =======================================================================
> 
> Issues / Topics
> ===============
> 12. - Valid images should be named: .py.png, .tcl.png, .cxx.png
>        in the Baseline/ directory

Did this for the parallel directory

>      - support interactive .cxx tests for test writers (Berk)

I cleaned up the C++ files which support testing:

* Common/Testing/Cxx/vtkTestUtilities.h now contains a class which makes
finding a data file easier. Include vtkTestUtilities.h and use
vtkTestUtilities::ExpandDataFileName() with a given data filename. For
example:

  // Use this method to get the place of the data directory.
  char* fname = vtkTestUtilities::ExpandDataFileName(argc, argv, 
                                                     "Data/headsq/quarter");

This will parse the command line arguments and look for "-D
path/to/VTKData",
it will also check the env. variable VTK_DATA_ROOT.

* Common/Testing/Cxx/vtkRegressionTestImage.h contains a class called
vtkRegressionTester. Here is how it can be used:

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);
  ...
  renWin->Render();
  int retVal = vtkRegressionTester::Test(argc, argv, renWin, 10);
  // or use vtkRegressionTestImage( renWin ) which is a macro and
  // expands to vtkRegressionTester::Test(argc, argv, renWin, 10);

  if ( retVal == vtkRegressionTester::DO_INTERACTOR)
    {
    iren->Start();
    }
  ...
  return !retVal;

This will parse the command line arguments and if it finds '-I', it
will return with vtkRegressionTester::DO_INTERACTOR without running
the image test.

>      - -kb will be added to cvs modules file for .png (Bill Hoffman)

Bill did this.

-- 
Berk Geveci, Ph.D.
Kitware, Inc.
VTK-Based Visualization Solutions
469 Clifton Corporate Parkway
Clifton Park, NY 12065 USA
berk.geveci at kitware.com
http://www.kitware.com
Phone (518) 371-3971 x107
Fax   (518) 371-3971





More information about the vtk-developers mailing list