-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# | ||
# Specify list of tests | ||
# | ||
|
||
set( gtest_geosx_tests | ||
testDebug.cpp ) | ||
|
||
set( dependencyList ${parallelDeps} gtest ) | ||
|
||
if ( GEOSX_BUILD_SHARED_LIBS ) | ||
set (dependencyList ${dependencyList} geosx_core ) | ||
else() | ||
set (dependencyList ${dependencyList} ${geosx_core_libs} ) | ||
endif() | ||
|
||
# | ||
# Add gtest C++ based tests | ||
# | ||
foreach(test ${gtest_geosx_tests}) | ||
get_filename_component( test_name ${test} NAME_WE ) | ||
|
||
blt_add_executable( NAME ${test_name} | ||
SOURCES ${test} | ||
OUTPUT_DIR ${TEST_OUTPUT_DIRECTORY} | ||
DEPENDS_ON ${dependencyList} ) | ||
|
||
blt_add_test( NAME ${test_name} | ||
COMMAND ${test_name} ) | ||
|
||
if(CMAKE_BUILD_TYPE STREQUAL "Debug") | ||
set_tests_properties(${test_name} PROPERTIES WILL_FAIL TRUE) | ||
endif() | ||
|
||
endforeach() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/* | ||
* ------------------------------------------------------------------------------------------------------------ | ||
* SPDX-License-Identifier: LGPL-2.1-only | ||
* | ||
* Copyright (c) 2018-2020 Lawrence Livermore National Security LLC | ||
* Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University | ||
* Copyright (c) 2018-2020 Total, S.A | ||
* Copyright (c) 2020- GEOS Contributors | ||
* All right reserved | ||
* | ||
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. | ||
* ------------------------------------------------------------------------------------------------------------ | ||
*/ | ||
|
||
int main( int, char * * ) | ||
{ | ||
/* | ||
* This test guards against spurious propagation of -DNDEBUG preprocessor flag (HDF5 in our case), | ||
* which has the effect of disabling LvArray assertions: | ||
* instead, we always check that this test fails in CMake Debug mode, whilst it should always | ||
* pass in RelWithDebInfo or Release builds. | ||
*/ | ||
#ifdef NDEBUG | ||
return 0; | ||
#else | ||
return 1; | ||
#endif | ||
|
||
} |