summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAníbal Limón <anibal.limon@linux.intel.com>2016-12-05 17:04:42 -0600
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-01-23 12:05:19 +0000
commitba1aec3407e38f4dc4141e4d6300b3d538dc9dd3 (patch)
tree43114a5dafed2bc67ca451ff31432f5b98065780
parente5f05409d073f089f4e1a78197e5c6cae6e04809 (diff)
downloadpoky-ba1aec3407e38f4dc4141e4d6300b3d538dc9dd3.tar.gz
oeqa: Fix files handling on runtime tests.
Common files was move to oeqa/files from oeqa/runtime/files because the same files are used across Runtime,SDK,eSDK tests. (From OE-Core rev: f099302efe8f222c3e4ae3604429f5ede4fd8c67) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/classes/testexport.bbclass5
-rw-r--r--meta/lib/oeqa/oetest.py1
-rw-r--r--meta/lib/oeqa/runtime/gcc.py4
-rw-r--r--meta/lib/oeqa/runtime/perl.py2
-rw-r--r--meta/lib/oeqa/runtime/python.py2
5 files changed, 10 insertions, 4 deletions
diff --git a/meta/classes/testexport.bbclass b/meta/classes/testexport.bbclass
index e287f5a913..00cf24e735 100644
--- a/meta/classes/testexport.bbclass
+++ b/meta/classes/testexport.bbclass
@@ -87,6 +87,7 @@ def exportTests(d,tc):
87 # - the contents of oeqa/utils and oeqa/runtime/files 87 # - the contents of oeqa/utils and oeqa/runtime/files
88 # - oeqa/oetest.py and oeqa/runexport.py (this will get copied to exportpath not exportpath/oeqa) 88 # - oeqa/oetest.py and oeqa/runexport.py (this will get copied to exportpath not exportpath/oeqa)
89 # - __init__.py files 89 # - __init__.py files
90 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/files"))
90 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files")) 91 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/runtime/files"))
91 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils")) 92 bb.utils.mkdirhier(os.path.join(exportpath, "oeqa/utils"))
92 # copy test modules, this should cover tests in other layers too 93 # copy test modules, this should cover tests in other layers too
@@ -124,6 +125,10 @@ def exportTests(d,tc):
124 for f in files: 125 for f in files:
125 if f.endswith(".py"): 126 if f.endswith(".py"):
126 shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/utils")) 127 shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/utils"))
128 # copy oeqa/files/*
129 for root, dirs, files in os.walk(os.path.join(oeqadir, "files")):
130 for f in files:
131 shutil.copy2(os.path.join(root, f), os.path.join(exportpath, "oeqa/files"))
127 # copy oeqa/runtime/files/* 132 # copy oeqa/runtime/files/*
128 for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")): 133 for root, dirs, files in os.walk(os.path.join(oeqadir, "runtime/files")):
129 for f in files: 134 for f in files:
diff --git a/meta/lib/oeqa/oetest.py b/meta/lib/oeqa/oetest.py
index 503f6fc10f..b886130d0e 100644
--- a/meta/lib/oeqa/oetest.py
+++ b/meta/lib/oeqa/oetest.py
@@ -201,6 +201,7 @@ class TestContext(object):
201 self.testsrequired = self._get_test_suites_required() 201 self.testsrequired = self._get_test_suites_required()
202 202
203 self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files") 203 self.filesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "runtime/files")
204 self.corefilesdir = os.path.join(os.path.dirname(os.path.abspath(__file__)), "files")
204 self.imagefeatures = d.getVar("IMAGE_FEATURES").split() 205 self.imagefeatures = d.getVar("IMAGE_FEATURES").split()
205 self.distrofeatures = d.getVar("DISTRO_FEATURES").split() 206 self.distrofeatures = d.getVar("DISTRO_FEATURES").split()
206 207
diff --git a/meta/lib/oeqa/runtime/gcc.py b/meta/lib/oeqa/runtime/gcc.py
index d90cd1799a..6edb89f6f2 100644
--- a/meta/lib/oeqa/runtime/gcc.py
+++ b/meta/lib/oeqa/runtime/gcc.py
@@ -12,9 +12,9 @@ class GccCompileTest(oeRuntimeTest):
12 12
13 @classmethod 13 @classmethod
14 def setUpClass(self): 14 def setUpClass(self):
15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.c"), "/tmp/test.c") 15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.c"), "/tmp/test.c")
16 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile") 16 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "testmakefile"), "/tmp/testmakefile")
17 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.cpp"), "/tmp/test.cpp") 17 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.cpp"), "/tmp/test.cpp")
18 18
19 @testcase(203) 19 @testcase(203)
20 def test_gcc_compile(self): 20 def test_gcc_compile(self):
diff --git a/meta/lib/oeqa/runtime/perl.py b/meta/lib/oeqa/runtime/perl.py
index e044d0a5fe..6bf98f1ccb 100644
--- a/meta/lib/oeqa/runtime/perl.py
+++ b/meta/lib/oeqa/runtime/perl.py
@@ -12,7 +12,7 @@ class PerlTest(oeRuntimeTest):
12 12
13 @classmethod 13 @classmethod
14 def setUpClass(self): 14 def setUpClass(self):
15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.pl"), "/tmp/test.pl") 15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.pl"), "/tmp/test.pl")
16 16
17 @testcase(1141) 17 @testcase(1141)
18 def test_perl_exists(self): 18 def test_perl_exists(self):
diff --git a/meta/lib/oeqa/runtime/python.py b/meta/lib/oeqa/runtime/python.py
index 29a231c7c3..93e822c71c 100644
--- a/meta/lib/oeqa/runtime/python.py
+++ b/meta/lib/oeqa/runtime/python.py
@@ -12,7 +12,7 @@ class PythonTest(oeRuntimeTest):
12 12
13 @classmethod 13 @classmethod
14 def setUpClass(self): 14 def setUpClass(self):
15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.filesdir, "test.py"), "/tmp/test.py") 15 oeRuntimeTest.tc.target.copy_to(os.path.join(oeRuntimeTest.tc.corefilesdir, "test.py"), "/tmp/test.py")
16 16
17 @testcase(1145) 17 @testcase(1145)
18 def test_python_exists(self): 18 def test_python_exists(self):