Installation of prepareHistFactory. Fixed the logic in selecting what needs to be executed as test having precedence the target names. Avoid  include ${ROOT_USE_FILE} in tests.