Commit e85dfee9 authored by Douglas's avatar Douglas

wendelin: custom test runner to load our own libstdc++

Now the test runners use the LD_PRELOAD environment variable to load
the correct libstdc++ built by slapos and restart themselves.

The restart is necesasry because LD_PRELOAD is only taken into account
at the time the process is started. Changing this environment variable
in runtime has no effects.
parent 17322ba9
...@@ -12,6 +12,8 @@ parts += ...@@ -12,6 +12,8 @@ parts +=
ipython ipython
wendelin.core wendelin.core
ipython-notebook ipython-notebook
wendelin_test_suite_runner
wendelin_testrunner
[eggs] [eggs]
initialization = initialization =
...@@ -25,6 +27,34 @@ eggs += ...@@ -25,6 +27,34 @@ eggs +=
${wendelin.core:egg} ${wendelin.core:egg}
${ipython:egg} ${ipython:egg}
[generic_testrunner_init]
initialization =
# The 4 lines below will replace the process with another one, with the proper
# LD_PRELOAD environment variable. This is necessary because LD_PRELOAD is only
# taken into account when the process starts. Modifying it in runtime doesn't
# work.
import struct, os
arch = 8 * struct.calcsize("P")
rerun = not os.getenv('LD_PRELOAD')
if rerun: os.environ['LD_PRELOAD'] = '''${gcc-fortran:location}/lib%s/libstdc++.so''' % arch
if rerun: os.execve(os.path.realpath(__file__), sys.argv, os.environ)
[wendelin_test_suite_runner]
<= test_suite_runner
# we need to override the test suite runner to add our custom libstdc++ dynamic
# library to the path
initialization =
${generic_testrunner_init:initialization}
${test_suite_runner:initialization}
[wendelin_testrunner]
<= testrunner
# we need to override the test suite runner to add our custom libstdc++ dynamic
# library to the path
initialization =
${generic_testrunner_init:initialization}
${testrunner:initialization}
[erp5_repository_list] [erp5_repository_list]
repository_id_list += wendelin repository_id_list += wendelin
......
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