I remove the Smart channels because it helps me to retest using simpleremote.
I think I should comment that part but leave it there for future use.
isRPM test is being done in setupModule():
if "package_rpm" != oeRuntimeTest.tc.d.getVar("PACKAGE_CLASSES",
True).split()[0]:
skipModule("Rpm is not the primary package manager")
I will do the rest of the modifications, thank you for the suggestions
Regards,
Lucian
-----Original Message-----
From: Burton, Ross [mailto:[email protected]]
Sent: Wednesday, September 03, 2014 6:14 PM
To: Musat, GeorgeX L
Cc: OE-core
Subject: Re: [OE-core] [PATCH 2/2] oeqa/runtime: Automatic test for ptest
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