Running Tests
-------------

notes for all items:
${OSPRAY_SOURCE_DIR} is the ospray source root.
PATH and LD_LIBRARY_PATH should contain ${OSPRAY_BUILD_DIR}.

1. Build OSPRay

Compile OSPRay in a build directory of your choosing. We will refer
to this directory as ${OSPRAY_BUILD_DIR}.

2. Generate baseline images (OPTIONAL)

Build OSPRay with OSPRAY_TESTING on.  Only
generate new images for a test that has changed.  To generate new images for a specific
test run ./ospTestSuite --gtest_filter="*TESTNAME*" --dump-img test_image_data/
which will create images in a folder called test_image_data.

To make new images for all tests, In ${OSPRAY_BUILD_DIR}, run the
"generate_baseline.sh" script:

% ${OSPRAY_SOURCE_DIR}/scripts/tests/generate_baseline.sh

This will output generated images in a folder named generated_test_images.
These images will not automatically be used as baseline images for the tests
unless put into the correct folder or the update script is used (5).

3. Run regression tests

To verify whether a change to the codebase broke anything, run

% ${OSPRAY_SOURCE_DIR}/scripts/tests/run_tests.sh ${OSPRAY_SOURCE_DIR}

This will download baseline images and run tests to compare them
in a folder named build_regression_tests.

4.  To run an individual test
./ospTestSuite --gtest_list_tests
this will output a list of test names
./ospTestSuite --gest_filter="*NAME*"
will run a single test

5.  Add or update generated test images to ospray
Use the included update_test_baseline.sh script and then send
the resulting files to ospray developers
or do the following steps:

call md5sum on the resulting .png files.  Add a .png.md5 file to
tests/baseling/TESTNAME.png.md5 with the value of the checksum.  rename
the .png file to be the checksum value, and then send this to OSPRay Devs who
will upload it to sdvis.org under /var/www/html/ospray/download/baseline/benchmark-data/MD5.
