From: Richard Purdie <richard.purdie@linuxfoundation.org>
To: "Burton, Ross" <ross.burton@intel.com>
Cc: OE-core <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH 2/2] oeqa/runtime: Automatic test for ptest
Date: Wed, 03 Sep 2014 23:10:48 +0100 [thread overview]
Message-ID: <1409782248.12482.16.camel@ted> (raw)
In-Reply-To: <CAJTo0LY333THMi1uvDjRpUd1MuP671CGikrSBCg_OoC8r_9BqQ@mail.gmail.com>
On Wed, 2014-09-03 at 16:14 +0100, Burton, Ross wrote:
> On 2 September 2014 14:10, Lucian Musat <georgex.l.musat@intel.com> 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?
Also, this is smart specific so we probably need an "isRPM?" type check
somewhere in this test (or use librbary functions and have support for
other package backends but that is something for another patch series
sometime).
Cheers,
Richard
> > + 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
next prev parent reply other threads:[~2014-09-03 22:10 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-02 13:10 [PATCH 1/2] oeqa/utils/logparser.py: results based log parser utility Lucian Musat
2014-09-02 13:10 ` [PATCH 2/2] oeqa/runtime: Automatic test for ptest Lucian Musat
2014-09-03 15:14 ` Burton, Ross
2014-09-03 22:10 ` Richard Purdie [this message]
2014-09-04 9:54 ` Musat, GeorgeX L
2014-09-03 14:58 ` [PATCH 1/2] oeqa/utils/logparser.py: results based log parser utility Burton, Ross
2014-09-03 15:14 ` Stoicescu, CorneliuX
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1409782248.12482.16.camel@ted \
--to=richard.purdie@linuxfoundation.org \
--cc=openembedded-core@lists.openembedded.org \
--cc=ross.burton@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox