Attempt to make CI faster.

- Don't run an expensive functionality test in debug builds.
- Don't run the different cache configurations (they're probably going
  away soon because they help only in synthetic benchmarks).
This commit is contained in:
David Chisnall
2019-02-25 13:48:08 +00:00
committed by David Chisnall
parent 7f576c74d6
commit ef50a0282b
3 changed files with 24 additions and 26 deletions

View File

@@ -90,29 +90,27 @@ enable_testing()
set(TESTDIR ${CMAKE_CURRENT_SOURCE_DIR}/src/test)
subdirlist(TEST_CATEGORIES ${TESTDIR})
foreach(TEST_CACHE_FRIENDLY_OFFSET OFF;ON)
foreach(SUPER_SLAB_SIZE 1;16)
foreach(TEST_CATEGORY ${TEST_CATEGORIES})
subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY})
foreach(TEST ${TESTS})
unset(SRC)
aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC)
set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}")
if (TEST_CACHE_FRIENDLY_OFFSET)
set(TESTNAME "${TESTNAME}-cache-friendly")
endif()
foreach(TEST_CATEGORY ${TEST_CATEGORIES})
subdirlist(TESTS ${TESTDIR}/${TEST_CATEGORY})
foreach(TEST ${TESTS})
foreach(SUPER_SLAB_SIZE 1;16)
unset(SRC)
aux_source_directory(${TESTDIR}/${TEST_CATEGORY}/${TEST} SRC)
set(TESTNAME "${TEST_CATEGORY}-${TEST}-${SUPER_SLAB_SIZE}")
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
if (${SUPER_SLAB_SIZE} EQUAL 1)
target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED)
endif()
if(TEST_CACHE_FRIENDLY_OFFSET)
target_compile_definitions(${TESTNAME} PRIVATE CACHE_FRIENDLY_OFFSET=64)
endif()
target_include_directories(${TESTNAME} PRIVATE src)
linklibs(${TESTNAME})
add_executable(${TESTNAME} ${SRC} src/override/new.cc)
if (${SUPER_SLAB_SIZE} EQUAL 1)
target_compile_definitions(${TESTNAME} PRIVATE IS_ADDRESS_SPACE_CONSTRAINED)
endif()
target_include_directories(${TESTNAME} PRIVATE src)
linklibs(${TESTNAME})
if (${TEST} MATCHES "release-.*")
message(STATUS "Adding test: ${TESTNAME} only for release configs")
add_test(NAME ${TESTNAME} COMMAND ${TESTNAME} CONFIGURATIONS "Release")
else()
message(STATUS "Adding test: ${TESTNAME}")
add_test(${TESTNAME} ${TESTNAME})
endforeach()
endif()
endforeach()
endforeach()
endforeach()

View File

@@ -42,7 +42,7 @@ phases:
displayName: 'Compile'
- script: |
ctest -j 4 --output-on-failure
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
failOnStderr: true
@@ -81,7 +81,7 @@ phases:
solution: build/snmalloc.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure -C $(BuildType)'
workingDirectory: build
displayName: 'Run Ctest'
@@ -105,7 +105,7 @@ phases:
solution: build/snmalloc.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure -C $(BuildType)'
workingDirectory: build
displayName: 'Run Ctest'
@@ -131,7 +131,7 @@ phases:
solution: build/snmalloc.sln
msbuildArguments: '/m /p:Configuration=$(BuildType)'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure'
- script: 'ctest -j 4 --interactive-debug-mode 0 --output-on-failure -C $(BuildType)'
workingDirectory: build
displayName: 'Run Ctest'
@@ -159,7 +159,7 @@ phases:
displayName: 'Compile'
- script: |
ctest -j 4 --output-on-failure
ctest -j 4 --output-on-failure -C $(BuildType)
workingDirectory: build
failOnStderr: true