CMakeLists.txt 520 字节
Newer Older
1 2 3 4
file(
  GLOB TEST_OPS
  RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
  "test_*.py")
Z
ziyoujiyi 已提交
5 6
string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}")

P
pangengzheng 已提交
7 8 9
if(NOT WITH_HETERPS OR WITH_PSLIB)
  list(REMOVE_ITEM TEST_OPS "test_gpubox_ps")
endif()
W
wangzhen38 已提交
10

Z
ziyoujiyi 已提交
11
foreach(TEST_OP ${TEST_OPS})
12 13
  py_test_modules(${TEST_OP} MODULES ${TEST_OP})
  list(APPEND TEST_OPS ${TEST_OP})
14
  set_tests_properties(${TEST_OP} PROPERTIES TIMEOUT 120)
W
Wilber 已提交
15
endforeach()
16

P
pangengzheng 已提交
17 18 19
if(WITH_HETERPS AND NOT WITH_PSLIB)
  set_tests_properties(test_gpubox_ps PROPERTIES LABELS "RUN_TYPE=GPUPS")
endif()