diff --git a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx index 26bbd8dc885..1d96bd932e9 100644 --- a/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx +++ b/Modules/Core/QuadEdgeMesh/test/itkVTKPolyDataReaderQuadEdgeMeshTest.cxx @@ -36,8 +36,6 @@ itkVTKPolyDataReaderQuadEdgeMeshTest(int argc, char * argv[]) auto polyDataReader = ReaderType::New(); - using PointType = ReaderType::PointType; - polyDataReader->SetFileName(argv[1]); try @@ -58,9 +56,6 @@ itkVTKPolyDataReaderQuadEdgeMeshTest(int argc, char * argv[]) std::cout << "Using following MeshType :"; std::cout << mesh->GetNameOfClass() << std::endl; - const PointType point{}; - - std::cout << "Testing itk::VTKPolyDataReader" << std::endl; const unsigned int numberOfPoints = mesh->GetNumberOfPoints(); diff --git a/Modules/IO/NRRD/test/itkNrrdVectorImageUnitLabelReadTest.cxx b/Modules/IO/NRRD/test/itkNrrdVectorImageUnitLabelReadTest.cxx index ff155b67d53..82b33a46ca1 100644 --- a/Modules/IO/NRRD/test/itkNrrdVectorImageUnitLabelReadTest.cxx +++ b/Modules/IO/NRRD/test/itkNrrdVectorImageUnitLabelReadTest.cxx @@ -30,7 +30,7 @@ template void checkField(itk::MetaDataDictionary & metadata, const std::string & key, const T & expectedValue) { - T value; + T value{}; if (!itk::ExposeMetaData(metadata, key, value)) { std::cerr << "Metadata test failed: '" << key << "' is not found" << std::endl; diff --git a/Testing/ContinuousIntegration/AzurePipelinesLinux.yml b/Testing/ContinuousIntegration/AzurePipelinesLinux.yml index 55b41de7a8f..23038d46695 100644 --- a/Testing/ContinuousIntegration/AzurePipelinesLinux.yml +++ b/Testing/ContinuousIntegration/AzurePipelinesLinux.yml @@ -34,7 +34,7 @@ variables: CCACHE_NOHASHDIR: 'true' CCACHE_SLOPPINESS: pch_defines,time_macros jobs: -- job: LinuxLegacyRemovedCxx20 +- job: LinuxLegacyRemovedDebugCxx20 timeoutInMinutes: 0 cancelTimeoutInMinutes: 300 pool: @@ -80,9 +80,9 @@ jobs: - task: Cache@2 inputs: - key: '"ccache-v4" | "$(Agent.OS)" | "LinuxLegacyRemovedCxx20" | "$(Build.SourceVersion)"' + key: '"ccache-v5" | "$(Agent.OS)" | "LinuxLegacyRemovedDebugCxx20" | "$(Build.SourceVersion)"' restoreKeys: | - "ccache-v4" | "$(Agent.OS)" | "LinuxLegacyRemovedCxx20" + "ccache-v5" | "$(Agent.OS)" | "LinuxLegacyRemovedDebugCxx20" path: $(CCACHE_DIR) displayName: 'Restore ccache' @@ -95,21 +95,23 @@ jobs: - bash: | cat > dashboard.cmake << EOF - set(CTEST_BUILD_CONFIGURATION "MinSizeRel") + set(CTEST_BUILD_CONFIGURATION "Debug") set(CTEST_CMAKE_GENERATOR "Ninja") - set(BUILD_NAME_SUFFIX "LegacyRemovedCxx20") + set(BUILD_NAME_SUFFIX "LegacyRemovedDebugCxx20") set(dashboard_cache " ITK_LEGACY_REMOVE:BOOL=ON CMAKE_CXX_STANDARD:STRING=20 CMAKE_CXX_STANDARD_REQUIRED:BOOL=ON - BUILD_SHARED_LIBS:BOOL=OFF + BUILD_SHARED_LIBS:BOOL=ON BUILD_EXAMPLES:BOOL=ON ITK_WRAP_PYTHON:BOOL=OFF + CMAKE_CXX_FLAGS_DEBUG:STRING=-O1 + CMAKE_C_FLAGS_DEBUG:STRING=-O1 CMAKE_C_COMPILER_LAUNCHER:STRING=ccache CMAKE_CXX_COMPILER_LAUNCHER:STRING=ccache ITK_COMPUTER_MEMORY_SIZE:STRING=4.5 ") - set(CTEST_TEST_ARGS EXCLUDE_LABEL BigIO) # Disabled to conserve disk space + set(CTEST_TEST_ARGS EXCLUDE_LABEL "BigIO|RUNS_LONG") # BigIO = disk; RUNS_LONG = Debug wall time include(\$ENV{AGENT_BUILDDIRECTORY}/ITK-dashboard/azure_dashboard.cmake) EOF cat dashboard.cmake @@ -122,11 +124,19 @@ jobs: c++ --version cmake --version + # ccache refreshes timestamps on hit; evict-older-than prunes untouched entries (1d on pass keeps it lean, 4d on fail retains fix-retry objects). ctest -S $(Agent.BuildDirectory)/ITK-dashboard/dashboard.cmake -V -j 2 + ctest_rc=$? + if [ $ctest_rc -eq 0 ]; then + ccache --evict-older-than 1d + else + ccache --evict-older-than 4d + fi + exit $ctest_rc displayName: 'Build and test' env: CTEST_OUTPUT_ON_FAILURE: 1 - CCACHE_MAXSIZE: 2.4G + CCACHE_MAXSIZE: 4.5G - bash: ccache --show-stats condition: always() @@ -144,6 +154,15 @@ jobs: - task: PublishTestResults@2 inputs: testResultsFiles: "$(Agent.BuildDirectory)/JUnitTestResults.xml" - testRunTitle: 'CTest $(Agent.OS) LegacyRemovedCxx20' + testRunTitle: 'CTest $(Agent.OS) LegacyRemovedDebugCxx20' condition: succeededOrFailed() displayName: 'Publish test results' + + # The Debug+Examples build tree fills the agent's free space; remove it so + # the post-job ccache/ExternalData Cache@2 save has room to write its tar. + - bash: | + set -x + rm -rf $(Build.SourcesDirectory)-build + df -h / + condition: always() + displayName: 'Free build tree before post-job cache save'