public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/bin/
@ 2020-07-16  3:44 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2020-07-16  3:44 UTC (permalink / raw
  To: gentoo-commits

commit:     614c3aacebd4e58a0a66da22ef8e7dc18b253872
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Jul 16 03:19:41 2020 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Jul 16 03:24:32 2020 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=614c3aac

BinTestCase: export PORTAGE_PYTHON

This solves doins test failures triggered in travis-ci when doins
executed with /usr/bin/python instead of PORTAGE_PYTHON.

Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/tests/bin/setup_env.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/portage/tests/bin/setup_env.py b/lib/portage/tests/bin/setup_env.py
index 33b167989..08db78e34 100644
--- a/lib/portage/tests/bin/setup_env.py
+++ b/lib/portage/tests/bin/setup_env.py
@@ -4,6 +4,7 @@
 
 import tempfile
 
+import portage
 from portage import os
 from portage import shutil
 from portage.const import PORTAGE_BIN_PATH
@@ -36,6 +37,7 @@ def binTestsInit():
 	env['PATH'] = bindir + ':' + os.environ['PATH']
 	env['PORTAGE_BIN_PATH'] = bindir
 	env['PORTAGE_PYM_PATH'] = PORTAGE_PYM_PATH
+	env['PORTAGE_PYTHON'] = portage._python_interpreter
 	env['PORTAGE_INST_UID'] = str(os.getuid())
 	env['PORTAGE_INST_GID'] = str(os.getgid())
 	env['DESTTREE'] = '/usr'


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [gentoo-commits] proj/portage:master commit in: lib/portage/tests/bin/
@ 2024-02-05 22:56 Zac Medico
  0 siblings, 0 replies; 2+ messages in thread
From: Zac Medico @ 2024-02-05 22:56 UTC (permalink / raw
  To: gentoo-commits

commit:     a5d92fafab93f62e5b28b97a443e0e06a368251d
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Feb  5 22:51:47 2024 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Feb  5 22:54:04 2024 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=a5d92faf

tests/bin/setup_env.py: multiprocessing spawn compat

Replace unpicklable local pre_exec function with spawn
cwd argument.

Bug: https://bugs.gentoo.org/914876
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>

 lib/portage/tests/bin/setup_env.py | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/lib/portage/tests/bin/setup_env.py b/lib/portage/tests/bin/setup_env.py
index faef118b05..5787f87682 100644
--- a/lib/portage/tests/bin/setup_env.py
+++ b/lib/portage/tests/bin/setup_env.py
@@ -1,5 +1,5 @@
 # setup_env.py -- Make sure bin subdir has sane env for testing
-# Copyright 2007-2013 Gentoo Foundation
+# Copyright 2007-2024 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 import tempfile
@@ -78,10 +78,7 @@ def portage_func(func, args, exit_status=0):
     f = open("/dev/null", "wb")
     fd_pipes = {0: 0, 1: f.fileno(), 2: f.fileno()}
 
-    def pre_exec():
-        os.chdir(env["S"])
-
-    spawn([func] + args.split(), env=env, fd_pipes=fd_pipes, pre_exec=pre_exec)
+    spawn([func] + args.split(), env=env, fd_pipes=fd_pipes, cwd=env["S"])
     f.close()
 
 


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05 22:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-02-05 22:56 [gentoo-commits] proj/portage:master commit in: lib/portage/tests/bin/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2020-07-16  3:44 Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox