Skip to content

[roottest] dismiss RootExeOptions and RootExternalIncludes cmake variables #19086

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion roottest/cling/exception/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
if(NOT MSVC OR win_broken_tests)
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86_64.*|x86.*|amd64.*|AMD64.*|i686.*|i386.*")
# All platforms except of ARM/AARCH64
set(RootExeOptions "--ptrcheck")
ROOTTEST_ADD_TEST(nullderef-macro
MACRO nullderef.C
ROOTEXE_OPTS --ptrcheck
PASSRC 1
LABELS roottest regression cling)
endif()
Expand Down
3 changes: 1 addition & 2 deletions roottest/cling/staticinit/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
set(RootExternalIncludes -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}\");")

ROOTTEST_ADD_TEST(ROOT-7775
MACRO execROOT-7775.C
ROOTEXE_OPTS -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}\")"
OUTREF execROOT-7775.ref)

ROOTTEST_ADD_TESTDIRS()
2 changes: 1 addition & 1 deletion roottest/cmake/modules/RoottestMacros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ macro(ROOTTEST_SETUP_MACROTEST)
-e "gROOT->SetMacroPath(\"${CMAKE_CURRENT_SOURCE_DIR}\")"
-e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_BINARY_DIR}\")"
-e "gSystem->AddIncludePath(\"-I${CMAKE_CURRENT_BINARY_DIR}\")"
${RootExternalIncludes} ${RootExeOptions} ${ARG_ROOTEXE_OPTS}
${ARG_ROOTEXE_OPTS}
-q -l -b)

set(root_buildcmd ${ROOT_root_CMD} ${RootExeDefines} -q -l -b)
Expand Down
14 changes: 8 additions & 6 deletions roottest/root/io/issue-7754/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
ROOTTEST_ADD_TEST(write_cmssw_class_v2
MACRO write_cmssw_class_v2.cxx+
OUTREF write_cmssw_class_v2.ref)
OUTREF write_cmssw_class_v2.ref
FIXTURES_SETUP root-io-issue7754-cmssw-fixture)

ROOTTEST_ADD_TEST(read_cmssw_class_v3
MACRO read_cmssw_class_v3.cxx+
OUTREF read_cmssw_class_v3.ref
DEPENDS write_cmssw_class_v2 )

set(RootExternalIncludes -e "gSystem->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}/mwe/include\");")
FIXTURES_REQUIRED root-io-issue7754-cmssw-fixture)

ROOTTEST_ADD_TEST(read_mwe_0
MACRO mwe/combined.cxx+
MACROARG 0
ROOTEXE_OPTS -e "gSystem->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}/mwe/include\")"
OUTREF mwe/read_mwe_0.ref
COPY_TO_BUILDDIR mwe/pluto_oldpers.root)
COPY_TO_BUILDDIR mwe/pluto_oldpers.root
FIXTURES_SETUP root-io-issue7754-mwe-fixture)

ROOTTEST_ADD_TEST(read_mwe_1
MACRO mwe/combined.cxx+
MACROARG 1
ROOTEXE_OPTS -e "gSystem->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}/mwe/include\")"
OUTREF mwe/read_mwe_1.ref
COPY_TO_BUILDDIR mwe/pluto_newpers.root
DEPENDS read_mwe_0) # To avoid both test building the script at the same time.
FIXTURES_REQUIRED root-io-issue7754-mwe-fixture)

38 changes: 16 additions & 22 deletions roottest/root/io/stdpair/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,28 +1,22 @@
ROOTTEST_ADD_TESTDIRS()
ROOTTEST_GENERATE_DICTIONARY(libCmsPairCollection
cmspair.h
LINKDEF FullLinkDef.h
NO_ROOTMAP NO_CXXMODULE
FIXTURES_SETUP root-io-stdpair-cmspaircoll-fixture)

set(CMAKE_ROOTTEST_NOROOTMAP ON)
set(RootExternalIncludes -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}\");")
ROOTTEST_GENERATE_DICTIONARY(libCmsPair
cmspair.h LINKDEF PairLinkDef.h
NO_ROOTMAP NO_CXXMODULE
FIXTURES_SETUP root-io-stdpair-cmspair-fixture)

