Commit 0699c926 authored by Andrea Valassi's avatar Andrea Valassi
Browse files

Workarounds to keep DYLD_LIBRARY_PATH in qmtest on Mac 10.11 (CORALCOOL-2884)


git-svn-id: file:///git/lcgcool.svndb/cool/trunk@19950 4525493e-7705-40b1-a816-d608a930855b
parent 45b0b469
......@@ -61,7 +61,9 @@ export CORALCOOL_QMTEST_WORKDIR=$tmpdir
echo "Using CORALCOOL_QMTEST_WORKDIR=${CORALCOOL_QMTEST_WORKDIR}"
tmpout=$tmpdir/results.qmr
echo Execute ${ccrun} qmtest run -f brief $tests
${ccrun} qmtest run -f brief $tests > $tmpout
qmtestRun="qmtest run"
if [ `${ccrun} python -c 'import platform; print platform.system()'` == "Darwin" ]; then qmtestRun="python `${ccrun} which qmtest` run"; fi # CORALCOOL-2884
${ccrun} ${qmtestRun} -f brief $tests > $tmpout
status=$?
cat $tmpout
###echo "status[1]=$status"
......
......@@ -3,7 +3,7 @@ execute_process(COMMAND chmod +x ${CMAKE_BINARY_DIR}/qmtestRun.sh)
install(PROGRAMS ${CMAKE_BINARY_DIR}/qmtestRun.sh DESTINATION .)
include(CORALConfigScripts)
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)
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/platform_unix.py qmtest/sedValgrindLog.sh)
foreach(_file ${_files})
if(NOT IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/qmtest/${_file})
copy_to_build(${_file} qmtest CoolTest/qmtest)
......
......@@ -29,13 +29,18 @@ import select
import signal
import string
import sys
import platform # CORALCOOL-2884
import traceback
########################################################################
# constants
########################################################################
if sys.platform[:5] == "linux":
if platform.system() == 'Darwin':
# Workaround for System Integrity Protection (CORALCOOL-2884)
# Use own copy of /bin/bah to bypass SIP and keep DYLD_LIBRARY_PATH
default_shell = ["bash", "-norc", "-noprofile"]
elif sys.platform[:5] == "linux":
# GNU/Linux systems generally use 'bash' as the default shell.
# Invoke it with options to inhibit parsing of user startup files.
default_shell = ["/bin/bash", "-norc", "-noprofile"]
......
......@@ -208,7 +208,9 @@ fi
theQmr=${theQmrDir}/${BINARY_TAG}.qmr # Drop "-cmake" (CORALCOOL-2842)
echo "Launch tests - results will be in ${theQmr}"
echo Launch \'qmtest run ${theTests}\'
${ccrun} -q VALGRIND_LIB=$VALGRIND_LIB CORAL_TESTSUITE_VALGRIND_SUPP=$CORAL_TESTSUITE_VALGRIND_SUPP CORAL_TESTSUITE_VALGRIND_LOGDIR=$CORAL_TESTSUITE_VALGRIND_LOGDIR qmtest run -o ${theQmr} ${theTests} > /dev/null # NB Extra env are needed (and more explicit than "export")!
qmtestRun="qmtest run"
if [ `${ccrun} python -c 'import platform; print platform.system()'` == "Darwin" ]; then qmtestRun="python `${ccrun} which qmtest` run"; fi # CORALCOOL-2884
${ccrun} -q VALGRIND_LIB=$VALGRIND_LIB CORAL_TESTSUITE_VALGRIND_SUPP=$CORAL_TESTSUITE_VALGRIND_SUPP CORAL_TESTSUITE_VALGRIND_LOGDIR=$CORAL_TESTSUITE_VALGRIND_LOGDIR ${qmtestRun} -o ${theQmr} ${theTests} > /dev/null # NB Extra env are needed (and more explicit than "export")!
${ccrun} -q qmtest summarize -f stats ${theQmr} ${theTests} | awk 'BEGIN{out=0}{if ($2=="STATISTICS") out=1; if (out==1) print}'
# Beautify and move the valgrind logs
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment