@@ -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)))
for subdir, dirs, files in os.walk(export_path):
for dir in dirs:
@@ -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'
@@ -6,6 +6,7 @@ import os
import re
import tempfile
import shutil
+import glob
class TestExport(OESelftestTestCase):
@@ -45,8 +46,17 @@ class TestExport(OESelftestTestCase):
with runqemu('core-image-minimal') as qemu:
# Attempt to run runexported.py to perform ping test
test_path = os.path.join(testexport_dir, "oe-test")
- data_file = os.path.join(testexport_dir, 'data', 'testdata.json')
- manifest = os.path.join(testexport_dir, 'data', 'manifest')
+
+ data_file = ''
+ m = glob.glob("%s/*.testdata.json" % os.path.join(testexport_dir, 'data'))
+ if m:
+ data_file = m[0]
+
+ manifest = ''
+ m = glob.glob("%s/*.manifest" % os.path.join(testexport_dir, 'data'))
+ if m:
+ manifest = m[0]
+
cmd = ("%s runtime --test-data-file %s --packages-manifest %s "
"--target-ip %s --server-ip %s --quiet"
% (test_path, data_file, manifest, qemu.ip, qemu.server_ip))
Is clear to know for what image and machine the testexport package manifest and testdata was build. The oe-seltest case was update. Signed-off-by: Aníbal Limón <anibal.limon@linaro.org> --- meta/classes/testexport.bbclass | 4 ++-- meta/lib/oeqa/runtime/context.py | 9 +++++++-- meta/lib/oeqa/selftest/cases/runtime_test.py | 14 ++++++++++++-- 3 files changed, 21 insertions(+), 6 deletions(-)