ROOT_GENERATE_DICTIONARY(G__CmsPairCollection ${CMAKE_CURRENT_SOURCE_DIR}/cmspair.h LINKDEF FullLinkDef.h)
ROOTTEST_LINKER_LIBRARY(CmsPairCollection TEST G__CmsPairCollection.cxx LIBRARIES ${ROOT_LIBRARIES})
ROOTTEST_COMPILE_MACRO(cmspair.h
FIXTURES_SETUP root-io-stdpair-compile-fixture)

ROOT_GENERATE_DICTIONARY(G__CmsPair ${CMAKE_CURRENT_SOURCE_DIR}/cmspair.h LINKDEF PairLinkDef.h)
ROOTTEST_LINKER_LIBRARY(CmsPair TEST G__CmsPair.cxx LIBRARIES ${ROOT_LIBRARIES})

ROOT_ADD_TEST(roottest-root-io-stdpair-collection-build
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} ${build_config} --target G__CmsPairCollection${fast} CmsPairCollection${fast} -- ${always-make}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing this may or may not be the right direction. However it 'looks' like a noticeable change (see also root-project/roottest#858) that does not appear directly link to RootExeOptions. Can you open a separate PR for this? Thanks.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing RootExeOptions is trivial in most cases.
But now split them will be too much work.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. Bear with me while I look at this one directory a bit longer.

FIXTURES_SETUP InputFiles)

ROOT_ADD_TEST(roottest-root-io-stdpair-pair-build
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} ${build_config} --target G__CmsPair${fast} CmsPair${fast} -- ${always-make}
FIXTURES_SETUP InputFiles)

ROOTTEST_ADD_TEST(CopyRootFiles
ROOTTEST_ADD_TEST(copyfiles
COMMAND ${CMAKE_COMMAND} -E echo "Copying root files"
COPY_TO_BUILDDIR aa02.root ab02.root
FIXTURES_SETUP InputFiles)

ROOTTEST_COMPILE_MACRO(cmspair.h)
FIXTURES_REQUIRED root-io-stdpair-cmspaircoll-fixture root-io-stdpair-cmspair-fixture root-io-stdpair-compile-fixture
FIXTURES_SETUP root-io-stdpair-inputfiles-fixture)

foreach(A RANGE 0 4)
foreach(B RANGE 0 1)
Expand All @@ -31,10 +25,10 @@ foreach(D RANGE 0 1)

ROOTTEST_ADD_TEST(pairEnumEvo_${A}_${B}_${C}_${D}
MACRO pairEnumEvo.C
ROOTEXE_OPTS -e "gInterpreter->AddIncludePath(\"-I${CMAKE_CURRENT_SOURCE_DIR}\")"
MACROARG ${A},${B},${C},${D}
OUTREF pairEnumEvo_${A}_${B}_${C}_${D}.ref
DEPENDS cmspaircollection-build cmspair-build ${COMPILE_MACRO_TEST}
FIXTURES_REQUIRED InputFiles)
FIXTURES_REQUIRED root-io-stdpair-inputfiles-fixture)

endforeach()
endforeach()
Expand Down
1 change: 0 additions & 1 deletion roottest/root/io/transient/base/.rootrc

This file was deleted.

8 changes: 4 additions & 4 deletions roottest/root/io/transient/base/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ set(CMAKE_ROOTTEST_NOROOTMAP OFF)
ROOT_GENERATE_DICTIONARY(base_cling ${CMAKE_CURRENT_SOURCE_DIR}/base.h MODULE base LINKDEF baseLinkDef.h)
ROOTTEST_LINKER_LIBRARY(base base_cling.cxx testobject.cpp testobjectderived.cpp TEST LIBRARIES ROOT::Core ROOT::RIO)

set(RootExeOptions -e "gSystem->Load(\"libbase\")") # Adding a ; to avoid the output is complicated

ROOTTEST_ADD_TEST(WriteFile
COPY_TO_BUILDDIR testobject.h testobjectderived.h
PRECMD ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} ${build_config} --target base${fast}
MACRO execWriteFile.cxx+
ROOTEXE_OPTS -e "(void)gSystem->Load(\"libbase\")"
OUTREF execWriteFile${ref_suffix}
TIMEOUT 600)
TIMEOUT 600
FIXTURES_SETUP root-io-transient-base-WriteFile-fixture)

