From e0f4183fa869bd29b28f3015fb8cb5e0fcc07202 Mon Sep 17 00:00:00 2001 From: Gerardo Ganis <Gerardo.Ganis@cern.ch> Date: Fri, 17 Aug 2012 15:27:05 +0000 Subject: [PATCH] From Pere: - Add script to download the files needed by stressProof if not available locally - Add the relevant switches to have stressProof making use of these files git-svn-id: http://root.cern.ch/svn/root/trunk@45658 27541ba8-7e3a-0410-8455-c3a389f83636 --- test/CMakeLists.txt | 3 ++- test/rootDownloadData.cmake | 28 ++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+), 1 deletion(-) create mode 100644 test/rootDownloadData.cmake diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index b7ee368f870..ca4a30ee455 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -179,8 +179,9 @@ ROOT_ADD_TEST(test-stressinterpreter COMMAND stressInterpreter #--stressProof------------------------------------------------------------------------------- if(NOT WIN32) + add_custom_target(TestData ALL COMMAND ${CMAKE_COMMAND} -DDST=${CMAKE_SOURCE_DIR}/files -P ${CMAKE_CURRENT_SOURCE_DIR}/rootDownloadData.cmake) ROOT_EXECUTABLE(stressProof stressProof.cxx LIBRARIES Proof ProofPlayer Hist) - ROOT_ADD_TEST(test-stressproof COMMAND stressProof lite:// FAILREGEX "FAILED") + ROOT_ADD_TEST(test-stressproof COMMAND stressProof lite:// -h1 ${CMAKE_SOURCE_DIR}/files/h1 -event ${CMAKE_SOURCE_DIR}/files/event FAILREGEX "FAILED") endif() #--testbits---------------------------------------------------------------------------------- diff --git a/test/rootDownloadData.cmake b/test/rootDownloadData.cmake new file mode 100644 index 00000000000..3b13b1d97cf --- /dev/null +++ b/test/rootDownloadData.cmake @@ -0,0 +1,28 @@ +#--------------------------------------------------------------------------------------------------- +# ROOT download test data files +# Script arguments: +# DST destination directory + +if(NOT DST) + set(DST .) +endif() + +set(rootsite http://root.cern.ch/files) +set(timeout 100) + +if(NOT EXISTS ${DST}/h1) + foreach(f dstarmb.root dstarp1a.root dstarp1b.root dstarp2.root) + file(DOWNLOAD ${rootsite}/h1/${f} ${DST}/h1/${f} TIMEOUT ${timeout} SHOW_PROGRESS) + endforeach() +else() + message(STATUS "Already existing files in ${DST}/h1") +endif() + +if(NOT EXISTS ${DST}/event) + foreach(n 1 2 3 4 5 6 7 8 9 10) + file(DOWNLOAD ${rootsite}/data/event_${n}.root ${DST}/event/event_${n}.root TIMEOUT ${timeout} SHOW_PROGRESS) + endforeach() +else() + message(STATUS "Already existing files in ${DST}/event") +endif() + -- GitLab