diff options
author | Patrick Ohly <patrick.ohly@intel.com> | 2011-08-11 11:30:57 +0000 |
---|---|---|
committer | Patrick Ohly <patrick.ohly@intel.com> | 2011-08-12 19:17:49 +0000 |
commit | ffb216422eca296d9eec370a1d537ab19cf581e3 (patch) | |
tree | 1e8e0c366f7d8d0f97c81826c65320517c115979 /test | |
parent | 469041216fa573fb8618b598ac2ec140871cdeea (diff) |
testing: preserve LD_LIBRARY_PATH from environment
LD_LIBRARY_PATH can be set in the environment *of runtest.py* and
will be forwarded to client-test/syncevolution as part of the
"env LD_LIBRARY_PATH=..." part of the command invocation.
This has to be done like this because sudo+schroot do not pass
through LD_LIBRARY_PATH and runtest.py itself needs to set
it for SyncEvolution libs, which must not overwrite the per-target
setting.
Diffstat (limited to 'test')
-rwxr-xr-x | test/runtests.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/test/runtests.py b/test/runtests.py index e04d03f2..e623d8e7 100755 --- a/test/runtests.py +++ b/test/runtests.py @@ -199,7 +199,9 @@ class Context: del cmd[command + 1] cmdstr = " ".join(map(lambda x: (' ' in x or x == '') and "'%s'"%x or x, cmd)) - print "*** ( cd %s; %s )" % (os.getcwd(), cmdstr) + print "*** ( cd %s; export %s; %s )" % (os.getcwd(), + " ".join(map(lambda x: "'%s=%s'" % (x, os.getenv(x, "")), [ "LD_LIBRARY_PATH" ])), + cmdstr) sys.stdout.flush() result = os.system(cmdstr) if result != 0: @@ -485,7 +487,7 @@ class SyncEvolutionTest(Action): "CLIENT_TEST_LOG=%(log)s " \ "CLIENT_TEST_EVOLUTION_PREFIX=%(evoprefix)s " \ "%(runner)s " \ - "env LD_LIBRARY_PATH=build-synthesis/src/.libs:.libs:syncevo/.libs PATH=backends/webdav:.:$PATH %(testprefix)s " \ + "env LD_LIBRARY_PATH=build-synthesis/src/.libs:.libs:syncevo/.libs:$LD_LIBRARY_PATH PATH=backends/webdav:.:$PATH %(testprefix)s " \ "%(testbinary)s" % \ { "server": self.serverName, "sources": ",".join(self.sources), |