diff --git a/roottest/oldMakefile b/roottest/oldMakefile
deleted file mode 100644
index 10c3009f2a099..0000000000000
--- a/roottest/oldMakefile
+++ /dev/null
@@ -1,18 +0,0 @@
-.DEFAULT_GOAL := summary
-
-CLEAN_TARGETS += $(ALL_LIBRARIES)
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-
-clingtest: test
-
diff --git a/roottest/root/io/compression/CMakeLists.txt b/roottest/root/io/compression/CMakeLists.txt
index 227297c2402a2..5158ed67669dd 100644
--- a/roottest/root/io/compression/CMakeLists.txt
+++ b/roottest/root/io/compression/CMakeLists.txt
@@ -1,7 +1,47 @@
-#-------------------------------------------------------------------------------
-#
-# Placeholder file to translate the tests to the new CTest system. Meanwhile we
-# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
-#
-#-------------------------------------------------------------------------------
-ROOTTEST_ADD_OLDTEST()
+ROOT_GENERATE_DICTIONARY(G__IoCompressionGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
+  LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/EventLinkDef.h)
+
+ROOT_LINKER_LIBRARY(IoCompressionGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/IoCompressionGeneration.cxx
+  G__IoCompressionGeneration.cxx
+  LIBRARIES Core Tree Hist MathCore Physics Graf Matrix)
+
+if(MSVC)
+  add_custom_command(TARGET IoCompressionGeneration POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoCompressionGeneration.dll
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libIoCompressionGeneration.dll
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoCompressionGeneration.lib
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libIoCompressionGeneration.lib)
+endif()
+
+ROOTTEST_GENERATE_EXECUTABLE(IoCompressionGenerator
+  ${CMAKE_CURRENT_SOURCE_DIR}/IoCompressionGenerator.cxx
+  LIBRARIES Core RIO Net Tree Hist MathCore IoCompressionGeneration
+  DEPENDS IoCompressionGeneration
+  FIXTURES_SETUP io-compression-generator)
+
+set(size 20)
+set(opt 1)
+
+function(IO_COMPRESSION_GENERATION comp action)
+  ROOTTEST_ADD_TEST("${comp}-${action}"
+    COMMAND ./IoCompressionGenerator ${size} "${comp}" ${opt} "${action}"
+    FIXTURES_REQUIRED io-compression-generator
+    RESOURCE_LOCK io-compression-file)
+endfunction()
+
+IO_COMPRESSION_GENERATION(0 1)
+IO_COMPRESSION_GENERATION(0 20)
+IO_COMPRESSION_GENERATION(5 1)
+IO_COMPRESSION_GENERATION(5 20)
+IO_COMPRESSION_GENERATION(101 1)
+IO_COMPRESSION_GENERATION(101 20)
+IO_COMPRESSION_GENERATION(208 1)
+IO_COMPRESSION_GENERATION(208 20)
+IO_COMPRESSION_GENERATION(301 1)
+IO_COMPRESSION_GENERATION(301 20)
+IO_COMPRESSION_GENERATION(404 1)
+IO_COMPRESSION_GENERATION(404 20)
+IO_COMPRESSION_GENERATION(505 1)
+IO_COMPRESSION_GENERATION(505 20)
diff --git a/roottest/root/io/compression/Event.h b/roottest/root/io/compression/Event.h
index 6f945421c0794..ae04ea19c104f 100644
--- a/roottest/root/io/compression/Event.h
+++ b/roottest/root/io/compression/Event.h
@@ -67,7 +67,7 @@ friend Bool_t  operator<=(const EventHeader& h1, const EventHeader& h2);
 
    ClassDef(EventHeader,1)  //Event Header
 };
-inline Bool_t     operator<=(const EventHeader& s1, const EventHeader& s2)
+inline Bool_t     operator<=(const EventHeader& /*s1*/, const EventHeader& /*s2*/)
 { return 0; }
 
 template <class T> struct template1 {};
diff --git a/roottest/root/io/compression/Event.cxx b/roottest/root/io/compression/IoCompressionGeneration.cxx
similarity index 99%
rename from roottest/root/io/compression/Event.cxx
rename to roottest/root/io/compression/IoCompressionGeneration.cxx
index 284bb87aeebdf..515cdbebe1557 100644
--- a/roottest/root/io/compression/Event.cxx
+++ b/roottest/root/io/compression/IoCompressionGeneration.cxx
@@ -178,7 +178,7 @@ Event::Event()
 }
 
 //______________________________________________________________________________
-Event::Event(Int_t enumber)
+Event::Event(Int_t /*enumber*/)
 {
    // Create an Event object.
    // When the constructor is invoked for the first time, the class static
@@ -267,7 +267,7 @@ void Event::Clear(Option_t *option)
 }
 
 //______________________________________________________________________________
-void Event::Reset(Option_t *option)
+void Event::Reset(Option_t * /*option*/)
 {
 // Static function to reset all static objects for this event
 //   fgTracks->Delete(option);
diff --git a/roottest/root/io/compression/MainEvent.cxx b/roottest/root/io/compression/IoCompressionGenerator.cxx
similarity index 99%
rename from roottest/root/io/compression/MainEvent.cxx
rename to roottest/root/io/compression/IoCompressionGenerator.cxx
index a1e0ec6060c49..52bd8ae8f144f 100644
--- a/roottest/root/io/compression/MainEvent.cxx
+++ b/roottest/root/io/compression/IoCompressionGenerator.cxx
@@ -279,7 +279,6 @@ int main(int argc, char **argv)
    filename << "Event" << comp << ".root";
 
    TFile *hfile;
-   TTree *tree;
    Event *event = 0;
 
    // Fill event, header and tracks with some random numbers
@@ -300,7 +299,7 @@ int main(int argc, char **argv)
 //         Read case
    if (read) {
       hfile = new TFile(filename.str().c_str());
-      tree = (TTree*)hfile->Get("T");
+      TTree *tree = (TTree*)hfile->Get("T");
       TBranch *branch = tree->GetBranch("event");
       branch->SetAddress(&event);
       Int_t nentries = (Int_t)tree->GetEntries();
@@ -372,7 +371,7 @@ int main(int argc, char **argv)
       hfile = new TFile(filename.str().c_str(),"RECREATE","TTree benchmark ROOT file");
 
       // Test get and set functions in TFile
-      int testValue = -2;
+      testValue = -2;
       hfile->SetCompressionSettings(testValue);
       if (hfile->GetCompressionSettings() != -1) exit(1);
       if (hfile->GetCompressionAlgorithm() != -1) exit(2);
diff --git a/roottest/root/io/compression/Makefile b/roottest/root/io/compression/Makefile
deleted file mode 100644
index e1cfbbeb3e461..0000000000000
--- a/roottest/root/io/compression/Makefile
+++ /dev/null
@@ -1,38 +0,0 @@
-local_clean = *.root Event$(ExeSuf) libEvent.$(DllSuf) *.o EventDict.cxx EventDict.h *~ *.log *.$(ObjSuf) $(ALL_LIBRARIES)
-
-CLEAN_TARGETS += $(local_clean)
-TEST_TARGETS += compressionTest
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-include $(ROOTTEST_HOME)/scripts/Event.mk
-
-#.SUFFIXES: .cxx .o .so
-
-CXXOPT:=-Z7
-LDOPT:=-debug $ROOTSYS/lib/libXMLIO.so
-
-compressionTest: ./Event$(ExeSuf) ./libEvent.$(DllSuf)
-	$(CMDECHO)./Event 20   0 1  1  >  Event.write.log
-	$(CMDECHO)./Event 20   0 1 20  >  Event.read.log
-	$(CMDECHO)./Event 20 101 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20 101 1 20  >> Event.read.log
-	$(CMDECHO)./Event 20 208 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20 208 1 20  >> Event.read.log
-	$(CMDECHO)./Event 20 301 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20 301 1 20  >> Event.read.log
-	$(CMDECHO)./Event 20 404 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20 404 1 20  >> Event.read.log
-	$(CMDECHO)./Event 20 505 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20 505 1 20  >> Event.read.log
-	$(CMDECHO)./Event 20   5 1  1  >> Event.write.log
-	$(CMDECHO)./Event 20   5 1 20  >> Event.read.log
diff --git a/roottest/root/io/event/CMakeLists.txt b/roottest/root/io/event/CMakeLists.txt
index 544b6eccbee77..9ec1d886a7056 100644
--- a/roottest/root/io/event/CMakeLists.txt
+++ b/roottest/root/io/event/CMakeLists.txt
@@ -4,9 +4,35 @@
 # define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
 #
 #-------------------------------------------------------------------------------
-if(NOT MSVC OR win_broken_tests)
-    ROOTTEST_ADD_TEST(roottest-root-io-event
-                      COMMAND ${ROOT_GMAKE_PROGRAM} cleantest
-                      WORKING_DIR ${CMAKE_CURRENT_SOURCE_DIR}
-                      DEPENDS roottest-scripts-utils)
+ROOT_GENERATE_DICTIONARY(G__IoEventGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
+  LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/EventLinkDef.h)
+
+ROOT_LINKER_LIBRARY(IoEventGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/IoEventGeneration.cxx
+  G__IoEventGeneration.cxx
+  LIBRARIES Core Tree Hist MathCore)
+
+if(MSVC)
+  add_custom_command(TARGET IoEventGeneration POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoEventGeneration.dll
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libIoEventGeneration.dll
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libIoEventGeneration.lib
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libIoEventGeneration.lib)
 endif()
+
+ROOTTEST_GENERATE_EXECUTABLE(IoEventGenerator
+  ${CMAKE_CURRENT_SOURCE_DIR}/IoEventGenerator.cxx
+  LIBRARIES Core RIO Net Tree Hist MathCore IoEventGeneration
+  DEPENDS IoEventGeneration
+  FIXTURES_SETUP io-event-generator)
+
+ROOTTEST_ADD_TEST(write
+  COMMAND ./IoEventGenerator 10 1 1 1
+  FIXTURES_REQUIRED io-event-generator
+  RESOURCE_LOCK io-event-file)
+
+ROOTTEST_ADD_TEST(read
+  COMMAND ./IoEventGenerator 10 1 1 20
+  FIXTURES_REQUIRED io-event-generator
+  RESOURCE_LOCK io-event-file)
diff --git a/roottest/root/io/event/Event.cxx b/roottest/root/io/event/IoEventGeneration.cxx
similarity index 100%
rename from roottest/root/io/event/Event.cxx
rename to roottest/root/io/event/IoEventGeneration.cxx
diff --git a/roottest/root/io/event/MainEvent.cxx b/roottest/root/io/event/IoEventGenerator.cxx
similarity index 100%
rename from roottest/root/io/event/MainEvent.cxx
rename to roottest/root/io/event/IoEventGenerator.cxx
diff --git a/roottest/root/io/event/Makefile b/roottest/root/io/event/Makefile
deleted file mode 100644
index da83509a66146..0000000000000
--- a/roottest/root/io/event/Makefile
+++ /dev/null
@@ -1,40 +0,0 @@
-local_clean = Event$(ExeSuf) libEvent.$(DllSuf) *.o EventDict.cxx EventDict.h *~ *.log *.$(ObjSuf) $(ALL_LIBRARIES) *.root *.lock lock
-
-CLEAN_TARGETS += $(local_clean)
-TEST_TARGETS += bigeventTest
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-include $(ROOTTEST_HOME)/scripts/Event.mk
-
-#.SUFFIXES: .cxx .o .so
-
-CXXOPT:=-Z7
-LDOPT:=-debug
-
-#all: bigeventTest
-
-bigeventTest.write.log: ./Event$(ExeSuf) ./libEvent.$(DllSuf)
-	$(CMDECHO) $(call locked_execution,bigeventTest.write, sleep 10; (./Event 10 1 1 1;) > Event.write.log 2>&1 && echo "write success" > bigeventTest.write.log,test, echo "write success" > bigeventTest.write.log)
-
-bigeventTest.read.log: ./Event$(ExeSuf) ./libEvent.$(DllSuf) bigeventTest.write.log
-	$(CMDECHO)./Event 10 1 1 20 > Event.write.log 2>bigeventTest.read.log && echo "read success" > bigeventTest.read.log
-
-bigeventTest.log: bigeventTest.write.log bigeventTest.read.log
-	$(CMDECHO) cat bigeventTest.write.log bigeventTest.read.log > bigeventTest.log
-
-bigeventTest.success: bigeventTest.log
-	$(CMDECHO) diff -u -b bigeventTest.ref bigeventTest.log && touch bigeventTest.success
-
-bigeventTest: bigeventTest.log bigeventTest.success
-	$(TestDiff)
-
diff --git a/roottest/root/io/event/dt_Makefile b/roottest/root/io/event/dt_Makefile
deleted file mode 100644
index 3ec58714777f4..0000000000000
--- a/roottest/root/io/event/dt_Makefile
+++ /dev/null
@@ -1,72 +0,0 @@
-# General indication for the size of the files
-size=6
-tracks=30
-# Use compression or not
-comp=0
-# For writing of the files
-action=1
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-	export ROOTTEST_HOME=$(shell expr $(PWD) : '\(.*/roottest/\)')
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-
-#include ./Makefile
-
-DATAFILES = Event.new.split0.root Event.new.split1.root \
-	Event.new.split2.root  Event.new.split9.root \
-	Event.old.streamed.root Event.old.split.root
-
-REFFILE=dt_reference.root
-
-OUTPUT=>/dev/null
-
-EVENT=Event
-
-files: $(DATAFILES)
-
-$(EVENT)$(ExeSuf) : $(EVENTDIR)/$(SUCCESS_FILE)
-
-drawtest : $(DATAFILES) $(REFFILE) dt_RunDrawTest_C.$(DllSuf)
-
-Event.new.split0.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	@./$(EVENT) $(size) $(comp) 0 $(action) $(tracks) Event.new.split0.root $(EVENTBUFSIZE) $(OUTPUT) && \
-	echo  "$@ made"
-
-Event.new.split1.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	@./$(EVENT) $(size) $(comp) 1 $(action) $(tracks) Event.new.split1.root $(EVENTBUFSIZE) $(OUTPUT)  && \
-	echo  "$@ made"
-
-Event.new.split2.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	@./$(EVENT) $(size) $(comp) 2 $(action) $(tracks) Event.new.split2.root $(EVENTBUFSIZE) $(OUTPUT)  && \
-	echo  "$@ made"
-
-Event.new.split9.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	./$(EVENT) $(size) $(comp) 9 $(action) $(tracks) Event.new.split9.root $(EVENTBUFSIZE) $(OUTPUT) && \
-	echo  "$@ made"
-
-Event.old.streamed.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	@./$(EVENT) $(size) $(comp) -1 $(action) $(tracks) Event.old.streamed.root $(EVENTBUFSIZE) $(OUTPUT) && \
-	echo  "$@ made"
-
-Event.old.split.root : $(EVENT)$(ExeSuf) libEvent.$(DllSuf)
-	@./$(EVENT) $(size) $(comp) -2 $(action) $(tracks) Event.old.split.root $(EVENTBUFSIZE) $(OUTPUT) && \
-	echo  "$@ made"
-
-$(REFFILE) : dt_MakeRef.C dt_DrawTest.C libEvent.$(DllSuf) Event.h Event.new.split9.root
-	@root -b -q 'dt_MakeRef.C("Event.new.split9.root",0);' $(OUTPUT) && \
-	echo "$@ made"
-
-ClassWarning='Warning in <TClass::TClass>: no dictionary for class'
-RootPrompt='root \[0\]'
-Streamer="Event::Streamer not available,"
-
-
-dt_RunDrawTest_C.$(DllSuf) : dt_RunDrawTest.C dt_DrawTest.C
-	@root -l -b -q dt_build.C $(OUTPUT) && \
-	echo "$@ made"
-
-#Windows does not like piping 
-#	@echo 'gSystem->Exit(!gSystem->CompileMacro("dt_RunDrawTest.C","kf"))' | root -l -b $(OUTPUT) && \
-
diff --git a/roottest/root/io/perf/CMakeLists.txt b/roottest/root/io/perf/CMakeLists.txt
index 227297c2402a2..d436f2162ba7f 100644
--- a/roottest/root/io/perf/CMakeLists.txt
+++ b/roottest/root/io/perf/CMakeLists.txt
@@ -1,7 +1,3 @@
-#-------------------------------------------------------------------------------
-#
-# Placeholder file to translate the tests to the new CTest system. Meanwhile we
-# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
-#
-#-------------------------------------------------------------------------------
-ROOTTEST_ADD_OLDTEST()
+ROOTTEST_ADD_TEST(julius
+  COMMAND ${ROOT_root_CMD} -q -l -b "${CMAKE_CURRENT_SOURCE_DIR}/julius.C+"
+)
diff --git a/roottest/root/io/perf/Makefile b/roottest/root/io/perf/Makefile
deleted file mode 100644
index 5caf6e76b4e24..0000000000000
--- a/roottest/root/io/perf/Makefile
+++ /dev/null
@@ -1,34 +0,0 @@
-# This is a template for all makefile.
-
-#Set the list of files to be delete by clean:
-CLEAN_TARGETS += $(ALL_LIBRARIES)
-
-#Set the list of target to make while testing
-TEST_TARGETS += mytest
-
-# adjust the location of Rules.mk as needed.
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-
-
-mytest:
-	$(CMDECHO) echo mytest > /dev/null
-
-testWithFailure:
-ifeq ($(FAIL),)
-	$(WarnFailTest)
-endif
-
-perftest:
-	$(CMDECHO) $(CALLROOTEXE) -q julius.C+
-
-
diff --git a/roottest/root/io/perf/julius.C b/roottest/root/io/perf/julius.C
index 13d3ceb625259..bfe77e348048b 100644
--- a/roottest/root/io/perf/julius.C
+++ b/roottest/root/io/perf/julius.C
@@ -18,7 +18,8 @@
 // root > .x julius.C(5)
 //By default the reader reads only 50% of the rows. This may be changed
 //by changing the default value of fraction in the function jread.
-   
+
+#include "TAxis.h"
 #include "TFile.h"
 #include "TStopwatch.h"
 #include "TTree.h"
diff --git a/roottest/root/treeformula/Makefile b/roottest/root/treeformula/Makefile
deleted file mode 100644
index 61ccf2d8be615..0000000000000
--- a/roottest/root/treeformula/Makefile
+++ /dev/null
@@ -1,18 +0,0 @@
-# %ROOTTEST-duration%:2
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-
-
-all: tests
-test: tests
-
diff --git a/roottest/root/treeformula/event/CMakeLists.txt b/roottest/root/treeformula/event/CMakeLists.txt
index 227297c2402a2..3039b28fa846c 100644
--- a/roottest/root/treeformula/event/CMakeLists.txt
+++ b/roottest/root/treeformula/event/CMakeLists.txt
@@ -1,7 +1,93 @@
-#-------------------------------------------------------------------------------
+ROOT_GENERATE_DICTIONARY(G__TreeFormulaEvent ${CMAKE_CURRENT_SOURCE_DIR}/Event.h LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/EventLinkDef.h)
+
+ROOT_LINKER_LIBRARY(TreeFormulaEvent
+  ${CMAKE_CURRENT_SOURCE_DIR}/TreeFormulaEvent.cxx G__TreeFormulaEvent.cxx
+  LIBRARIES Core Tree Hist MathCore)
+
+if(MSVC)
+  add_custom_command(TARGET TreeFormulaEvent POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTreeFormulaEvent.dll
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libTreeFormulaEvent.dll
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTreeFormulaEvent.lib
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libTreeFormulaEvent.lib)
+endif()
+
+ROOTTEST_GENERATE_EXECUTABLE(EventGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/TreeFormulaEventMain.cxx
+  LIBRARIES Core RIO Net Tree Hist MathCore TreeFormulaEvent
+  DEPENDS TreeFormulaEvent
+  FIXTURES_SETUP treeformula-event-generator)
+
+configure_file(dt_wrap.C . COPYONLY)
+configure_file(dt_DrawTest.C . COPYONLY)
+configure_file(dt_RunDrawTest.C . COPYONLY)
+
+if(TARGET onepcm)
+  set(EventDependencies "onepcm")
+endif()
+
+ROOTTEST_ADD_TEST(write
+  COMMAND ./EventGeneration 10 1 1 1
+  DEPENDS ${EventDependencies}
+  FIXTURES_SETUP treeformula-event-write
+  FIXTURES_REQUIRED treeformula-event-generator
+  RESOURCE_LOCK treeformula-event-file)
+
+ROOTTEST_ADD_TEST(read
+  COMMAND ./EventGeneration 10 1 1 20
+  DEPENDS ${EventDependencies}
+  FIXTURES_SETUP treeformula-event-read
+  FIXTURES_REQUIRED treeformula-event-write
+  RESOURCE_LOCK treeformula-event-file)
+
 #
-# Placeholder file to translate the tests to the new CTest system. Meanwhile we
-# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
+# function EVENT_GENERATE_FILE
 #
-#-------------------------------------------------------------------------------
-ROOTTEST_ADD_OLDTEST()
+# Run a file generation using EventGeneration with provided
+# parameters. Considered a test.
+#
+function(EVENT_GENERATE_FILE file_name size comp split action tracks)
+  ROOTTEST_ADD_TEST("generation-${file_name}"
+    COMMAND ./EventGeneration "${size}" "${comp}" "${split}" "${action}" "${tracks}"
+    POSTCMD ${CMAKE_COMMAND} -E rename
+      ${CMAKE_CURRENT_BINARY_DIR}/Event.root
+      "${CMAKE_CURRENT_BINARY_DIR}/${file_name}.root"
+    FIXTURES_SETUP "treeformula-event-generation-${file_name}"
+    FIXTURES_REQUIRED treeformula-event-read
+    RESOURCE_LOCK treeformula-event-file)
+endfunction()
+
+#
+# function EVENT_GENERATE_TESTS
+#
+# Generate tests using file generated with EVENT_GENERATE_FILE. dt_wrap.C
+# is run with differing modes (0, 1, 2, 3, 4)
+#
+function(EVENT_GENERATE_TESTS file_name)
+  foreach(mode 0;1;2;3;4)
+    ROOTTEST_ADD_TEST("${file_name}-${mode}"
+      COMMAND ${ROOT_root_CMD} -q -b -l "${CMAKE_CURRENT_SOURCE_DIR}/dt_wrap.C\(\"${file_name}.root\",${mode}\)"
+      FIXTURES_REQUIRED "treeformula-event-generation-${file_name}"
+      RESOURCE_LOCK "treeformula-event-file-${file_name}")
+  endforeach()
+endfunction()
+
+set(size 50)
+set(comp 0)
+set(action 1)
+set(tracks 600)
+
+EVENT_GENERATE_FILE(split-zero ${size} ${comp} 0 ${action} ${tracks})
+EVENT_GENERATE_TESTS(split-zero)
+
+EVENT_GENERATE_FILE(split-one ${size} ${comp} 1 ${action} ${tracks})
+EVENT_GENERATE_TESTS(split-one)
+
+EVENT_GENERATE_FILE(split-nine ${size} ${comp} 9 ${action} ${tracks})
+EVENT_GENERATE_TESTS(split-nine)
+
+EVENT_GENERATE_FILE(stream-old ${size} ${comp} -1 ${action} ${tracks})
+EVENT_GENERATE_TESTS(stream-old)
+
+EVENT_GENERATE_FILE(split-old ${size} ${comp} -2 ${action} ${tracks})
+EVENT_GENERATE_TESTS(split-old)
diff --git a/roottest/root/treeformula/event/DrawTest.sh b/roottest/root/treeformula/event/DrawTest.sh
deleted file mode 100755
index 5c0db17bc0fb1..0000000000000
--- a/roottest/root/treeformula/event/DrawTest.sh
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /bin/sh
-
-#dt_MakeFiles.sh
-#root -b -q 'dt_MakeRef.C("Event.new.split9.root");'
-if [ "x`which gmake 2>/dev/null | awk '{if ($1~/gmake/) print $1;}'`" != "x" ]
-then
-   gmake -f dt_Makefile drawtest
-else
-   make -f dt_Makefile drawtest
-fi
-./dt_RunDrawTest.sh
diff --git a/roottest/root/treeformula/event/Makefile b/roottest/root/treeformula/event/Makefile
deleted file mode 100644
index 72a467e3b14df..0000000000000
--- a/roottest/root/treeformula/event/Makefile
+++ /dev/null
@@ -1,36 +0,0 @@
-local_clean = Event$(ExeSuf) libEvent.$(DllSuf) *.o EventDict.cxx EventDict.h *~ *.log *.$(DllSuf) *.root $(ALL_LIBRARIES)
-
-CLEAN_TARGETS += $(local_clean)
-TEST_TARGETS += bigeventTest
-
-ifeq ($(strip $(ROOTTEST_HOME)),)
-   export ROOTTEST_HOME := $(shell git rev-parse --show-toplevel)/roottest/
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      export ROOTTEST_HOME := $(shell expr $(CURDIR) : '\(.*/roottest/\)')
-   endif
-   ifeq ($(strip $(ROOTTEST_HOME)),)
-      $(error The head of roottest was not found.  Set ROOTTEST_HOME)
-   endif
-endif
-
-include $(ROOTTEST_HOME)/scripts/Rules.mk
-include $(ROOTTEST_HOME)/scripts/Event.mk
-
-#.SUFFIXES: .cxx .o .so
-
-LOPT:=-g3
-
-#all: bigeventTest
-
-bigeventTest: ./Event$(ExeSuf) ./libEvent.$(DllSuf)
-	$(CMDECHO)./Event 10 1 1 1 > Event.write.log
-	$(CMDECHO)./Event 10 1 1 20 > Event.read.log
-ifeq ($(FAIL),)
-	$(WarnFailTest)
-#	$(CMDECHO)echo Warning this is due to the problem with loading libraries with stl containers after opening a file
-else
-	$(CMDECHO)./DrawTest.sh
-endif
-
-
-
diff --git a/roottest/root/treeformula/event/Event.cxx b/roottest/root/treeformula/event/TreeFormulaEvent.cxx
similarity index 100%
rename from roottest/root/treeformula/event/Event.cxx
rename to roottest/root/treeformula/event/TreeFormulaEvent.cxx
diff --git a/roottest/root/treeformula/event/MainEvent.cxx b/roottest/root/treeformula/event/TreeFormulaEventMain.cxx
similarity index 100%
rename from roottest/root/treeformula/event/MainEvent.cxx
rename to roottest/root/treeformula/event/TreeFormulaEventMain.cxx
diff --git a/roottest/root/treeformula/event/dt_MakeFiles.sh b/roottest/root/treeformula/event/dt_MakeFiles.sh
deleted file mode 100755
index 56eead9b719fd..0000000000000
--- a/roottest/root/treeformula/event/dt_MakeFiles.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/sh 
-
-size=50
-tracks=600
-comp=0
-action=1
-
-if test $# -gt 0 ; then
-    echo ajusting size to $1
-    size=$1
-fi
-
-
-./Event $size $comp 0 $action $tracks
-mv Event.root Event.new.split0.root
-
-./Event $size $comp 1 $action $tracks
-mv Event.root Event.new.split1.root
-
-./Event $size $comp 9 $action $tracks
-mv Event.root Event.new.split9.root
-
-./Event $size $comp -1 $action $tracks
-mv Event.root Event.old.streamed.root
-
-./Event $size $comp -2 $action $tracks
-mv Event.root Event.old.split.root
-
-# Next step is to do something like
-# root -q 'dt_MakeRef.C("Event.old.split.root");'
diff --git a/roottest/root/treeformula/event/dt_Makefile b/roottest/root/treeformula/event/dt_Makefile
deleted file mode 100644
index 4809ec8def3bc..0000000000000
--- a/roottest/root/treeformula/event/dt_Makefile
+++ /dev/null
@@ -1,67 +0,0 @@
-# General indication for the size of the files
-size=6
-tracks=30
-# Use compression or not
-comp=0
-# For writing of the files
-action=1
-
-include ./Makefile
-
-DATAFILES = Event.new.split0.root Event.new.split1.root \
-	Event.new.split2.root  Event.new.split9.root 
-
-REFFILE=dt_reference.root
-
-OUTPUT=>/dev/null
-
-files: $(DATAFILES)
-
-drawtest : $(DATAFILES) $(REFFILE) dt_RunDrawTest_C.$(DllSuf)
-
-Event.new.split0.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) 0 $(action) $(tracks) $(OUTPUT) && \
-	mv Event.root Event.new.split0.root && \
-	echo  "$@ made"
-
-Event.new.split1.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) 1 $(action) $(tracks) $(OUTPUT)  && \
-	mv Event.root Event.new.split1.root && \
-	echo  "$@ made"
-
-Event.new.split2.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) 2 $(action) $(tracks) $(OUTPUT)  && \
-	mv Event.root Event.new.split2.root && \
-	echo  "$@ made"
-
-Event.new.split9.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) 9 $(action) $(tracks) $(OUTPUT) && \
-	mv Event.root Event.new.split9.root && \
-	echo  "$@ made"
-
-Event.old.streamed.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) -1 $(action) $(tracks) $(OUTPUT) && \
-	mv Event.root Event.old.streamed.root && \
-	echo  "$@ made"
-
-Event.old.split.root : Event$(ExeSuf) libEvent.$(DllSuf)
-	@./Event $(size) $(comp) -2 $(action) $(tracks) $(OUTPUT) && \
-	mv Event.root Event.old.split.root && \
-	echo  "$@ made"
-
-$(REFFILE) : dt_MakeRef.C dt_DrawTest.C libEvent.$(DllSuf) Event.h Event.new.split9.root
-	@root -b -q 'dt_MakeRef.C("Event.new.split9.root",0);' $(OUTPUT) && \
-	echo "$@ made"
-
-ClassWarning='Warning in <TClass::TClass>: no dictionary for class'
-RootPrompt='root \[0\]'
-Streamer="Event::Streamer not available,"
-
-
-dt_RunDrawTest_C.$(DllSuf) : dt_RunDrawTest.C dt_DrawTest.C
-	@root -l -b -q dt_build.C $(OUTPUT) && \
-	echo "$@ made"
-
-#Windows does not like piping 
-#	@echo 'gSystem->Exit(!gSystem->CompileMacro("dt_RunDrawTest.C","kf"))' | root -l -b $(OUTPUT) && \
-
diff --git a/roottest/root/treeformula/event/dt_RunDrawTest.C b/roottest/root/treeformula/event/dt_RunDrawTest.C
index 16bef0dddf7f7..258debb5d862c 100644
--- a/roottest/root/treeformula/event/dt_RunDrawTest.C
+++ b/roottest/root/treeformula/event/dt_RunDrawTest.C
@@ -1,3 +1,4 @@
+#include "TROOT.h"
 #include "TCanvas.h"
 #include "TClassTable.h"
 #include "TFile.h"
