<br><br>On Thu, Oct 26, 2017 at 1:44 PM, Anibal Limón <limon.anibal@gmail.com> wrote:<br>
<blockquote type="cite"><div dir="ltr"><span style="font-size:12.8px">Hi Leo,</span><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">The patch looks good at first glance, i have some comments,</div><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">- We need a way to handle the results output because with this you will have N results files, may be extend the shell script</div><div style="font-size:12.8px">to consolidate the results file.</div></div></blockquote><div><br></div><div>As a proof of concept I use 'parallel' which fits nicely to this exercise (one job corresponds to one oe-selftest -r) and with this tool, logging can be stored in separate files, each corresponding to a job's stdout/stderr. But the important here is that the tool prints each job's output into the standard output either first-finished-first-print-to-stdout or keeping the same input order, so at the end, you get the same output as running oe-selftest as a single job.</div><br><blockquote type="cite"><div dir="ltr"><div style="font-size:12.8px">- With this if one selftest depends on other there is no way to now it and the execution will fail, i searched into the selftest cases</div><div style="font-size:12.8px">(OETestDepends) and now we don't have dependent cases.</div></div></blockquote><div><br></div><div> Think about this approach as running oe-selftest in different build folders with its own metadata and build folder. Under this scenario, the test execution, with the corresponding dependencies will be fulfilled and executed correctly, right? the trade off is some extra work done on each oe-selftest due to dependencies but this wont hurt much in my opinion.</div><div><br></div><div>Leo</div><br><blockquote type="cite"><div dir="ltr"><div style="font-size:12.8px"><br></div><div style="font-size:12.8px">Cheers,</div><div style="font-size:12.8px">Anibal</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Oct 26, 2017 at 12:33 PM, <span dir="ltr"><<a href="mailto:leonardo.sandoval.gonzalez@linux.intel.com" target="_blank">leonardo.sandoval.gonzalez@linux.intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">From: Leonardo Sandoval <<a href="mailto:leonardo.sandoval.gonzalez@linux.intel.com">leonardo.sandoval.gonzalez@<wbr>linux.intel.com</a>><br>
<br>
The below is a profiling experiment, running oe-selftest -r (the proposed<br>
implementation, see patch description for more info):<br>
<br>
Procedure:<br>
<br>
With patch 1/1, multiple oe-selftest jobs can be launched in<br>
parallel. One tool that launch jobs in parallel is GNU Parallel [1], allowing<br>
to construct a simpole pipeline to execute all tests with a pool of four<br>
jobs:<br>
<br>
$ echo $ALLTESTS | time parallel --jobs4 oe-selftest -r<br>
<br>
where ALLTESTS is a variable containing all tests cases (modules) found by the<br>
the runner (oe-selftest-internal) (i.e. ALLTESTS="$(oe-selftest -m |<br>
awk '{ print $NF }' | grep -v ':')"). This is the result obtained from the<br>
above command:<br>
<br>
739.57user 120.48system 45:34.61elapsed 31%CPU (0avgtext+0avgdata 124600maxresident)k<br>
390908inputs+15984336outputs (291major+20227951minor)<wbr>pagefaults 0swaps<br>
<br>
<br>
The import point on the above numbers is that isolation the oe-selftest execution per<br>
module and using a parallelization tool, complete oe-selftest runs takes less than an hour,<br>
beating current single-job times observed at main auto-buildes.<br>
<br>
Profiling results were obtained on a machine with 88 Intel Xeon with 88 cores<br>
<br>
[1] <a href="https://www.gnu.org/software/parallel/" rel="noreferrer" target="_blank">https://www.gnu.org/software/<wbr>parallel/</a><br>
<br>
The following changes since commit 65d23bd7986615fdfb0f1717b61553<wbr>4a2a14ab80:<br>
<br>
README.qemu: qemuppc64 is not supported (2017-10-16 23:54:31 +0100)<br>
<br>
are available in the git repository at:<br>
<br>
git://<a href="http://git.yoctoproject.org/poky-contrib" rel="noreferrer" target="_blank">git.yoctoproject.org/<wbr>poky-contrib</a> lsandov1/oe-selftest-own-<wbr>directory<br>
<a href="http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=lsandov1/oe-selftest-own-directory" rel="noreferrer" target="_blank">http://git.yoctoproject.org/<wbr>cgit.cgi/poky-contrib/log/?h=<wbr>lsandov1/oe-selftest-own-<wbr>directory</a><br>
<br>
Leonardo Sandoval (1):<br>
scripts/oe-selftest: oe-selftest-internal wrapper scripts that<br>
isolates execution<br>
<br>
scripts/oe-selftest | 102 +++++++++++++++++++++++-------<wbr>-------------<br>
scripts/oe-selftest-internal | 75 ++++++++++++++++++++++++++++++<wbr>+<br>
2 files changed, 129 insertions(+), 48 deletions(-)<br>
create mode 100755 scripts/oe-selftest-internal<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
2.12.3<br>
<br>
</font></span></blockquote></div><br></div>
</blockquote>