Commit 5250a5b7 authored by Jan Möbius's avatar Jan Möbius
Browse files

Testing update. testGenerator now takes script name as parameter to define the...

Testing update. testGenerator now takes script name as parameter to define the used script. Modify testing script name to be a bit shorter. refs #394

git-svn-id: 383ad7c9-94d9-4d36-a494-682f7c89f535
parent 3a975a60
......@@ -3,7 +3,7 @@
TODO: OpenFlipper Scripting and examples.
\section scripting_iterating
\section scripting_iterating Iterating over objects
In the scripting system you can also iterate over objects in the scene.
......@@ -9,6 +9,6 @@ if(BUILD_TESTING)
# Tests
# ========================================================================
# ========================================================================
run_single_object_file_mesh_test("fileobj" "covering-branch.obj")
run_single_object_file_mesh_test("fileobj" "covering-branch.obj" "fileMeshTest.ofs")
......@@ -8,10 +8,13 @@
# The second parameter is the name of the file that should be loaded fro the toplevel TestData directory.
# If that directory or file does not exist, no test will be generated!
# The third parameter is the script that will be used. It will be taken from the global tests directory
# TODO: also take local scripts!
# Used files:
# fileMeshTest.ofs ( configured and copied script for meshes )
# run_file_test.cmake ( Executing the test and comparing the results)
function( run_single_object_file_mesh_test FILEPLUGIN TEST_FILE )
function( run_single_object_file_mesh_test FILEPLUGIN TEST_FILE TEST_SCRIPT )
......@@ -28,7 +31,7 @@ function( run_single_object_file_mesh_test FILEPLUGIN TEST_FILE )
string (TOUPPER ${_plugin_dir} PLUGIN_DIR)
set (TESTSCRIPTNAME "testscript-${TESTNAME}-${TEST_FILE}.ofs")
# update the output file to be inside the results directory
......@@ -37,7 +40,7 @@ function( run_single_object_file_mesh_test FILEPLUGIN TEST_FILE )
# Configure the test script from the current directory with the given filenames and variables into the test directory
${CMAKE_BINARY_DIR}/tests/${_plugin_dir}/${TESTSCRIPTNAME} @ONLY )
# Execute the script by OpenFlipper and than run the result parser which checks for correct values.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment