mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-09-16 17:22:55 +00:00
CTEST: add smoke test
This commit is contained in:
parent
eb48d65399
commit
b2c3da8f6a
@ -30,7 +30,8 @@ test:centos8_sanitizer:
|
||||
variables:
|
||||
OMP_NUM_THREADS: 4
|
||||
CTEST_MEMORYCHECK_TYPE: LeakSanitizer
|
||||
CTEST_EXCLUSIONS: "RegressionTest.*"
|
||||
CTEST_EXCLUSIONS: smoke_test_built_against_test_install
|
||||
|
||||
dependencies:
|
||||
- build:centos8_sanitizer
|
||||
needs:
|
||||
|
@ -135,8 +135,18 @@ function(vtkm_test_against_install dir)
|
||||
--build-options
|
||||
${args}
|
||||
--no-warn-unused-cli
|
||||
--test-command ${CMAKE_CTEST_COMMAND} --verbose
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
string(REPLACE ";" "\\;" escaped_path "$ENV{PATH}")
|
||||
set_tests_properties(${build_name} PROPERTIES
|
||||
ENVIRONMENT "PATH=$<SHELL_PATH:${install_prefix}/bin>\\;${escaped_path}")
|
||||
else()
|
||||
set_tests_properties(${build_name} PROPERTIES
|
||||
ENVIRONMENT LD_LIBRARY_PATH=${install_prefix}/lib:$ENV{LD_LIBRARY_PATH})
|
||||
endif()
|
||||
|
||||
set_tests_properties(${build_name} PROPERTIES LABELS ${test_label} )
|
||||
set_tests_properties(${build_name} PROPERTIES FIXTURES_REQUIRED vtkm_installed)
|
||||
set_tests_properties(${build_name} PROPERTIES TIMEOUT 600)
|
||||
|
@ -34,6 +34,7 @@ if(VTKm_ENABLE_EXAMPLES)
|
||||
add_subdirectory(redistribute_points)
|
||||
add_subdirectory(temporal_advection)
|
||||
add_subdirectory(tetrahedra)
|
||||
add_subdirectory(smoke_test)
|
||||
endif()
|
||||
|
||||
if (VTKm_ENABLE_TESTING)
|
||||
@ -41,4 +42,5 @@ if (VTKm_ENABLE_TESTING)
|
||||
# be built each time we run the test
|
||||
vtkm_test_against_install(demo)
|
||||
vtkm_test_against_install(histogram)
|
||||
vtkm_test_against_install(smoke_test)
|
||||
endif()
|
||||
|
27
examples/smoke_test/CMakeLists.txt
Normal file
27
examples/smoke_test/CMakeLists.txt
Normal file
@ -0,0 +1,27 @@
|
||||
##============================================================================
|
||||
## Copyright (c) Kitware, Inc.
|
||||
## All rights reserved.
|
||||
## See LICENSE.txt for details.
|
||||
##
|
||||
## This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
## the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
## PURPOSE. See the above copyright notice for more information.
|
||||
##============================================================================
|
||||
|
||||
cmake_minimum_required(VERSION 3.12...3.15 FATAL_ERROR)
|
||||
project(VTKmSmokeTest CXX)
|
||||
include(CTest)
|
||||
|
||||
find_package(VTKm REQUIRED)
|
||||
|
||||
if (VTKm_VERSION VERSION_LESS 1.7)
|
||||
message(FATAL_ERROR "Requires VTK-m 1.7 or newer")
|
||||
endif()
|
||||
|
||||
add_executable(smoke_test smoke_test.cxx)
|
||||
target_link_libraries(smoke_test PRIVATE vtkm_source)
|
||||
|
||||
# Only add this test when this an standalone project
|
||||
if (PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||
add_test(NAME SmokeTestInternal COMMAND ${CMAKE_BINARY_DIR}/smoke_test)
|
||||
endif()
|
23
examples/smoke_test/smoke_test.cxx
Normal file
23
examples/smoke_test/smoke_test.cxx
Normal file
@ -0,0 +1,23 @@
|
||||
//============================================================================
|
||||
// Copyright (c) Kitware, Inc.
|
||||
// All rights reserved.
|
||||
// See LICENSE.txt for details.
|
||||
//
|
||||
// This software is distributed WITHOUT ANY WARRANTY; without even
|
||||
// the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
|
||||
// PURPOSE. See the above copyright notice for more information.
|
||||
//============================================================================
|
||||
|
||||
#include <vtkm/cont/Initialize.h>
|
||||
#include <vtkm/source/Wavelet.h>
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
vtkm::cont::Initialize(argc, argv);
|
||||
vtkm::source::Wavelet source;
|
||||
|
||||
auto output = source.Execute();
|
||||
output.PrintSummary(std::cout);
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
Loading…
Reference in New Issue
Block a user