diff --git a/application/testing/CMakeLists.txt b/application/testing/CMakeLists.txt index 7b0b21581b..8a209e018d 100644 --- a/application/testing/CMakeLists.txt +++ b/application/testing/CMakeLists.txt @@ -1,7 +1,7 @@ # F3D Testing function(f3d_test) - cmake_parse_arguments(F3D_TEST "TONE_MAPPING;LONG_TIMEOUT;INTERACTION;INTERACTION_CONFIGURE;NO_BASELINE;NO_RENDER;NO_OUTPUT;WILL_FAIL;NO_DATA_FORCE_RENDER;UI" "NAME;CONFIG;RESOLUTION;THRESHOLD;REGEXP;REGEXP_FAIL;HDRI;RENDERING_BACKEND" "DATA;DEPENDS;ENV;ARGS" ${ARGN}) + cmake_parse_arguments(F3D_TEST "TONE_MAPPING;LONG_TIMEOUT;INTERACTION;INTERACTION_CONFIGURE;NO_BASELINE;NO_RENDER;NO_OUTPUT;WILL_FAIL;NO_DATA_FORCE_RENDER;UI" "NAME;CONFIG;RESOLUTION;THRESHOLD;REGEXP;REGEXP_FAIL;HDRI;SCRIPT;RENDERING_BACKEND" "DATA;DEPENDS;ENV;ARGS" ${ARGN}) if(F3D_TEST_CONFIG) list(APPEND F3D_TEST_ARGS "--config=${F3D_TEST_CONFIG}") @@ -29,6 +29,10 @@ function(f3d_test) set(F3D_TEST_LONG_TIMEOUT ON) endif() + if (F3D_TEST_SCRIPT) + list(APPEND F3D_TEST_ARGS "--command-script=${F3D_SOURCE_DIR}/testing/scripts/${F3D_TEST_SCRIPT}") + endif() + if(F3D_TEST_NO_RENDER) list(APPEND F3D_TEST_ARGS "--no-render" "--verbose=debug") else() @@ -527,8 +531,7 @@ if(F3D_MODULE_RAYTRACING) f3d_test(NAME TestRaytracingNoBackground DATA suzanne.ply ARGS -rd --samples=4 --no-background) else(F3D_MODULE_RAYTRACING) - # XXX: This test is disabled until this code can be reached again using `--command-script` - # f3d_test(NAME TestInteractionRaytracingDenoiseNoRaytracing DATA suzanne.ply INTERACTION NO_BASELINE REGEXP "Raytracing options can't be used if F3D has not been built with raytracing") #RD + f3d_test(NAME TestCommandScriptRaytracingNoRaytracing DATA suzanne.ply SCRIPT TestCommandScriptRaytracing.txt NO_BASELINE REGEXP "Raytracing options can't be used if F3D has not been built with raytracing") endif() if(F3D_MODULE_EXR) @@ -857,9 +860,9 @@ f3d_test(NAME TestInteractionRecord DATA cow.vtp ARGS --interaction-test-record= f3d_test(NAME TestInteractionPlay DATA cow.vtp ARGS --interaction-test-play=${CMAKE_BINARY_DIR}/Testing/Temporary/interaction.log DEPENDS TestInteractionRecord NO_BASELINE) # Command Script Test -f3d_test(NAME TestCommandScriptBasic DATA dragon.vtu ARGS --command-script=${F3D_SOURCE_DIR}/testing/data/TestCommandScriptBasic.txt --ref=${F3D_SOURCE_DIR}/testing/baselines/TestCommandScriptBasic.png) -f3d_test(NAME TestCommandScriptInvalidCommand DATA dragon.vtu ARGS --command-script=${F3D_SOURCE_DIR}/testing/data/TestCommandScriptInvalid.txt REGEXP "Command: \"INVALID_COMMAND_1\" is not recognized, ignoring" NO_BASELINE) -f3d_test(NAME TestCommandScriptMissingFile DATA dragon.vtu ARGS --command-script=${F3D_SOURCE_DIR}/testing/data/TestCommandScriptMissingFile.txt REGEXP "Unable to open command script file" NO_BASELINE) +f3d_test(NAME TestCommandScriptBasic DATA dragon.vtu SCRIPT TestCommandScriptBasic.txt --ref=${F3D_SOURCE_DIR}/testing/baselines/TestCommandScriptBasic.png) +f3d_test(NAME TestCommandScriptInvalidCommand DATA dragon.vtu SCRIPT TestCommandScriptInvalid.txt REGEXP "Command: \"INVALID_COMMAND_1\" is not recognized, ignoring" NO_BASELINE) +f3d_test(NAME TestCommandScriptMissingFile DATA dragon.vtu SCRIPT TestCommandScriptMissingFile.txt REGEXP "Unable to open command script file" NO_BASELINE) # Window position test f3d_test(NAME TestPosition DATA dragon.vtu ARGS --position=100,100 NO_BASELINE) diff --git a/testing/data/TestCommandScriptBasic.txt b/testing/data/TestCommandScriptBasic.txt deleted file mode 100644 index 6e4f8e0c06..0000000000 --- a/testing/data/TestCommandScriptBasic.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9cce725128657e651d42403925497d54d1904db7567f37e0c4a954fa62169848 -size 77 diff --git a/testing/data/TestCommandScriptInvalid.txt b/testing/data/TestCommandScriptInvalid.txt deleted file mode 100644 index 8b50b44c05..0000000000 --- a/testing/data/TestCommandScriptInvalid.txt +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1213f46562611415cbd2e001d5e63f7b856374d32f6acd9bb6ab1ae8079524c5 -size 17 diff --git a/testing/recordings/TestInteractionRaytracingDenoiseNoRaytracing.log b/testing/recordings/TestInteractionRaytracingDenoiseNoRaytracing.log deleted file mode 100644 index 80ed994bbc..0000000000 --- a/testing/recordings/TestInteractionRaytracingDenoiseNoRaytracing.log +++ /dev/null @@ -1,9 +0,0 @@ -# StreamVersion 1.1 -ExposeEvent 0 599 0 0 0 0 -RenderEvent 0 599 0 0 0 0 -KeyPressEvent 623 198 0 114 1 r -CharEvent 623 198 0 114 1 r -KeyReleaseEvent 623 198 0 114 1 r -KeyPressEvent 623 198 0 100 1 d -CharEvent 623 198 0 100 1 d -KeyReleaseEvent 623 198 0 100 1 d diff --git a/testing/scripts/TestCommandScriptBasic.txt b/testing/scripts/TestCommandScriptBasic.txt new file mode 100644 index 0000000000..b2148d44fb --- /dev/null +++ b/testing/scripts/TestCommandScriptBasic.txt @@ -0,0 +1,4 @@ +roll_camera 90 +toggle ui.scalar_bar +print_scene_info +increase_light_intensity \ No newline at end of file diff --git a/testing/scripts/TestCommandScriptInvalid.txt b/testing/scripts/TestCommandScriptInvalid.txt new file mode 100644 index 0000000000..6d50c388e7 --- /dev/null +++ b/testing/scripts/TestCommandScriptInvalid.txt @@ -0,0 +1 @@ +INVALID_COMMAND_1 \ No newline at end of file diff --git a/testing/scripts/TestCommandScriptRaytracing.txt b/testing/scripts/TestCommandScriptRaytracing.txt new file mode 100644 index 0000000000..5ad306023f --- /dev/null +++ b/testing/scripts/TestCommandScriptRaytracing.txt @@ -0,0 +1,2 @@ +toggle render.raytracing.enable +toggle render.raytracing.denoise