Fix the unittest to make it pass and avoid relying on a fragile parser:
- Use the __import__ and import coherently
- Use the standard unittest framework
Rewrite of the barrier unittest as using fork() completely messed up
the overall test suite and ran it 8 times.
Visibility: Medium/High - some import changes
Risk: Medium
Tests:
- Ran unittest_suite.py for all and individual directories
- Ran coverage_suite.py for all and individual directories
- Ran manage.py test from frontend directory.
Signed-off-by: Jean-Marc Eurin <jmeurin@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@1827 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/frontend_unittest.py b/frontend/frontend_unittest.py
index 66a49f7..a45fe84 100644
--- a/frontend/frontend_unittest.py
+++ b/frontend/frontend_unittest.py
@@ -4,16 +4,16 @@
This file provides a unittest.TestCase wrapper around the Django unit test
runner.
"""
-
+import common
import unittest
from django.core import management
-import settings
+from autotest_lib.frontend import settings
class FrontendTest(unittest.TestCase):
def test_all(self):
management.setup_environ(settings)
- from frontend.afe import test
+ from autotest_lib.frontend.afe import test
errors = test.run_tests()
self.assert_(errors == 0, '%s failures in frontend unit tests' % errors)