diff options
Diffstat (limited to 'Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake')
-rw-r--r-- | Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake index 8584786..777f192 100644 --- a/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake +++ b/Tests/RunCMake/CTestResourceAllocation/RunCMakeTest.cmake @@ -140,9 +140,13 @@ run_ctresalloc_verify(ctresalloc-verify-noend "test1") # Now test the resource allocation feature of CTest ############################################################################### -function(run_ctest_resource name parallel random) - run_ctest("${name}-ctest-s-res" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") - run_ctest("${name}-ctest-s-nores" "-DCTEST_RESOURCE_ALLOC_ENABLED=0" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") +function(run_ctest_resource name parallel random extra) + run_ctest("${name}-ctest-s-res" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=ARG" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") + run_ctest("${name}-ctest-s-nores" "-DCTEST_RESOURCE_ALLOC_ENABLED=0" "-DCTEST_RESOURCE_SPEC_SOURCE=NONE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") + if(extra) + run_ctest("${name}-ctest-s-res-variable" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=VARIABLE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") + run_ctest("${name}-ctest-s-res-cache" "-DCTEST_RESOURCE_ALLOC_ENABLED=1" "-DCTEST_RESOURCE_SPEC_SOURCE=CACHE" "-DCTRESALLOC_COMMAND=${CTRESALLOC_COMMAND}" "-DCTEST_PARALLEL=${parallel}" "-DCTEST_RANDOM=${random}") + endif() endfunction() function(verify_ctest_resources) @@ -155,15 +159,15 @@ function(verify_ctest_resources) endif() endfunction() -run_ctest_resource(lotsoftests 10 1) -run_ctest_resource(checkfree1 2 0) -run_ctest_resource(checkfree2 1 0) -run_ctest_resource(notenough1 1 0) -run_ctest_resource(notenough2 1 0) -run_ctest_resource(notenough3 1 0) -run_ctest_resource(combine 1 0) -run_ctest_resource(ensure_parallel 2 0) +run_ctest_resource(lotsoftests 10 1 0) +run_ctest_resource(checkfree1 2 0 1) +run_ctest_resource(checkfree2 1 0 0) +run_ctest_resource(notenough1 1 0 1) +run_ctest_resource(notenough2 1 0 0) +run_ctest_resource(notenough3 1 0 0) +run_ctest_resource(combine 1 0 0) +run_ctest_resource(ensure_parallel 2 0 0) set(ENV{CTEST_RESOURCE_GROUP_COUNT} 2) -run_ctest_resource(process_count 1 0) +run_ctest_resource(process_count 1 0 0) unset(ENV{CTEST_RESOURCE_GROUP_COUNT}) |