if(${compression_default} STREQUAL "lz4")
set(outref_suffix "LZ4")
Expand All @@ -21,5 +21,5 @@ endif()
ROOTTEST_ADD_TEST(hadd_autoload
COMMAND hadd -f data_merge.root data1.root data2.root
OUTREF hadd_autoload${outref_suffix}.ref
DEPENDS WriteFile
FIXTURES_REQUIRED root-io-transient-base-WriteFile-fixture
ENVIRONMENT ROOT_INCLUDE_PATH=${CMAKE_CURRENT_SOURCE_DIR})
87 changes: 0 additions & 87 deletions roottest/root/io/transient/base/Makefile

This file was deleted.

2 changes: 1 addition & 1 deletion roottest/root/io/transient/base/baseLinkDef.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifdef __CINT__
#ifdef __ROOTCLING__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
Expand Down
1 change: 0 additions & 1 deletion roottest/root/io/transient/base/execWriteFile.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

(int) 0
Processing execWriteFile.cxx+...
Stored 42.00!
Retrieved 42.00!
Expand Down
1 change: 0 additions & 1 deletion roottest/root/io/transient/base/execWriteFile_win32.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

(int) 0
Processing execWriteFile.cxx+...
Stored 42.00!

Expand Down
1 change: 0 additions & 1 deletion roottest/root/io/transient/base/execWriteFile_win64.ref
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@

(int) 0
Processing execWriteFile.cxx+...
Stored 42.00!

Expand Down
1 change: 0 additions & 1 deletion roottest/root/tree/cache/.rootrc

This file was deleted.

27 changes: 13 additions & 14 deletions roottest/root/tree/cache/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,22 +54,21 @@ ROOTTEST_ADD_TEST(LastCluster
MACRO execLastCluster.C
OUTREF execLastCluster.ref)

ROOT_GENERATE_DICTIONARY(G__TheEvent ${CMAKE_CURRENT_SOURCE_DIR}/Event.h LINKDEF EventLinkDef.h)
ROOTTEST_LINKER_LIBRARY(TheEvent TEST Event.cxx G__TheEvent.cxx LIBRARIES ${ROOT_LIBRARIES})
ROOTTEST_ADD_TEST(perfstattest-libevent-build
COMMAND ${CMAKE_COMMAND} --build ${CMAKE_BINARY_DIR} ${build_config} --target G__TheEvent${fast} TheEvent${fast} -- ${always-make})
ROOTTEST_GENERATE_DICTIONARY(libRoottestTreeCacheEvent
Event.h
LINKDEF EventLinkDef.h
SOURCES Event.cxx
NO_ROOTMAP NO_CXXMODULE
FIXTURES_SETUP root-tree-cache-dict-fixture)

set(RootExeOptions -e "gSystem->Load(\"libTheEvent\")")
if(compression_default STREQUAL "lz4")
ROOTTEST_ADD_TEST(perfstattest
MACRO execperfstattest.C
OUTREF execperfstattestLZ4.oref
ERRREF execperfstattest.eref
DEPENDS perfstattest-libevent-build)
set(_ref execperfstattestLZ4.oref)
else()
ROOTTEST_ADD_TEST(perfstattest
set(_ref execperfstattestZLIB.oref)
endif()
ROOTTEST_ADD_TEST(perfstattest
MACRO execperfstattest.C
OUTREF execperfstattestZLIB.oref
ROOTEXE_OPTS -e "(void)gSystem->Load(\"libRoottestTreeCacheEvent\")"
OUTREF ${_ref}
ERRREF execperfstattest.eref
DEPENDS perfstattest-libevent-build)
endif()
FIXTURES_REQUIRED root-tree-cache-dict-fixture)
3 changes: 1 addition & 2 deletions roottest/root/tree/cache/execperfstattestLZ4.oref
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

(int) 0
Processing /Users/mato/Development/ROOT/roottest.git/root/tree/cache/execperfstattest.C...
Processing execperfstattest.C...
9
9
(int) 0
6 changes: 0 additions & 6 deletions roottest/root/tree/cache/execperfstattestLZ4.ref

This file was deleted.

3 changes: 1 addition & 2 deletions roottest/root/tree/cache/execperfstattestZLIB.oref
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@

(int) 0
Processing /Users/mato/Development/ROOT/roottest.git/root/tree/cache/execperfstattest.C...
Processing execperfstattest.C...
7
8
(int) 0
6 changes: 0 additions & 6 deletions roottest/root/tree/cache/execperfstattestZLIB.ref

This file was deleted.

Loading
Loading