On 2 September 2014 14:10, Lucian Musat <[email protected]> wrote:
> + @classmethod
> + def tearDownClass(self):
> + self.repo_server.stop()
> + #remove created channels to be able to repeat the tests on same image
> + (status, result) = oeRuntimeTest.tc.target.run('smart channel --show
> | grep "\["', 0)
> + for x in result.split("\n"):
> + if x not in self.existingchannels:
> + oeRuntimeTest.tc.target.run('smart channel --remove
> '+x[1:-1]+' -y', 0)
If we're not removing the packages we've installed, why do we bother
removing the smart channels?
> + @skipUnlessPassed('test_ssh')
> + def test_ptestrunner(self):
> + self.add_smart_channel()
> + self.install_packages(self.install_complementary("*-ptest"))
> + self.install_packages(['ptest-runner'])
Can't you check if the ptest IMAGE_FEATURE is enabled and if so, skip this?
> + log_results_to_location = os.path.join('./results')
Joining a single item doesn't do anything.
> + if not os.path.exists(log_results_to_location):
> + os.makedirs(log_results_to_location)
> +
> + # clear the results directory each time
> + for path in os.listdir(log_results_to_location):
> + os.remove(os.path.join(log_results_to_location, path))
I'd do something more like as it's a lot less lines and clear that
you're deleting the old tree and then creating a fresh one:
if os.path.exists(logdir):
shutil.rmtree(logdir)
os.makedirs(logdir)
Ross
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core