From 4bbfe6241ec7a4d286a1e8b3074c9dde0de4f2ea Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Tue, 30 Aug 2011 12:22:51 -0700 Subject: [PATCH] Tweak failure msgs in emerge/repoman tests. --- pym/portage/tests/emerge/test_simple.py | 3 ++- pym/portage/tests/repoman/test_simple.py | 7 ++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/pym/portage/tests/emerge/test_simple.py b/pym/portage/tests/emerge/test_simple.py index 971193f93..b698fcaa2 100644 --- a/pym/portage/tests/emerge/test_simple.py +++ b/pym/portage/tests/emerge/test_simple.py @@ -140,6 +140,7 @@ class SimpleEmergeTestCase(TestCase): for line in output: sys.stderr.write(_unicode_decode(line)) - self.assertEqual(os.EX_OK, proc.returncode, "emerge failed") + self.assertEqual(os.EX_OK, proc.returncode, + "emerge failed with args %s" % (args,)) finally: playground.cleanup() diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py index bfc32fc2a..35290f6f3 100644 --- a/pym/portage/tests/repoman/test_simple.py +++ b/pym/portage/tests/repoman/test_simple.py @@ -158,10 +158,10 @@ class SimpleRepomanTestCase(TestCase): # order to ensure that the CTIME is current shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd")) for cwd in ("", "dev-libs", "dev-libs/A", "dev-libs/B"): - cwd = os.path.join(portdir, cwd) + abs_cwd = os.path.join(portdir, cwd) proc = subprocess.Popen([portage._python_interpreter, "-Wd", os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"], - cwd=cwd, env=env, stdout=subprocess.PIPE) + cwd=abs_cwd, env=env, stdout=subprocess.PIPE) output = proc.stdout.readlines() proc.wait() proc.stdout.close() @@ -169,6 +169,7 @@ class SimpleRepomanTestCase(TestCase): for line in output: sys.stderr.write(_unicode_decode(line)) - self.assertEqual(os.EX_OK, proc.returncode, "repoman failed") + self.assertEqual(os.EX_OK, proc.returncode, + "repoman failed in %s" % (cwd,)) finally: playground.cleanup() -- 2.26.2