diff mbox series

[1/2] meta/classes/testexport: Use manfiest filenames for package and testdata

Message ID 20181017230044.24098-1-anibal.limon@linaro.org
State New
Headers show
Series [1/2] meta/classes/testexport: Use manfiest filenames for package and testdata | expand

Commit Message

Anibal Limon Oct. 17, 2018, 11 p.m. UTC
Is clear to know for what image and machine the testexport package
manifest and testdata was build.

Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
---
 meta/classes/testexport.bbclass  | 4 ++--
 meta/lib/oeqa/runtime/context.py | 9 +++++++--
 2 files changed, 9 insertions(+), 4 deletions(-)

Comments

Richard Purdie Oct. 18, 2018, 3:43 p.m. UTC | #1
On Wed, 2018-10-17 at 18:00 -0500, Aníbal Limón wrote:
> Is clear to know for what image and machine the testexport package
> manifest and testdata was build.
> 
> Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>
> ---
>  meta/classes/testexport.bbclass  | 4 ++--
>  meta/lib/oeqa/runtime/context.py | 9 +++++++--
>  2 files changed, 9 insertions(+), 4 deletions(-)

I think this breaks oe-selftest:

https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/132/steps/7/logs/step2d

Cheers,

Richard
Anibal Limon Oct. 19, 2018, 5:25 p.m. UTC | #2
Hi Richard,

I need to update the selftest testcase, i will send v2.

I send other patch, can you take a look?

http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156762.html

Regards,
Anibal

On Thu, 18 Oct 2018 at 10:43, <richard.purdie@linuxfoundation.org> wrote:

> On Wed, 2018-10-17 at 18:00 -0500, Aníbal Limón wrote:

> > Is clear to know for what image and machine the testexport package

> > manifest and testdata was build.

> >

> > Signed-off-by: Aníbal Limón <anibal.limon@linaro.org>

> > ---

> >  meta/classes/testexport.bbclass  | 4 ++--

> >  meta/lib/oeqa/runtime/context.py | 9 +++++++--

> >  2 files changed, 9 insertions(+), 4 deletions(-)

>

> I think this breaks oe-selftest:

>

>

> https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/132/steps/7/logs/step2d

>

> Cheers,

>

> Richard

>

>
<div dir="ltr"><div dir="ltr">Hi Richard,<div><br></div><div>I need to update the selftest testcase, i will send v2.</div><div><br></div><div>I send other patch, can you take a look?</div><div><br></div><div><a href="http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156762.html">http://lists.openembedded.org/pipermail/openembedded-core/2018-October/156762.html</a><br></div><div><br></div><div>Regards,</div><div>Anibal</div></div></div><br><div class="gmail_quote"><div dir="ltr">On Thu, 18 Oct 2018 at 10:43, &lt;<a href="mailto:richard.purdie@linuxfoundation.org">richard.purdie@linuxfoundation.org</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Wed, 2018-10-17 at 18:00 -0500, Aníbal Limón wrote:<br>
&gt; Is clear to know for what image and machine the testexport package<br>
&gt; manifest and testdata was build.<br>
&gt; <br>
&gt; Signed-off-by: Aníbal Limón &lt;<a href="mailto:anibal.limon@linaro.org" target="_blank">anibal.limon@linaro.org</a>&gt;<br>
&gt; ---<br>
&gt;  meta/classes/testexport.bbclass  | 4 ++--<br>
&gt;  meta/lib/oeqa/runtime/context.py | 9 +++++++--<br>
&gt;  2 files changed, 9 insertions(+), 4 deletions(-)<br>
<br>
I think this breaks oe-selftest:<br>
<br>
<a href="https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/132/steps/7/logs/step2d" rel="noreferrer" target="_blank">https://autobuilder.yoctoproject.org/typhoon/#/builders/28/builds/132/steps/7/logs/step2d</a><br>
<br>
Cheers,<br>
<br>
Richard<br>
<br>
</blockquote></div>
-- 
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
diff mbox series

Patch

diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index d070f07afa..8b01504d3a 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -128,8 +128,8 @@  def copy_needed_files(d, tc):
     tdname = "%s.testdata.json" % image_name
     test_data_path = os.path.join(export_path, 'data')
     bb.utils.mkdirhier(test_data_path)
-    shutil.copy2(image_manifest, os.path.join(test_data_path, 'manifest'))
-    shutil.copy2(tdname, os.path.join(test_data_path, 'testdata.json'))
+    shutil.copy2(image_manifest, os.path.join(test_data_path, os.path.basename(image_manifest)))
+    shutil.copy2(tdname, os.path.join(test_data_path, os.path.basename(tdname)))
 
     # Create tar file for common parts of testexport
     create_tarball(d, "testexport.tar.gz", d.getVar("TEST_EXPORT_DIR"))
diff --git a/meta/lib/oeqa/runtime/context.py b/meta/lib/oeqa/runtime/context.py
index a7f3823996..31dba75784 100644
--- a/meta/lib/oeqa/runtime/context.py
+++ b/meta/lib/oeqa/runtime/context.py
@@ -2,6 +2,7 @@ 
 # Released under the MIT license (see COPYING.MIT)
 
 import os
+import glob
 
 from oeqa.core.context import OETestContext, OETestContextExecutor
 from oeqa.core.target.ssh import OESSHTarget
@@ -42,11 +43,15 @@  class OERuntimeTestContextExecutor(OETestContextExecutor):
     default_cases = os.path.join(os.path.abspath(os.path.dirname(__file__)),
             'cases')
     default_data = None
-    default_test_data = 'data/testdata.json'
+    m = glob.glob('data/*.testdata.json')
+    if m:
+        default_test_data = m[0]
     default_tests = ''
 
     default_target_type = 'simpleremote'
-    default_manifest = 'data/manifest'
+    m = glob.glob('data/*.manifest')
+    if m:
+        default_manifest = m[0]
     default_server_ip = '192.168.7.1'
     default_target_ip = '192.168.7.2'
     default_host_dumper_dir = '/tmp/oe-saved-tests'