summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/toaster/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/toaster/contrib')
-rw-r--r--bitbake/lib/toaster/contrib/tts/tests.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/bitbake/lib/toaster/contrib/tts/tests.py b/bitbake/lib/toaster/contrib/tts/tests.py
index fd6aa3b8bb..8d1964790f 100644
--- a/bitbake/lib/toaster/contrib/tts/tests.py
+++ b/bitbake/lib/toaster/contrib/tts/tests.py
@@ -59,8 +59,10 @@ class TestHTML5Compliance(unittest.TestCase):
59 def setUp(self): 59 def setUp(self):
60 self.origdir = os.getcwd() 60 self.origdir = os.getcwd()
61 self.crtdir = os.path.dirname(config.TESTDIR) 61 self.crtdir = os.path.dirname(config.TESTDIR)
62 self.cleanup_database = False
62 os.chdir(self.crtdir) 63 os.chdir(self.crtdir)
63 if not os.path.exists(os.path.join(self.crtdir, "toaster.sqlite")): 64 if not os.path.exists(os.path.join(self.crtdir, "toaster.sqlite")):
65 self.cleanup_database = False
64 run_shell_cmd("%s/bitbake/lib/toaster/manage.py syncdb --noinput" % config.TESTDIR) 66 run_shell_cmd("%s/bitbake/lib/toaster/manage.py syncdb --noinput" % config.TESTDIR)
65 run_shell_cmd("%s/bitbake/lib/toaster/manage.py migrate orm" % config.TESTDIR) 67 run_shell_cmd("%s/bitbake/lib/toaster/manage.py migrate orm" % config.TESTDIR)
66 run_shell_cmd("%s/bitbake/lib/toaster/manage.py migrate bldcontrol" % config.TESTDIR) 68 run_shell_cmd("%s/bitbake/lib/toaster/manage.py migrate bldcontrol" % config.TESTDIR)
@@ -102,5 +104,5 @@ class TestHTML5Compliance(unittest.TestCase):
102 time.sleep(1) 104 time.sleep(1)
103 os.chdir(self.origdir) 105 os.chdir(self.origdir)
104 toaster_sqlite_path = os.path.join(self.crtdir, "toaster.sqlite") 106 toaster_sqlite_path = os.path.join(self.crtdir, "toaster.sqlite")
105 if os.path.exists(toaster_sqlite_path): 107 if self.cleanup_database and os.path.exists(toaster_sqlite_path):
106 os.remove(toaster_sqlite_path) 108 os.remove(toaster_sqlite_path)