[Bf-blender-cvs] [5fc1779b653] soc-2021-geometry-nodes-regression-test: CMake: Add directory exists check

Himanshi Kalra noreply at git.blender.org
Mon Jul 26 21:29:40 CEST 2021


Commit: 5fc1779b653fefa17ba8dbcf12c68f788004062e
Author: Himanshi Kalra
Date:   Mon Jul 26 17:45:52 2021 +0530
Branches: soc-2021-geometry-nodes-regression-test
https://developer.blender.org/rB5fc1779b653fefa17ba8dbcf12c68f788004062e

CMake: Add directory exists check

===================================================================

M	tests/python/CMakeLists.txt

===================================================================

diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 1d96968b9b3..49909050ec4 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -748,16 +748,19 @@ set(geo_node_tests
 )
 
 foreach(geo_node_test ${geo_node_tests})
-
-  file(GLOB files "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/*.blend")
-  foreach(file ${files})
-    get_filename_component(filename ${file} NAME_WE)  
-    add_blender_test(
-      geo_node_${geo_node_test}_test_${filename}
-      ${file}
-      --python ${TEST_PYTHON_DIR}/geo_node_test.py
-    )
-    endforeach()
+  if(EXISTS "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/")
+    file(GLOB files "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/*.blend")
+    foreach(file ${files})
+      get_filename_component(filename ${file} NAME_WE)
+      add_blender_test(
+        geo_node_${geo_node_test}_test_${filename}
+        ${file}
+        --python ${TEST_PYTHON_DIR}/geo_node_test.py
+      )
+      endforeach()
+  else()
+    MESSAGE(STATUS "No directory called ${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/ found!")
+  endif()
 endforeach()
 
 if(WITH_OPENGL_DRAW_TESTS)



More information about the Bf-blender-cvs mailing list