mirror of
https://git.yoctoproject.org/poky
synced 2026-04-25 15:32:13 +02:00
bitbake: toaster: tts: fix startup and cleanup for managed mode
This patch fixes the toaster startup and database cleanup for managed mode. It is needed because the toaster script thinks it has been called with "source" instead of being executed as independent script if not called through bash. (Bitbake rev: f08ce41f1137f268049ef8345462aa58b233e50b) Signed-off-by: Alexandru DAMIAN <alexandru.damian@intel.com> Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
ba667a0908
commit
f9eb958a8a
@@ -122,6 +122,7 @@ def execute_tests(dir_under_test, testname):
|
||||
# we disable the broad-except because we want to actually catch all possible exceptions
|
||||
try:
|
||||
config.logger.debug("Discovered test clases: %s", pprint.pformat(tests))
|
||||
unittest.installHandler()
|
||||
suite = unittest.TestSuite()
|
||||
loader = unittest.TestLoader()
|
||||
result = unittest.TestResult()
|
||||
|
||||
@@ -76,7 +76,7 @@ class TestHTML5Compliance(unittest.TestCase):
|
||||
setup.expect(r"Enter your option: ")
|
||||
setup.sendline('0')
|
||||
|
||||
self.child = pexpect.spawn("%s/bitbake/bin/toaster webport=%d nobrowser" % (config.TESTDIR, config.TOASTER_PORT))
|
||||
self.child = pexpect.spawn("bash", ["%s/bitbake/bin/toaster" % config.TESTDIR, "webport=%d" % config.TOASTER_PORT, "nobrowser"], cwd=self.crtdir)
|
||||
self.child.logfile = sys.stdout
|
||||
self.child.expect("Toaster is now running. You can stop it with Ctrl-C")
|
||||
|
||||
@@ -101,5 +101,6 @@ class TestHTML5Compliance(unittest.TestCase):
|
||||
self.child.kill(signal.SIGINT)
|
||||
time.sleep(1)
|
||||
os.chdir(self.origdir)
|
||||
# if os.path.exists(os.path.join(self.crtdir, "toaster.sqlite")):
|
||||
# os.remove(os.path.join(self.crtdir, "toaster.sqlite"))
|
||||
toaster_sqlite_path = os.path.join(self.crtdir, "toaster.sqlite")
|
||||
if os.path.exists(toaster_sqlite_path):
|
||||
os.remove(toaster_sqlite_path)
|
||||
|
||||
Reference in New Issue
Block a user