Closed Bug 909522 Opened 8 years ago Closed 8 years ago
Run mach's Python unit tests
mach has Python unit tests. They are currently disabled. I would like to enable them. I think some of the Python tests currently fail. This bug entails getting everything passing first, obviously.
We've held off doing this for too long. mach is too important to not have its unit tests running on checkin. test_entry_point.py is not enabled because the test fails. This is tracked by bug 958196. I don't believe anything mission critical relies on entry points, so this shouldn't be a big deal. https://tbpl.mozilla.org/?tree=Try&rev=ef2bd3c59a51
Attachment #8357913 - Flags: review?(mshal)
Comment on attachment 8357913 [details] [diff] [review] Run mach's unit tests as part of make check >diff --git a/python/mach/mach/test/test_entry_point.py b/python/mach/mach/test/test_entry_point.py >--- a/python/mach/mach/test/test_entry_point.py >+++ b/python/mach/mach/test/test_entry_point.py >+ >+ >+# Not enabled in automation because tests are failing. >+#if __name__ == '__main__': >+# main() Couldn't hurt to mention bug 958196 in this comment too. I applied bug 957856 before this patch, but when running make check I get: ERROR: test_command_error (__main__.TestErrorOutput) Traceback (most recent call last): File "/home/marf/mozilla-central-git/python/mach/mach/test/test_error_output.py", line 23, in test_command_error 'Command Error']) File "/home/marf/mozilla-central-git/python/mach/mach/test/test_error_output.py", line 19, in _run_mach return TestBase._run_mach(self, args, 'throw.py') File "/home/marf/mozilla-central-git/python/mach/mach/test/common.py", line 25, in _run_mach m.load_commands_from_file(os.path.join(self.provider_dir, provider_file)) File "/home/marf/mozilla-central-git/python/mach/mach/main.py", line 235, in load_commands_from_file imp.load_source(module_name, path) File "/home/marf/mozilla-central-git/python/mach/mach/test/providers/throw.py", line 15, in <module> from mach.test.providers import throw2 ImportError: No module named providers Is there another bug this is dependent on? Or are we still missing something from upstream mach?
The "ImportError: No module named providers" should have been fixed by the addition of the empty __init__.py file in this patch.
https://tbpl.mozilla.org/?tree=Try&rev=d85528bb475a should be a more accurate try.
The try push was completely green.
Comment on attachment 8357913 [details] [diff] [review] Run mach's unit tests as part of make check Ahh, so it seems 'patch' just ignores new empty files (and diff -Naur doesn't generate a patch for them). git bz apply failed because I didn't have 957856 yet, and then I just tried to manually apply the patch it left around afterward. Sorry about that!
Attachment #8357913 - Flags: review?(mshal) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/656e14ae9363 mach is now POTB!
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
You need to log in before you can comment on or make changes to this bug.