commit:     b43f542614d136f69328dbc956f902bddb3db9c2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 28 20:45:16 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan 28 20:55:22 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=b43f5426

test_sync_local: fix emaint command path to be valid for travis

 pym/portage/tests/sync/test_sync_local.py | 11 +++++++++--
 1 file 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 b57bdba..bec2e6a 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,)

Reply via email to