Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenFlipper
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OpenFlipper-Free
OpenFlipper
Commits
d6def081
Commit
d6def081
authored
6 years ago
by
Jan Möbius
Browse files
Options
Downloads
Patches
Plain Diff
Introduce python tests
parent
5b390585
No related branches found
No related tags found
1 merge request
!138
Introduce python tests
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/CMakeLists.txt
+11
-0
11 additions, 0 deletions
tests/CMakeLists.txt
tests/run_script_test.cmake
+2
-0
2 additions, 0 deletions
tests/run_script_test.cmake
tests/testGenerators.cmake
+6
-3
6 additions, 3 deletions
tests/testGenerators.cmake
with
19 additions
and
3 deletions
tests/CMakeLists.txt
+
11
−
0
View file @
d6def081
...
...
@@ -143,6 +143,17 @@ SET (CTEST_DROP_SITE_CDASH FALSE)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/
${
_plugin_dir
}
/tests
${
CMAKE_BINARY_DIR
}
/tests/
${
_plugin_name
}
)
endif
()
# If a PythonTests subdir exists, we add it here
if
(
IS_DIRECTORY
${
CMAKE_SOURCE_DIR
}
/
${
_plugin_dir
}
/PythonTests
)
# Only get the plugins name without possible collection:
string
(
REGEX MATCH
"Plugin-.+[/
\\
]?$"
_plugin_name
${
_plugin_dir
}
)
add_subdirectory
(
${
CMAKE_SOURCE_DIR
}
/
${
_plugin_dir
}
/PythonTests
${
CMAKE_BINARY_DIR
}
/PythonTests/
${
_plugin_name
}
)
endif
()
endforeach
()
endif
()
This diff is collapsed.
Click to expand it.
tests/run_script_test.cmake
+
2
−
0
View file @
d6def081
...
...
@@ -16,6 +16,8 @@ if ( NOT EXISTS ${test_cmd} )
message
(
SEND_ERROR
"Test Executable missing!"
)
endif
()
message
(
"Running :
${
test_cmd
}
${
test_args
}
"
)
# Execute the process with the given arguments
# Timeout after 5 minutes
execute_process
(
...
...
This diff is collapsed.
Click to expand it.
tests/testGenerators.cmake
+
6
−
3
View file @
d6def081
...
...
@@ -129,8 +129,11 @@ endfunction()
# If TEST_SCRIPT does not exist in the tests directory of the plugin, no test will be generated!
function
(
run_local_script_test TEST_SCRIPT
)
# check if TEST_SCRIPT is at the correct place
if
(
NOT EXISTS
${
CMAKE_SOURCE_DIR
}
/
${
_plugin_dir
}
/tests/
${
TEST_SCRIPT
}
)
if
(
NOT EXISTS
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
TEST_SCRIPT
}
)
message
(
"Error, unable to locate test script:
${
CMAKE_CURRENT_SOURCE_DIR
}
/
${
TEST_SCRIPT
}
"
)
return
()
endif
()
...
...
@@ -139,8 +142,8 @@ function( run_local_script_test TEST_SCRIPT )
# Configure the test script from the current directory with the given filenames and variables into the test directory
configure_file
(
${
CMAKE_SOURCE_DIR
}
/
${
_plugin_dir
}
/tests/
${
TEST_SCRIPT
}
${
CMAKE_BINARY_DIR
}
/
tests/
${
_plugin_name
}
/
${
TEST_SCRIPT_NAME
}
@ONLY
${
CMAKE_
CURRENT_
SOURCE_DIR
}
/
${
TEST_SCRIPT
}
${
CMAKE_
CURRENT_
BINARY_DIR
}
/
${
TEST_SCRIPT_NAME
}
@ONLY
)
# Execute the script by OpenFlipper
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment