Skip to content

Commit

Permalink
Split ORANGE test into subtests (#1234)
Browse files Browse the repository at this point in the history
  • Loading branch information
sethrj committed May 15, 2024
1 parent 124e0db commit 9e06741
Show file tree
Hide file tree
Showing 14 changed files with 1,241 additions and 1,161 deletions.
2 changes: 1 addition & 1 deletion scripts/dev/iwyu-apple-clang.imp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{ include: ["@<__algorithm/.*>", private, "<algorithm>", public ] },
{ include: ["@<__chrono/.*>", private, "<chrono>", public ] },
{ include: ["@<__functional/.*>", private, "<functional>", public ] },
{ include: ["@<__fwd/string_view.h>", private, "<string_view>", public ] },
{ include: ["@<__fwd/(.*)\\.h>", private, "<\\1>", public ] },
{ include: ["@<__iterator/.*>", private, "<iterator>", public ] },
{ include: ["@<__memory/.*>", private, "<memory>", public ] },
{ include: ["@<__mutex_base>", private, "<mutex>", public ] },
Expand Down
1 change: 0 additions & 1 deletion scripts/dev/run-iwyu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,4 @@ if [ -z "${SKIP_FORMAT}" ]; then
git add -u :/
SKIP_GCF=1 git commit --amend -m "IWYU+Clean" >/dev/null
git reset HEAD^
git co HEAD -- ":/src/celeritas/*/generated/*"
fi
2 changes: 1 addition & 1 deletion test/Test.hh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include <cmath>
#include <string>
#include <string_view>
#include <gtest/gtest.h>
#include <gtest/gtest.h> // IWYU pragma: export

#include "celeritas_config.h"

Expand Down
2 changes: 1 addition & 1 deletion test/celeritas_test.hh
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <iostream>
#include <string_view>

// IWYU pragma: begin_exports
#include "celeritas_config.h"

// IWYU pragma: begin_exports
#include "Test.hh"
#include "TestMacros.hh"
#include "TestMain.hh"
Expand Down
17 changes: 15 additions & 2 deletions test/orange/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ if(CELERITAS_USE_Geant4)
celeritas_get_g4libs(_g4_geo_libs geometry)
endif()

if(CELERITAS_USE_Geant4 AND CELERITAS_REAL_TYPE STREQUAL "double")
set(_use_g4org TRUE)
set(_needs_g4org)
else()
set(_use_g4org FALSE)
set(_needs_g4org DISABLE)
endif()

#-----------------------------------------------------------------------------#
# SETUP
#-----------------------------------------------------------------------------#
Expand All @@ -45,9 +53,14 @@ celeritas_setup_tests(SERIAL PREFIX orange
celeritas_add_test(BoundingBoxUtils.test.cc)
celeritas_add_test(MatrixUtils.test.cc)
celeritas_add_test(OrangeTypes.test.cc)
celeritas_add_device_test(Orange)
celeritas_add_test(RaytraceImager.test.cc GPU)

# High level
celeritas_add_test(Orange.test.cc)
celeritas_add_test(OrangeGeant.test.cc ${_needs_g4org})
celeritas_add_test(OrangeJson.test.cc ${_needs_json})
celeritas_add_device_test(OrangeShift ${_needs_json})

celeritas_add_test(detail/UniverseIndexer.test.cc)

# Bounding interval hierarchy
Expand Down Expand Up @@ -128,7 +141,7 @@ celeritas_add_test(univ/detail/SenseCalculator.test.cc)

#-----------------------------------------------------------------------------#
# Geant4 construction
if(CELERITAS_USE_Geant4 AND CELERITAS_REAL_TYPE STREQUAL "double")
if(_use_g4org)
set(CELERITASTEST_PREFIX orange/g4org)

celeritas_add_test(g4org/Converter.test.cc)
Expand Down

0 comments on commit 9e06741

Please sign in to comment.