aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2017-01-28 12:45:16 -0800
committerZac Medico <zmedico@gentoo.org>2017-01-28 12:55:22 -0800
commitb43f542614d136f69328dbc956f902bddb3db9c2 (patch)
treeb4ea4fe13db0609ea4a5af69fa98ff59f20a834e
parentspawn: instantiate userpriv_groups before fork (bug 582098) (diff)
downloadportage-b43f5426.tar.gz
portage-b43f5426.tar.bz2
portage-b43f5426.zip
test_sync_local: fix emaint command path to be valid for travis
-rw-r--r--pym/portage/tests/sync/test_sync_local.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/pym/portage/tests/sync/test_sync_local.py b/pym/portage/tests/sync/test_sync_local.py
index b57bdbae7..bec2e6a74 100644
--- a/pym/portage/tests/sync/test_sync_local.py
+++ b/pym/portage/tests/sync/test_sync_local.py
@@ -71,8 +71,15 @@ class SyncLocalTestCase(TestCase):
cmds = {}
for cmd in ("emerge", "emaint"):
- cmds[cmd] = (portage._python_interpreter,
- "-b", "-Wd", os.path.join(self.bindir, cmd))
+ for bindir in (self.bindir, self.sbindir):
+ path = os.path.join(bindir, cmd)
+ if os.path.exists(path):
+ cmds[cmd] = (portage._python_interpreter,
+ "-b", "-Wd", path)
+ break
+ else:
+ raise AssertionError('%s binary not found in %s or %s' %
+ (cmd, self.bindir, self.sbindir))
git_binary = find_binary("git")
git_cmd = (git_binary,)