-
Notifications
You must be signed in to change notification settings - Fork 496
Expand file tree
/
Copy pathO2TestsAdapter.cmake
More file actions
35 lines (31 loc) · 1.56 KB
/
O2TestsAdapter.cmake
File metadata and controls
35 lines (31 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
# Copyright 2019-2020 CERN and copyright holders of ALICE O2.
# See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
# All rights not expressly granted are reserved.
#
# This software is distributed under the terms of the GNU General Public
# License v3 (GPL Version 3), copied verbatim in the file "COPYING".
#
# In applying this license CERN does not waive the privileges and immunities
# granted to it by virtue of its status as an Intergovernmental Organization
# or submit itself to any jurisdiction.
# We patch those tests that require some environment (most notably the O2_ROOT
# variable) to convert from O2_ROOT pointing to build tree to O2_ROOT pointing
# to install tree. Should not be needed in the long run if we consider (as we
# should, I would argue) that tests are running off the build tree, before
# installation (and are not installed, as there's probably no point in doing so)
# Should not be needed in the long run if we consider (as we should, I would
# argue) that tests are running off the build tree, before installation (and are
# not installed, as there's probably no point in doing so)
#
include_guard()
if(DEFINED ENV{ALIBUILD_O2_TESTS} AND PROJECT_NAME STREQUAL "O2")
message(STATUS "!!!")
message(
STATUS
"!!! ALIBUILD_O2_TESTS detected. Will patch my tests so they work off the install tree"
)
configure_file(${CMAKE_SOURCE_DIR}/tests/tmp-patch-tests-environment.sh.in
tmp-patch-tests-environment.sh)
install(
CODE [[ execute_process(COMMAND bash tmp-patch-tests-environment.sh) ]])
endif()