Fix: test: handle env variables undefined
[lttng-tools.git] / tests / regression / ust / ust-dl / test_ust-dl.py
index 7117ca1b343ed8f9568c63f410defbe8d66e2616..9801012a7e83791ec9f3a85f6da401f54c91098d 100644 (file)
@@ -46,8 +46,8 @@ enable_ust_tracepoint_event(session_info, "*")
 start_session(session_info)
 
 test_env = os.environ.copy()
-test_env["LD_PRELOAD"] += ":liblttng-ust-dl.so"
-test_env["LD_LIBRARY_PATH"] += ":" + test_path
+test_env["LD_PRELOAD"] = test_env.get("LD_PRELOAD", "") + ":liblttng-ust-dl.so"
+test_env["LD_LIBRARY_PATH"] = test_env.get("LD_LIBRARY_PATH", "") + ":" + test_path
 test_process = subprocess.Popen(test_path + "prog",
                                 stdout=subprocess.PIPE, stderr=subprocess.PIPE,
                                 env=test_env)
This page took 0.034687 seconds and 5 git commands to generate.