diff --git a/roottest/root/treeformula/event/dt_RunDrawTest.sh b/roottest/root/treeformula/event/dt_RunDrawTest.sh
deleted file mode 100755
index acfb7dfc0aa75..0000000000000
--- a/roottest/root/treeformula/event/dt_RunDrawTest.sh
+++ /dev/null
@@ -1,56 +0,0 @@
-#!/bin/sh 
-
-# Previous step is to do something like
-# root -l -q 'MakeRef.C("Event.old.split.root");'
-
-ClassWarning='Warning in <TClass::TClass>: no dictionary for class'
-RootPrompt='root \[0\]'
-EmptyLine='^$'
-Streamer="Event::Streamer not available,"
-
-# launch replace
-launch () {
-  ($(CALLROOTEXE) -l -b -q 'dt_wrap.C("'$1'",'$2')' 2>&1; return $?;) | \
-     (eval grep -v $3 ) | \
-     (if test ! "x$4" = x ; then eval grep -v $4; else cat; fi;)  | \
-     (if test ! "x$5" = x ; then eval grep -v $5; else cat; fi;)  | \
-     (if test ! "x$6" = x ; then eval grep -v $6; else cat; fi;)  | \
-     (if test ! "x$7" = x ; then eval grep -v $7; else cat; fi;)   \
-    ;
-}
-
-#launch "Event.old.split.root" 0 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine'" && \
-#launch "Event.old.split.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.split.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.split.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.split.root" 4 "'$RootPrompt'" "'$EmptyLine' "
-
-#launch "Event.old.streamed.root" 0 "'$Streamer'" "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.streamed.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.streamed.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.streamed.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-#launch "Event.old.streamed.root" 4 "'$RootPrompt'" "'$EmptyLine' "
-
-launch "Event.new.split9.root" 0 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split9.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split9.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split9.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split9.root" 4 "'$RootPrompt'" "'$EmptyLine' "
-
-launch "Event.new.split2.root" 0 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split2.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split2.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split2.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split2.root" 4 "'$RootPrompt'" "'$EmptyLine' "
-
-launch "Event.new.split1.root" 0 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split1.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split1.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split1.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split1.root" 4 "'$RootPrompt'" "'$EmptyLine' "
-
-launch "Event.new.split0.root" 0 "'$Streamer'" "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split0.root" 1 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split0.root" 2 "'$ClassWarning'" "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split0.root" 3 "'$RootPrompt'" "'$EmptyLine' " && \
-launch "Event.new.split0.root" 4 "'$RootPrompt'" "'$EmptyLine' "
diff --git a/roottest/root/treeformula/event/dt_wrap.C b/roottest/root/treeformula/event/dt_wrap.C
index 7f165e7aa1fa3..e35e8a588fdc1 100644
--- a/roottest/root/treeformula/event/dt_wrap.C
+++ b/roottest/root/treeformula/event/dt_wrap.C
@@ -1,5 +1,11 @@
 void dt_wrap(const char* from, Int_t mode = 0, Int_t verboseLevel = 0) {
-   gROOT->ProcessLine(".L dt_RunDrawTest.C+");
-   int status = !dt_RunDrawTest(from,mode,verboseLevel);
+   int status;
+   stringstream ss{"dt_RunDrawTest"};
+
+   ss << "(\"" << from << "\",";
+   ss << to_string(mode) << ",";
+   ss << to_string(verboseLevel) << ")";
+   gROOT->ProcessLine(".L dt_RunDrawTest.C");
+   gROOT->ProcessLine(ss.str().c_str(), &status);
    if (verboseLevel==0) gSystem->Exit(status);
 }
diff --git a/roottest/root/treeformula/retobj/CMakeLists.txt b/roottest/root/treeformula/retobj/CMakeLists.txt
index 227297c2402a2..b46dc2d888e9b 100644
--- a/roottest/root/treeformula/retobj/CMakeLists.txt
+++ b/roottest/root/treeformula/retobj/CMakeLists.txt
@@ -1,7 +1,33 @@
-#-------------------------------------------------------------------------------
-#
-# Placeholder file to translate the tests to the new CTest system. Meanwhile we
-# define a CTest test that calls 'make' in ${CMAKE_CURRENT_SOURCE_DIR}
-#
-#-------------------------------------------------------------------------------
-ROOTTEST_ADD_OLDTEST()
+ROOT_GENERATE_DICTIONARY(G__TreeFormulaRetobjGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/Event.h
+  LINKDEF ${CMAKE_CURRENT_SOURCE_DIR}/EventLinkDef.h)
+
+ROOT_LINKER_LIBRARY(TreeFormulaRetobjGeneration
+  ${CMAKE_CURRENT_SOURCE_DIR}/TreeFormulaRetobjGeneration.cxx
+  G__TreeFormulaRetobjGeneration.cxx
+  LIBRARIES Core Tree Hist MathCore)
+
+if(MSVC)
+  add_custom_command(TARGET TreeFormulaRetobjGeneration POST_BUILD
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTreeFormulaRetobjGeneration.dll
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libTreeFormulaRetobjGeneration.dll
+    COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_BINARY_DIR}/$<CONFIG>/libTreeFormulaRetobjGeneration.lib
+                                     ${CMAKE_CURRENT_BINARY_DIR}/libTreeFormulaRetobjGeneration.lib)
+endif()
+
+ROOTTEST_GENERATE_EXECUTABLE(TreeFormulaRetobjGenerator
+  ${CMAKE_CURRENT_SOURCE_DIR}/TreeFormulaRetobjGenerator.cxx
+  LIBRARIES Core RIO Net Tree Hist MathCore TreeFormulaRetobjGeneration
+  DEPENDS TreeFormulaRetobjGeneration
+  FIXTURES_SETUP treeformula-retobj-generator)
+
+ROOTTEST_ADD_TEST(retobj
+  COPY_TO_BUILDDIR helper.C mcpool.root
+  PRECMD ./TreeFormulaRetobjGenerator 10 1 0 1
+  MACRO   runretobjTest.C
+  OUTREF  retobjTest.ref
+  FIXTURES_REQUIRED treeformula-retobj-generator)
+
+ROOTTEST_ADD_TEST(enum
+  MACRO  runenum.C
+  OUTREF enum.ref)
diff --git a/roottest/root/treeformula/retobj/Event.h b/roottest/root/treeformula/retobj/Event.h
index 0f634958d9aff..1e5049f1a115a 100644
--- a/roottest/root/treeformula/retobj/Event.h
+++ b/roottest/root/treeformula/retobj/Event.h
@@ -47,16 +47,17 @@ class Track : public TObject {
 
 public:
    Track() { fPointValue = 0; }
-   Track(const Track& orig) {
+   Track(const Track& orig) : TObject(orig) {
      //orig.fTrigBits.Dump();
      *this = orig;
      //fTrigBits.Dump();
      fPointValue = 0;
      fNsp = 0;
    }
+   Track &operator=(const Track& orig) = default;
    Track(Float_t random);
    ~Track() override {Clear();}
-   void          Clear(Option_t *option="") override { delete [] fPointValue; fPointValue=0; }
+   void          Clear(Option_t * /*option*/="") override { delete [] fPointValue; fPointValue=0; }
    Float_t       GetPx() const { return fPx; }
    Float_t       GetPy() const { return fPy; }
    Float_t       GetPz() const { return fPz; }
diff --git a/roottest/root/treeformula/retobj/Event.cxx b/roottest/root/treeformula/retobj/TreeFormulaRetobjGeneration.cxx
similarity index 99%
rename from roottest/root/treeformula/retobj/Event.cxx
rename to roottest/root/treeformula/retobj/TreeFormulaRetobjGeneration.cxx
index 1f1ace79dc2b9..52ae67f7042f4 100644
--- a/roottest/root/treeformula/retobj/Event.cxx
+++ b/roottest/root/treeformula/retobj/TreeFormulaRetobjGeneration.cxx
@@ -185,7 +185,7 @@ Track *Event::AddTrack(Float_t random, Float_t ptmin)
 }
 
 //______________________________________________________________________________
-void Event::Clear(Option_t *option)
+void Event::Clear(Option_t * /*option*/)
 {
    fTracks->Clear("C"); //will also call Track::Clear
    fHighPt->Delete();
@@ -193,7 +193,7 @@ void Event::Clear(Option_t *option)
 }
 
 //______________________________________________________________________________
-void Event::Reset(Option_t *option)
+void Event::Reset(Option_t * /*option*/)
 {
 // Static function to reset all static objects for this event
 //   fgTracks->Delete(option);
diff --git a/roottest/root/treeformula/retobj/MainEvent.cxx b/roottest/root/treeformula/retobj/TreeFormulaRetobjGenerator.cxx
similarity index 99%
rename from roottest/root/treeformula/retobj/MainEvent.cxx
rename to roottest/root/treeformula/retobj/TreeFormulaRetobjGenerator.cxx
index a72efffb07b70..b373b8ee0f160 100644
--- a/roottest/root/treeformula/retobj/MainEvent.cxx
+++ b/roottest/root/treeformula/retobj/TreeFormulaRetobjGenerator.cxx
@@ -131,7 +131,6 @@ int main(int argc, char **argv)
    if (split < 0) {branchStyle = 0; split = -1-split;}
 
    TFile *hfile;
-   TTree *tree;
    Event *event = 0;
 
    // Fill event, header and tracks with some random numbers
@@ -157,7 +156,7 @@ int main(int argc, char **argv)
          hfile = new TNetFile("root://localhost/root/test/EventNet.root");
       } else
          hfile = new TFile("Event.root");
-      tree = (TTree*)hfile->Get("T");
+      TTree *tree = (TTree*)hfile->Get("T");
       TBranch *branch = tree->GetBranch("event");
       branch->SetAddress(&event);
       Int_t nentries = (Int_t)tree->GetEntries();
diff --git a/roottest/root/treeformula/retobj/runretobjTest.C b/roottest/root/treeformula/retobj/runretobjTest.C
index 23932211c14cb..e0083659309c7 100644
--- a/roottest/root/treeformula/retobj/runretobjTest.C
+++ b/roottest/root/treeformula/retobj/runretobjTest.C
@@ -7,8 +7,8 @@ gSystem->Load("libTreePlayer");
 gROOT->ProcessLine(".L helper.C");
 #endif
 
-gSystem->Load("libEvent");
-TFile *Event = TFile::Open("Event.new.split0.root");
+gSystem->Load("libTreeFormulaRetobjGeneration");
+TFile *Event = TFile::Open("Event.root");
 #ifdef ClingWorkAroundMissingDynamicScope
    gROOT->ProcessLine("TTree *tree = (TTree*)gFile->Get(\"T\"); TTreeFormula *tf;TObject * o;");
    gROOT->ProcessLine(".L helper.C");