Tweak failure msgs in emerge/repoman tests.
authorZac Medico <zmedico@gentoo.org>
Tue, 30 Aug 2011 19:22:51 +0000 (12:22 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 30 Aug 2011 19:22:51 +0000 (12:22 -0700)
pym/portage/tests/emerge/test_simple.py
pym/portage/tests/repoman/test_simple.py

index 971193f93dc4c1098cbb6408e668d640c835fb4c..b698fcaa23a6f77a0a811809fc2ba85768b6902b 100644 (file)
@@ -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()
index bfc32fc2ab801414985c7443ff20bd5f39c5900e..35290f6f38caebf42d02154e1ad65a0da172a1ea 100644 (file)
@@ -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()