CMakeLists.txt 6.58 KB
Newer Older
1
configure_file(qmtest/qmtestRun.sh.in ${CMAKE_BINARY_DIR}/qmtestRun.sh @ONLY)
2
3
4
execute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/qmtestRun.sh)
install(PROGRAMS ${CMAKE_BINARY_DIR}/qmtestRun.sh DESTINATION .)

5
include(CORALConfigScripts)
6
file(GLOB _files RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/qmtest qmtest/QMTest/configuration qmtest/*.qms qmtest/*.qmt qmtest/*/*.qmt qmtest/*/*.qms qmtest/*/*/*.qmt qmtest/*/*/*.qms qmtest/*/*/*/*.qmt qmtest/*.qmc qmtest/COOLTests.py qmtest/text_result_stream.py qmtest/sedValgrindLog.sh)
7
8
9
10
11
12
13
14
15
16
17
18
foreach(_file ${_files})
  if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/qmtest/${_file})
    copy_to_build(${_file} qmtest CoolTest/qmtest)
    get_filename_component(_dstdir CoolTest/qmtest/${_file} PATH)
    if(${_file} MATCHES ".sh")
      install(PROGRAMS ${CMAKE_BINARY_DIR}/CoolTest/qmtest/${_file} DESTINATION ${_dstdir})
    else()
      install(FILES ${CMAKE_BINARY_DIR}/CoolTest/qmtest/${_file} DESTINATION ${_dstdir})
    endif()
  endif()
endforeach(_file)

Andrea Valassi's avatar
Andrea Valassi committed
19
20
21
#============================================================================
# RUNTIME ENVIRONMENT CONFIGURATION
#============================================================================
22

Andrea Valassi's avatar
Andrea Valassi committed
23
include(CORALEnvironmentHandling)
24

25
26
27
# coral_env_for_package(package)
function(coral_env_for_package _pkg)
  find_package(${_pkg})
28
29
30
31
  string(TOUPPER ${_pkg} _pkg_upper)
  if(${_pkg_upper}_FOUND)
    coral_build_and_release_env(PACKAGE ${_pkg})
  endif()
32
endfunction()
33

34
35
36
37
# Basic dependencies as in CoolKernel
coral_env_for_package(Boost)
coral_env_for_package(CORAL)

Andrea Valassi's avatar
Andrea Valassi committed
38
39
40
41
#----------------------------------------------------------------------------
# CORAL plugin runtime
#----------------------------------------------------------------------------

42
coral_env_for_package(XercesC)
Andrea Valassi's avatar
Andrea Valassi committed
43

44
45
coral_env_for_package(MySQL)
coral_env_for_package(SQLite)
46
coral_env_for_package(Frontier_Client)
Andrea Valassi's avatar
Andrea Valassi committed
47

48
49
50
51
52
53
54
55
56
57
# Workaround for CORALCOOL-2857: no Oracle on ARM
IF(NOT BINARY_TAG MATCHES "aarch64")
  coral_env_for_package(Oracle)
  # Runtime environment for CERN's Oracle databases
  # New deployment strategy for tnsnames.ora (CORALCOOL-2756, SPI-758, SPI-726).
  # Also workaround for obsolete tnsnames.ora in LHCb cvmfs (CORALCOOL-2164).
  # Disable Kerberos authentication on mac (CORALCOOL-2763 and CORALCOOL-1244).
  coral_build_and_release_env(SET NLS_LANG american_america.WE8ISO8859P1)
  coral_build_and_release_env(SET ORA_FPU_PRECISION EXTENDED)
  if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
58
59
    ###coral_build_and_release_env(SET TNS_ADMIN /afs/cern.ch/sw/lcg/app/releases/CORAL/internal/oracle/admin/adminNoKerberos) # See CORALCOOL-1244
    coral_build_and_release_env(DEFAULT TNS_ADMIN /afs/cern.ch/sw/lcg/app/releases/CORAL/internal/oracle/admin/adminNoKerberos) # See CORALCOOL-2890
60
  else()
61
62
    ###coral_build_and_release_env(SET TNS_ADMIN /afs/cern.ch/sw/lcg/app/releases/CORAL/internal/oracle/admin)
    coral_build_and_release_env(DEFAULT TNS_ADMIN /afs/cern.ch/sw/lcg/app/releases/CORAL/internal/oracle/admin) # See CORALCOOL-2956
63
64
  endif()
ENDIF()
Andrea Valassi's avatar
Andrea Valassi committed
65

Andrea Valassi's avatar
Andrea Valassi committed
66
67
68
69
#----------------------------------------------------------------------------
# Generic test runtime for CORAL and COOL
#----------------------------------------------------------------------------

70
71
coral_env_for_package(Valgrind)
coral_env_for_package(IgProf)
72
coral_env_for_package(gperftools)
73

Andrea Valassi's avatar
Andrea Valassi committed
74
75
76
77
#----------------------------------------------------------------------------
# More specific test runtime for COOL
#----------------------------------------------------------------------------

Andrea Valassi's avatar
Andrea Valassi committed
78
79
80
coral_build_env(PACKAGE QMTest SET QMTEST_CLASS_PATH ${CMAKE_BINARY_DIR}/CoolTest/qmtest)
coral_release_env(PACKAGE QMTest SET QMTEST_CLASS_PATH ${CMAKE_INSTALL_PREFIX}/CoolTest/qmtest)

Andrea Valassi's avatar
Andrea Valassi committed
81
# These are used within qmtest for logging (and configuring tests if needed)
82
83
84
# [Moved to CORALEnvironmentHandling.cmake for relocatability (CORALCOOL-2829)]
###coral_build_env(SET COOLSYS ${CMAKE_BINARY_DIR})
###coral_release_env(SET COOLSYS ${CMAKE_INSTALL_PREFIX})
85
get_filename_component(CORALSYS ${CORAL_LIBRARY_DIRS} PATH)
86
coral_build_and_release_env(SET CORALSYS ${CORALSYS})
87
88
89
90
91
92
93
94

# Workaround for bug #40326 in SQLite tests
coral_build_and_release_env(SET CORAL_SQLITE_TEMP_STORE_MEMORY 1)

# Select from sys.xxx$ tables in CORAL data dictionary queries
# [done for avalassi, lcg_cool, lcg_cool_nightly even if this env is not set]
###coral_build_and_release_env(SET CORAL_ORA_SELECT_FROM_SYS_TABLES 1)

95
# Force immediate reload of short-lived cached queries (CORALCOOL-2421 and 2920)
96
97
98
99
100
101
102
coral_build_and_release_env(SET FRONTIER_FORCERELOAD short)
# Force immediate reload of all queries (workaround for Frontier bug #42465)
###coral_build_and_release_env(SET FRONTIER_FORCERELOAD long)

# Useful variables for COOL tests
coral_build_and_release_env(SET COOL_DISABLE_CORALCONNECTIONPOOLCLEANUP 1)
coral_build_and_release_env(SET COOL_ENABLE_COOLMSGREPORTER 1)
103
104
coral_build_and_release_env(DEFAULT COOL_MSGLEVEL Error) # Allow overloading! (CORALCOOL-2923)
###coral_build_and_release_env(DEFAULT COOL_MSGLEVEL Verbose)
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
###coral_build_and_release_env(SET COOL_QMTEST_SKIPEVOLVE 1)

# [NB Signal handlers for qmtest tests are defined in COOLTests.py too]
# Enable the COOL signal handler (disable the ROOT one in this case!)
###coral_build_and_release_env(SET COOL_ENABLE_COOLSIGNALHANDLER 1)

# Enable the new algorithm for MV bulk insertion (bug #17903)
# The same value would be used by default if this variable was not set
coral_build_and_release_env(SET COOL_MVINSERTION_PREFETCH_MAXROWS 1000)

# Workaround for ORA-01466 on Oracle 11g (bug #89735)
###coral_build_and_release_env(SET COOL_TESTSUITE_SLEEPFOR01466 1)

# Bypass tests that are expected to fail with ROOT6 (CORALCOOL-2741)
# TEMPORARY! To be removed with ROOT 6.02.04...
coral_build_and_release_env(SET COOL_PYCOOLTEST_SKIP_EXCEPTIONS 1)
coral_build_and_release_env(SET COOL_PYCOOLTEST_SKIP_ROOT6927 1)

#----------------------------------------------------------------------------
# Additional runtime for the COOL nightly tests
# Some settings are different on the various slots
#----------------------------------------------------------------------------

# Configure which tests are run by QMtest using COOL_QMTEST_TARGET
# [Allowed values: ALL, ALL_nomysql, ALL_sqlite]
# Run only SQLite by default (e.g. for test slots and new dev slots)
# Run all backends on the release, dev (preview) and dev1 (patches) slots
# In LCG_Builders/COOL/scripts/COOL_test.sh: 'qmtest run $COOL_QMTEST_TARGET'
# [TEMPORARY? no longer relevant after the move to run_nightly_tests?]
###set COOL_QMTEST_TARGET  ALL_sqlite \
###    lcg_ngt_slt_release ALL \
###    lcg_ngt_slt_dev     ALL \
###    lcg_ngt_slt_dev1    ALL
138
coral_build_and_release_env(SET COOL_QMTEST_TARGET ALL_sqlite)
139