[Paraview-developers] Gatekeeper Review Summary
Ben Boeckel
ben.boeckel at kitware.com
Wed May 28 10:39:58 EDT 2014
On Wed, May 28, 2014 at 07:03:09 -0400, Utkarsh Ayachit wrote:
> Topics merged into master:
> use-external-data
This change brings with it a new workflow for data files for tests and
baselines. Adding data should follow the VTK wiki page for data
files[1] with the difference that all of the data and baselines live in
Testing/Data and Testing/Data/Baselines (future work will split up
Baselines to be beside the module they are intended for).
For changing/adding data, the steps are:
- (onetime) rerun SetupForDevelopment.sh for new hooks and aliases
- drop new/updated files into Testing/Data and/or
Testing/Data/Baselines
- rerun CMake
- commit the new md5 files
- run `git gerrit-push --no-topic` to upload just the data which will
then be available for other developers to download (gerrit-push will
push both if both are necessary without the flag)
On the CMake side, the VTK testing CMake functions with the following
additions:
- paraview_add_test_mpi
- paraview_add_test_cxx
- paraview_add_test_python
- paraview_add_test_python_mpi
Tests using pvbatch should use:
- paraview_add_test_pvbatch
- paraview_add_test_pvbatch_mpi
Tests which use smTestDriver should use:
- paraview_add_test_driven
These wrapper functions set some variables to use ParaView's data
directory, pvpython rather than vtkpython, and other things.
For example, to add a set of Python tests without baselines and one without
data, do the following:
paraview_add_test_python(
NO_VALID
test1.py,NO_DATA
test2.py)
to add C++ tests:
paraview_add_test_cxx(${vtk-module}CxxTests tests
NO_VALID
test1.cxx,NO_DATA
test2.cxx)
vtk_test_cxx_executable(${vtk-module}CxxTests tests
${non_test_sources})
The 'tests' variable here is a list of test sources to build and is
passed to the vtk_test_cxx_executable function. It can be appended to
manually to combine different test groups (usually when there is a batch
which can take an option that would be tedious to apply manually).
To download data, the following functions are available:
- paraview_test_load_baselines
- paraview_test_load_baselines_dirs
- paraview_test_load_data
- paraview_test_load_data_dirs
These ensure that data is downloaded and each downloads from the right
directory. The '_dirs' variants take directory names and download all
files inside of each (it is not recursive). The first argument to each
is a name for the target to use; usually an empty string will be used
here, but if a non-empty string is used, use:
- paraview_test_data_target
to add the data download commands to the main build. By default, all
baselines in the top-level baseline directory is downloaded for
convenience.
An example:
paraview_test_load_baselines(MyTest
test1.png
,REGEX:test2_.*\\.png)
# Not required if "MyTest" is empty instead.
paraview_test_data_target(MyTest)
will download test1.png and test2_*.png (for multi-baseline tests). Data
is similar.
--Ben
[1]http://www.vtk.org/Wiki/VTK/Git/Develop/Data#Add_Data
More information about the Paraview-developers
mailing list