Tests: recurse into directories for finding OpenGL draw test .blends.
This commit is contained in:
parent
b030277e79
commit
6dd047c333
|
@ -575,7 +575,7 @@ if(WITH_OPENGL_DRAW_TESTS)
|
|||
file(GLOB children RELATIVE ${TEST_SRC_DIR} ${TEST_SRC_DIR}/*)
|
||||
foreach(child ${children})
|
||||
if(IS_DIRECTORY ${TEST_SRC_DIR}/${child})
|
||||
file(GLOB blends ${TEST_SRC_DIR}/${child}/*.blend)
|
||||
file(GLOB_RECURSE blends "${TEST_SRC_DIR}/${child}/*.blend")
|
||||
if(blends)
|
||||
add_python_test(
|
||||
opengl_draw_${child}_test
|
||||
|
|
|
@ -51,9 +51,10 @@ def print_message(message, type=None, status=''):
|
|||
|
||||
|
||||
def blend_list(dirpath):
|
||||
for filename in os.listdir(dirpath):
|
||||
for root, dirs, files in os.walk(dirpath):
|
||||
for filename in files:
|
||||
if filename.lower().endswith(".blend"):
|
||||
filepath = os.path.join(dirpath, filename)
|
||||
filepath = os.path.join(root, filename)
|
||||
yield filepath
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue