]> code.ossystems Code Review - openembedded-core.git/commit
oeqa/selftest/devtool: rewrite modify testcase
authorRoss Burton <ross.burton@intel.com>
Tue, 17 Jan 2017 23:55:46 +0000 (23:55 +0000)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 Jan 2017 22:45:46 +0000 (22:45 +0000)
commitfc97963bc61bf16112859fe1d7e460a13d34baca
treea950fc6a24c5046bf85dd51b9b597a3a231ddba0
parent9d2b1aa1bcfb2f1933a8eeb9470b4174d5da2f0d
oeqa/selftest/devtool: rewrite modify testcase

The modify testcase had to be updated as it started failing when mdadm was
upgraded due to hardcoding version numbers in the test.  I then noticed how
inefficient the test was and mostly rewrote it.

Start by changing the minor modification to change "Linux Software RAID" (the
subtitle of the man page) to "antique pin sardine" (a nonsense phrase that is
unlikely to appear upstream), and neaten the logic.

Start by not removing sstate at the beginning of the test. To ensure builds
happen we can use -f and -C, and iterating the sstate cache is time consuming.

Don't bitbake mdadm repeatedly until it stabilizes, we can start with bitbake -C
unpack to ensure that a full build is done from scratch.

os.path.join has the interesting quirk that join(/foo, /bar) results in /bar, so
use oe.path.join instead of working around that manually.

Don't repeatedly call get_bb_var(), each call results in a call to bitbake.

These changes reduce the runtime of the test from over 600 seconds to around 160
seconds on my machine.

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/lib/oeqa/selftest/devtool.py