Skip to content
Snippets Groups Projects
Commit 8d1cc86b authored by René Fritze's avatar René Fritze
Browse files

[cmake/python] fix test distribution writing invalid cmake code for some versions

parent a6d2db1b
No related branches found
No related tags found
No related merge requests found
......@@ -109,7 +109,7 @@ macro(END_TESTCASES)
${CMAKE_CURRENT_BINARY_DIR}/dxt_all_sorted_testnames.cmake)
configure_file(${dune-xt-common-module-path}/dxt_headercheck_targets.cmake.in
${CMAKE_CURRENT_BINARY_DIR}/dxt_headercheck_targets.cmake)
add_custom_target(rerun_test_distribution ${CMAKE_BINARY_DIR}/dune-env-3 distribute_testing.py
add_custom_target(rerun_test_distribution ${CMAKE_BINARY_DIR}/dune-env distribute_testing.py
"${CMAKE_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_BINARY_DIR}/dxt_test_binaries.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/dxt_all_sorted_testnames.cmake"
......
......@@ -149,10 +149,7 @@ norm = 100/MAXTIME
print('Generated {} bins.\nRelative volumes:\n\t\tMin {:.2f}%\n\t\tMax {:.2f}%\n\t\tAvg {:.2f}%\n'.format(
len(bins), min(vols)*norm, max(vols)*norm, mean(vols)*norm, stdev(vols)))
set_tpl = '''if(TEST {testname})\n
set_tests_properties({testname} PROPERTIES LABELS "builder_{idx}")\n
endif(TEST {testname})
'''
set_tpl = '''set_tests_properties({testname} PROPERTIES LABELS "builder_{idx}")\n'''
with open(cmake_outfile, 'wt') as out:
out.write('set(DXT_BIN_COUNT "{}" CACHE STRING "number of bins for test targets" )\n'.format(len(bins)))
for idx, bin in enumerate(bins):
......
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