Skip to content
Snippets Groups Projects
Commit e391276e authored by Matthias Puchner's avatar Matthias Puchner
Browse files

deactivate more Py tests with particle distribution

parent 4bd9a6bd
No related branches found
No related tags found
1 merge request!65Refactor Distribution Handling
...@@ -24,6 +24,15 @@ endforeach() ...@@ -24,6 +24,15 @@ endforeach()
# Run unmodified examples, with plots under batch control # Run unmodified examples, with plots under batch control
#################################################################################################### ####################################################################################################
####################################################################################################
# The following tests contain a particle distribution, which is not supported right now. To keep
# the code for the time once it is newly implemented, the tests are only deactivated, not deleted.
####################################################################################################
set (ExampleNamesWithParticleDistribution
CylindersWithSizeDistribution
TwoTypesOfCylindersWithSizeDistribution)
set(test_script ${TOOL_DIR}/code/batch-plot.py) set(test_script ${TOOL_DIR}/code/batch-plot.py)
# Run one Python example. # Run one Python example.
...@@ -33,6 +42,11 @@ set(test_script ${TOOL_DIR}/code/batch-plot.py) ...@@ -33,6 +42,11 @@ set(test_script ${TOOL_DIR}/code/batch-plot.py)
function(run_example example label) function(run_example example label)
get_filename_component(name ${example} NAME_WE) get_filename_component(name ${example} NAME_WE)
set(test_name Example.run.${name}) set(test_name Example.run.${name})
if (${name} IN_LIST ExampleNamesWithParticleDistribution)
message("Test ${test_name} contains ParticleDistribution and will not be executed")
return()
endif()
add_test(${test_name} add_test(${test_name}
env PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY} env PYTHONPATH=${CMAKE_LIBRARY_OUTPUT_DIRECTORY}
BORNAGAIN_EXAMPLE_DATA_DIR=${EXAMPLES_DIR}/data BORNAGAIN_EXAMPLE_DATA_DIR=${EXAMPLES_DIR}/data
...@@ -81,6 +95,10 @@ function(test_example example tolerance) ...@@ -81,6 +95,10 @@ function(test_example example tolerance)
get_filename_component(EXAMPLE_DIR ${script_path} DIRECTORY) get_filename_component(EXAMPLE_DIR ${script_path} DIRECTORY)
set(test_name Example.persist.${EXAMPLE_NAME}) set(test_name Example.persist.${EXAMPLE_NAME})
if (${EXAMPLE_NAME} IN_LIST ExampleNamesWithParticleDistribution)
message("Test ${test_name} contains ParticleDistribution and will not be executed")
return()
endif()
set(PYPERSIST_TOLERANCE ${tolerance}) set(PYPERSIST_TOLERANCE ${tolerance})
...@@ -104,6 +122,7 @@ test_example(scatter2d/Cylinders 2e-10) ...@@ -104,6 +122,7 @@ test_example(scatter2d/Cylinders 2e-10)
test_example(scatter2d/CylindersAndPrisms 2e-10) test_example(scatter2d/CylindersAndPrisms 2e-10)
test_example(scatter2d/CylindersInAverageLayer 2e-10) test_example(scatter2d/CylindersInAverageLayer 2e-10)
test_example(scatter2d/CylindersInBA 2e-10) test_example(scatter2d/CylindersInBA 2e-10)
test_example(scatter2d/CylindersWithSizeDistribution 2e-10)
test_example(scatter2d/DetectorResolutionFunction 2e-10) test_example(scatter2d/DetectorResolutionFunction 2e-10)
test_example(scatter2d/DodecahedraSAS.py 2e-10) test_example(scatter2d/DodecahedraSAS.py 2e-10)
test_example(scatter2d/HalfSpheresInAverageTopLayer 2e-10) test_example(scatter2d/HalfSpheresInAverageTopLayer 2e-10)
...@@ -118,6 +137,7 @@ test_example(scatter2d/RectangularGrating 0.5) ...@@ -118,6 +137,7 @@ test_example(scatter2d/RectangularGrating 0.5)
test_example(scatter2d/RotatedPyramids 2e-10) test_example(scatter2d/RotatedPyramids 2e-10)
test_example(scatter2d/SpheresAtHexLattice 2e-10) test_example(scatter2d/SpheresAtHexLattice 2e-10)
test_example(scatter2d/TriangularRipple 2e-10) test_example(scatter2d/TriangularRipple 2e-10)
test_example(scatter2d/TwoTypesOfCylindersWithSizeDistribution 2e-10)
test_example(specular/AlternatingLayers 2e-10) test_example(specular/AlternatingLayers 2e-10)
test_example(specular/BeamAngularDivergence 2e-10) test_example(specular/BeamAngularDivergence 2e-10)
...@@ -130,10 +150,3 @@ test_example(varia/DepthProbe 2e-10) ...@@ -130,10 +150,3 @@ test_example(varia/DepthProbe 2e-10)
test_example(varia/Interference1DLattice 1.5) test_example(varia/Interference1DLattice 1.5)
test_example(varia/OffSpecularSimulation 2e-10) test_example(varia/OffSpecularSimulation 2e-10)
####################################################################################################
# The following tests contain a particle distribution, which is not supported right now. To keep
# the code for the time once it is newly implemented, the tests are only commented, not deleted.
####################################################################################################
#
# test_example(scatter2d/CylindersWithSizeDistribution 2e-10)
# test_example(scatter2d/TwoTypesOfCylindersWithSizeDistribution 2e-10)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment