Skip to content

Commit

Permalink
[cmake][tests] Fix and re-enable tests on Windows
Browse files Browse the repository at this point in the history
- Export a couple of missing symbols (x86)
- Re-enable several tests working now with LLVM 16 and VS 2022
- Reorganize `llvm13_broken_tests` and `win_broken_tests` for clarity
  • Loading branch information
bellenot committed Mar 27, 2024
1 parent 60f7275 commit 7a4af49
Show file tree
Hide file tree
Showing 6 changed files with 48 additions and 80 deletions.
4 changes: 1 addition & 3 deletions bindings/pyroot/pythonizations/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,9 +113,7 @@ if (dataframe)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_makenumpy rdataframe_makenumpy.py PYTHON_DEPS numpy)
endif()
if(NOT MSVC OR win_broken_tests OR CMAKE_CXX_STANDARD GREATER 14)
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_asnumpy rdataframe_asnumpy.py PYTHON_DEPS numpy)
endif()
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_asnumpy rdataframe_asnumpy.py PYTHON_DEPS numpy)
ROOT_ADD_PYUNITTEST(pyroot_pyz_rdataframe_histo_profile rdataframe_histo_profile.py)
endif()
endif()
Expand Down
12 changes: 12 additions & 0 deletions core/metacling/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,18 @@ if(MSVC)
??1LifetimeHandler@internal@runtime@cling@@QAE@XZ
?_Facet_Register@std@@YAXPAV_Facet_base@1@@Z
)
if(MSVC_VERSION GREATER_EQUAL 1938)
set(cling_exports ${cling_exports}
??$__std_find_trivial@$$CBDD@@YAPBDPBD0D@Z
??$__std_find_trivial@DD@@YAPADPAD0D@Z
??$__std_find_trivial@HH@@YAPAHPAH0H@Z
??$__std_find_trivial@IH@@YAPAIPAI0H@Z
___std_find_trivial_1@12
___std_find_trivial_2@12
___std_find_trivial_4@12
___std_find_trivial_8@16
)
endif()
if(MSVC_VERSION LESS 1914)
set(cling_exports ${cling_exports} ??3@YAXPAX0@Z ??_V@YAXPAX0@Z)
endif()
Expand Down
2 changes: 1 addition & 1 deletion core/thread/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ endif()

ROOT_ADD_GTEST(testTThreadedObject testTThreadedObject.cxx LIBRARIES Hist)

if(NOT MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8 OR llvm13_broken_tests)
if(NOT MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 8)
ROOT_ADD_GTEST(testInterpreterLock testInterpreterLock.cxx LIBRARIES Imt REPEATS 50)
else()
ROOT_ADD_GTEST(testInterpreterLock testInterpreterLock.cxx LIBRARIES Imt REPEATS 40)
Expand Down
30 changes: 10 additions & 20 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,8 @@ ROOT_ADD_TEST(test-bench COMMAND bench -s LABELS longtest)
#--stressShapes------------------------------------------------------------------------------------
ROOT_EXECUTABLE(stressShapes stressShapes.cxx LIBRARIES Geom Tree GenVector Gpad)
ROOT_ADD_TEST(test-stressshapes COMMAND stressShapes -b FAILREGEX "FAILED|Error in")
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stressshapes-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressShapes.cxx
FAILREGEX "FAILED|Error in")
endif()
ROOT_ADD_TEST(test-stressshapes-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressShapes.cxx
FAILREGEX "FAILED|Error in")

#--stressGeometry------------------------------------------------------------------------------------
ROOT_EXECUTABLE(stressGeometry stressGeometry.cxx LIBRARIES Geom Tree GenVector Gpad)
Expand Down Expand Up @@ -166,19 +164,15 @@ if(ROOT_opengl_FOUND)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tutorials/graphics/earth.dat earth.dat COPYONLY)
ROOT_ADD_TEST(test-stressgraphics ENVIRONMENT LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib:$ENV{LD_LIBRARY_PATH} COMMAND stressGraphics -b -k FAILREGEX "FAILED|Error in" LABELS longtest)
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stressgraphics-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressGraphics.cxx
ROOT_ADD_TEST(test-stressgraphics-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressGraphics.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stressgraphics )
endif()
endif()

#--stressHistogram------------------------------------------------------------------------------------
ROOT_EXECUTABLE(stressHistogram stressHistogram.cxx LIBRARIES Hist RIO)
ROOT_ADD_TEST(test-stresshistogram COMMAND stressHistogram FAILREGEX "FAILED|Error in" LABELS longtest)
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stresshistogram-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressHistogram.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stresshistogram )
endif()
ROOT_ADD_TEST(test-stresshistogram-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressHistogram.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stresshistogram )

#--stressGUI---------------------------------------------------------------------------------------
if(ROOT_asimage_FOUND)
Expand Down Expand Up @@ -238,21 +232,17 @@ ROOT_ADD_TEST(test-stressfit-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMA
if(ROOT_unuran_FOUND)
ROOT_EXECUTABLE(stressHistoFit stressHistoFit.cxx LIBRARIES MathCore Matrix Unuran Tree Gpad)
ROOT_ADD_TEST(test-stresshistofit COMMAND stressHistoFit FAILREGEX "FAILED|Error in" LABELS longtest)
if(NOT MSVC OR CMAKE_SIZEOF_VOID_P EQUAL 4 OR win_broken_tests)
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stresshistofit-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressHistoFit.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stresshistofit )
endif()
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stresshistofit-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressHistoFit.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stresshistofit )
endif()
endif()

#--stressEntryList---------------------------------------------------------------------------
ROOT_EXECUTABLE(stressEntryList stressEntryList.cxx LIBRARIES MathCore Tree Hist)
ROOT_ADD_TEST(test-stressentrylist COMMAND stressEntryList -b FAILREGEX "FAILED|Error in")
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_TEST(test-stressentrylist-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressEntryList.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stressentrylist)
endif()
ROOT_ADD_TEST(test-stressentrylist-interpreted COMMAND ${ROOT_root_CMD} -b -q -l ${CMAKE_CURRENT_SOURCE_DIR}/stressEntryList.cxx
FAILREGEX "FAILED|Error in" DEPENDS test-stressentrylist)

#--stressIterators---------------------------------------------------------------------------
ROOT_EXECUTABLE(stressIterators stressIterators.cxx LIBRARIES Core)
Expand Down
6 changes: 2 additions & 4 deletions tmva/tmva/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,8 @@ if(dataframe)
# RReader
ROOT_ADD_GTEST(rreader rreader.cxx LIBRARIES ROOTVecOps TMVA ROOTDataFrame)
# Tree inference system and user interface
if(NOT MSVC OR llvm13_broken_tests)
ROOT_ADD_GTEST(branchlessForest branchlessForest.cxx LIBRARIES TMVA)
ROOT_ADD_GTEST(rbdt rbdt.cxx LIBRARIES ROOTVecOps TMVAUtils)
endif()
ROOT_ADD_GTEST(branchlessForest branchlessForest.cxx LIBRARIES TMVA)
ROOT_ADD_GTEST(rbdt rbdt.cxx LIBRARIES ROOTVecOps TMVAUtils)
endif()

if(dataframe)
Expand Down
74 changes: 22 additions & 52 deletions tutorials/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,17 +95,6 @@ if (NOT dataframe)
list(APPEND dataframe_veto tmva/RBatchGenerator_filters_vectors.py)
# RooFit tutorial depending on RDataFrame
list(APPEND dataframe_veto roofit/rf408*)
elseif(MSVC AND NOT win_broken_tests)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND dataframe_veto dataframe/df002_dataModel.py)
list(APPEND dataframe_veto dataframe/df016_vecOps.py)
list(APPEND dataframe_veto dataframe/df017_vecOpsHEP.py)
endif()

# Why do we need to veto these tutorials on Windows with C++17?
list(APPEND dataframe_veto dataframe/df032_RDFFromNumpy.py)
list(APPEND dataframe_veto dataframe/df033_Describe.py)

endif()

if(NOT sqlite)
Expand All @@ -123,12 +112,6 @@ if(MACOSX_VERSION VERSION_EQUAL 10.13)
list(APPEND dataframe_veto dataframe/df103_NanoAODHiggsAnalysis.*)
endif()

if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT win_broken_tests)
list(APPEND dataframe_veto dataframe/df002_dataModel.C)
list(APPEND dataframe_veto dataframe/df016_vecOps.C)
list(APPEND dataframe_veto dataframe/df017_vecOpsHEP.C)
endif()

if(NOT ROOT_proof_FOUND)
set(proof_veto roostats/StandardFrequentistDiscovery.C)
endif()
Expand All @@ -142,16 +125,11 @@ if(NOT ROOT_roofit_FOUND)
roostats/*.C roostats/*.py
histfactory/*.C histfactory/*.py)
else()
if(MSVC AND NOT win_broken_tests)
set(roofit_veto roofit/rf401_importttreethx.py roofit/rf708_bphysics.py roofit/rf501_simultaneouspdf.py)
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
list(APPEND roofit_veto roofit/rf409_NumPyPandasToRooFit.py)
else()
# The following tutorials are failing with this error:
# IncrementalExecutor::executeFunction: symbol '__std_find_trivial_4@12' unresolved while linking [cling interface function]!
# on Windows 32 bit and Visual Studio v17.8
list(APPEND roofit_veto roofit/rf509_wsinteractive.C roofit/rf614_binned_fit_problems.C)
endif()
if(MSVC AND CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT llvm13_broken_tests)
# The following tutorials are failing with this error:
# IncrementalExecutor::executeFunction: symbol '__std_find_trivial_4@12' unresolved while linking [cling interface function]!
# on Windows 32 bit and Visual Studio v17.8
list(APPEND roofit_veto roofit/rf509_wsinteractive.C roofit/rf614_binned_fit_problems.C)
endif()
endif()

Expand Down Expand Up @@ -417,31 +395,23 @@ set(extra_veto
r/rootlogon.C)

if(MSVC AND NOT llvm13_broken_tests)
list(APPEND extra_veto
dataframe/df002_dataModel.C
dataframe/df007_snapshot.C
dataframe/df016_vecOps.C
dataframe/df017_vecOpsHEP.C
fit/NumericalMinimization.C
fit/fit2.C
fit/fit2a.C
fit/fit2dHist.C
graphics/earth.C
graphs/motorcycle.C
math/exampleFunction.py
math/multidimSampling.C
math/multivarGaus.C
tree/basic.C
unfold/testUnfold5b.C
unfold/testUnfold5c.C
unfold/testUnfold5d.C
unuran/unuranDemo.C
v7/ntuple/ntpl001_staff.C
v7/perfcomp.cxx
dataframe/df002_dataModel.py
dataframe/df016_vecOps.py
dataframe/df017_vecOpsHEP.py
dataframe/df035_RDFFromPandas.py)
list(APPEND extra_veto
math/exampleFunction.py
dataframe/df002_dataModel.C
dataframe/df016_vecOps.C
dataframe/df017_vecOpsHEP.C
dataframe/df002_dataModel.py
dataframe/df016_vecOps.py
dataframe/df017_vecOpsHEP.py
dataframe/df032_RDFFromNumpy.py
dataframe/df035_RDFFromPandas.py)
if(CMAKE_SIZEOF_VOID_P EQUAL 4)
list(APPEND extra_veto
dataframe/df007_snapshot.C
graphics/earth.C
graphs/motorcycle.C
v7/ntuple/ntpl001_staff.C)
endif()
endif()

set(all_veto hsimple.C
Expand Down

0 comments on commit 7a4af49

Please sign in to comment.