0005-wafsamba-pass-environment-to-cross-execute-tests.patch 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. From 8a173f08d32960091d0ee9cab1b1e1e6df17c85a Mon Sep 17 00:00:00 2001
  2. From: Uri Simchoni <uri@samba.org>
  3. Date: Mon, 7 Oct 2019 00:37:41 +0300
  4. Subject: [PATCH] wafsamba: pass environment to cross-execute tests
  5. This can come in handy for cross-execute scripts in general, and
  6. is particularly required by the samba-xc test for cross-answers /
  7. cross-execute, because Samba sets LD_LIBRARY_PATH during rpath
  8. checks, and the test program needs that in order to successfully
  9. run.
  10. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13846
  11. Signed-off-by: Uri Simchoni <uri@samba.org>
  12. Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
  13. ---
  14. buildtools/wafsamba/samba_cross.py | 3 ++-
  15. 1 file changed, 2 insertions(+), 1 deletion(-)
  16. diff --git a/buildtools/wafsamba/samba_cross.py b/buildtools/wafsamba/samba_cross.py
  17. index 6fca470f2b7..0868a855a0d 100644
  18. --- a/buildtools/wafsamba/samba_cross.py
  19. +++ b/buildtools/wafsamba/samba_cross.py
  20. @@ -120,7 +120,8 @@ class cross_Popen(Utils.subprocess.Popen):
  21. if use_answers:
  22. p = real_Popen(newargs,
  23. stdout=Utils.subprocess.PIPE,
  24. - stderr=Utils.subprocess.PIPE)
  25. + stderr=Utils.subprocess.PIPE,
  26. + env=kw.get('env', {}))
  27. ce_out, ce_err = p.communicate()
  28. ans = (p.returncode, samba_utils.get_string(ce_out))
  29. add_answer(ca_file, msg, ans)
  30. --
  31. 2.20.1