Commit Graph

60 Commits

Author SHA1 Message Date
Mikko Rapeli
796b9089c5 oeqa/sdk: use bash to execute SDK test commands
The commands only work with with bash. If /bin/sh is
dash like in Debian, the command execution fails with
errors like:

Standard Output: /bin/sh: 5: export: --sysroot: bad variable name

and all SDK tests fail.

(From OE-Core rev: ba5bee46131bbb31efba766c4d29e5bf71c664a7)

Signed-off-by: Mikko Rapeli <mikko.rapeli@bmw.de>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:56 +01:00
Richard Purdie
ffae400179 meta/lib+scripts: Convert to SPDX license headers
This adds SPDX license headers in place of the wide assortment of things
currently in our script headers. We default to GPL-2.0-only except for the
oeqa code where it was clearly submitted and marked as MIT on the most part
or some scripts which had the "or later" GPL versioning.

The patch also drops other obsolete bits of file headers where they were
encoountered such as editor modelines, obsolete maintainer information or
the phrase "All rights reserved" which is now obsolete and not required in
copyright headers (in this case its actually confusing for licensing as all
rights were not reserved).

More work is needed for OE-Core but this takes care of the bulk of the scripts
and meta/lib directories.

The top level LICENSE files are tweaked to match the new structure and the
SPDX naming.

(From OE-Core rev: f8c9c511b5f1b7dbd45b77f345cb6c048ae6763e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-05-09 16:31:55 +01:00
Ross Burton
4dd5103216 oeqa/sdk: add test to exercise Meson
(From OE-Core rev: 29359493e391d68a5a6b4fa4d09ffdc1fe6db620)

(From OE-Core rev: 237ed166f48b0e32684a5307d3b47b9485238ed9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08 11:16:45 +00:00
Ross Burton
f74574858f oeqa/sdk/assimp: cleanup
Unify style with the other tests.

(From OE-Core rev: 545cde27b13f9d68211fd3a671182203ac47756d)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08 11:16:45 +00:00
Ross Burton
730ffea3a1 oeqa/sdk/cases: clean up DL_DIR handling
(From OE-Core rev: f56c62b9feacd6e08fee3507185261ab3f0180e0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2019-01-08 11:16:45 +00:00
Ross Burton
8e8898bc2d oeqa/sdk: rewrite cpio test
Don't use the helper class as it gets in the way more than it helps, exercise
the out-of-tree paths, and verify the installed files match the expected
architecture.

(From OE-Core rev: 6d666b0413336de2e556b2722c5be97ae5cd40ad)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
1d49a3a23a oeqa/sdk: rewrite lzip test
Don't use the helper class as it gets in the way more than it helps, exercise
the out-of-tree paths, and verify the installed files match the expected
architecture.

(From OE-Core rev: 920ae8c6537c2469f21ab9439587fd094ecc40f6)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
01bee70c31 oeqa/sdk: clean up galculator test
Drop redundant imports and variables, and use os.makedirs() instead of
bb.utils.mkdirhier().

(From OE-Core rev: 2de9b1e611e5047afb540f98756994925c22e446)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
5e15b242a4 oeqa/sdk: show output if run() fails
Use oeqa.utils.subprocesstweak to monkey-patch the subprocess exception so that
any output is shown, and remove any explicit try/catch handling that would have
hidden this.

(From OE-Core rev: 55964b33b561397287779ee474170790dfd03e85)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
778f3ce1e6 oeqa/sdk: clarify ELF assertion message
For example, instead of saying "3 != 62", say "Binary was x86-64 but expected
i586".

(From OE-Core rev: 9ab94cea589fca4394ec1fd8dc06b23fd8e990b9)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-13 16:32:21 +00:00
Ross Burton
a9093bc81b oeqa/sdk/galculator: rewrite to use new helpers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
aa8a9a05c2 oeqa/sdk/python: fix version typo
(From OE-Core rev: 581b43d7b3566624e6b17d516755d8e7a5142ebf)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
7c34751a0d oeqa/sdk/assimp: use helpers
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
2a2a38aa2c oeqa/sdk/case: add fundamental helper methods
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-08 17:17:01 +00:00
Ross Burton
fefe59b2e6 oeqa/sdk/python: add Python 2 and fix detection
Add a Python 2 form to exercise that if present, and fix the setUp() so it
actually looks for a package that exists (nativesdk-python3 is a virtual
package, the interpretter is in nativesdk-python3-core).

(From OE-Core rev: d286c2ad3eec24978557e16a8fa599476791109f)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-12-03 12:20:01 +00:00
Joshua Watt
1554c7c3a6 classes/testsdk: Split implementation into classes
Splits the SDK test implementation into configurable Python classes. The
classes used for the normal and extensible SDKs are
${TESTSDK_CLASS_NAME} and ${TESTSDKEXT_CLASS_NAME} respectively.

This allows SDK machines to override the classes used to implement the
tests. For the traditional SDK, a common "run()" function is provided by
the class (oeqa.sdk.testsdk.TestSDK), with several hook member functions
that can be overridden in child classes, making it easier to have
consistent behavior. The extensible SDK class
(oeqa.sdkext.testsdk.TestSDKEXT) also has a common "run()" function, but
no hooks have yet been added as there is not currently a known use case
for create derived classes.

These changes should be purely organizational; no functional changes
have been made to either the standard SDK or extensible SDK tests.

[YOCTO #13020]

(From OE-Core rev: a06d53928b22d5f88276023c4d57b206db2f27f9)

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-21 11:54:14 +00:00
Hongxu Jia
d40767ac83 testsdk: fix skipped testcase output "UNKNOWN" status while multiprocess execution
Usually skipped testcase output "SKIPPED"
[snip serial execution]
|RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: SKIPPED (0.01s)
|RESULTS - python.PythonTest.test_python3 - Testcase -1: SKIPPED (0.01s)
[snip serial execution]

But if enable multiprocess execution, skipped testcase output "UNKNOWN" status
[snip enable multiprocess execution]
|RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: UNKNOWN
|RESULTS - python.PythonTest.test_python3 - Testcase -1: UNKNOWN
[snip enable multiprocess execution]

Here is my investigation:

There is a class pairs TestProtocolClient and TestProtocolServer
provided by python3-subunit. The TestProtocolClient generates a
subunit stream of TestResult from a test run, and TestProtocolServer
parses the stream of subunit TestResult.

The class ProtocolTestCase is a unittest.TestCase adapter and it
uses TestProtocolServer to parse the stream of subunit TestResult.

In Yocto testsdk, it forks multiple processes to execute testcases
and use TestProtocolClient to generate TestResult stream; and then
it creates multiple threads to use ProtocolTestCase to parse stream
of subunit TestResult through pipe; finally it passes multiple
ProtocolTestCase as TestCase instance to main process and output
status result.

The problem point is TestProtocolServer parses `skip:' directive
after reading a `test:' directive. Without `test:' directive,
`skip:' directive will be ignored. All above requires SkipTest should
be raised inside a test method rather than setUpClass method.

Throwing SkipTest inside setUp works correctly

(From OE-Core rev: 4828a88556d59e4d06933164c2ebeb9361b7450e)

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-11-14 11:14:39 +00:00
Chen Qi
227cc78b3f oeqa/sdk: fixes related to hasPackage semantics
The current _hasPackage does a regex match when checking for the
existence of packages. This will sometimes result in unexpected
result. For example, the condition hasTargetPackage('gcc') is likely
to be always true as it matches libgcc1.

For most of the time, we should do exact match instead of regex match.
So change _hasPackage function to do that. For the current sdk test
cases, the only place that needs regex match is '^gcc-'. This is because
there's no easy way to get multilib tune arch (e.g. i686) from testdata.json
file.

Besides, packagegroup-cross-canadian-xxx and gcc-xxx should be check in
host manifest instead of the target one. So fix to use hasHostPackage.

Also, as we are doing exact match, there's no need to use r'gtk\+3',
just 'gtk+3' is enough.

(From OE-Core rev: 595e9922cdbacf84cf35cc83f0d03cace042e302)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04 11:03:55 +01:00
Chen Qi
20cba32f2d sdk/buldgalculator.py: check against multilib for gtk+3
When determining whether to skip the test case, the check should be
done with consideration of multilib. Otherwise, we will meet the
following error when testing against lib32 environment.

  No package 'gtk+-3.0' found

(From OE-Core rev: ce82ee46f4a7beb5663238b276e779e5c9657777)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04 11:03:55 +01:00
Chen Qi
a7e6de1716 sdk/context.py: add ability to check for multilib version of target package
Add a named argument 'multilib' for the hasTargetPackage function. Its default
value is False. When setting to True, it will try to get the correct multilib
prefix from the sdk_env, the environment setup script.

We need this because we don't want unexpected run of some sdk test cases.
The following steps will generate error.

1. Enable multilib for qemux86-64
   require conf/multilib.conf
   MULTILIBS ?= "multilib:lib32"
   DEFAULTTUNE_virtclass-multilib-lib32 ?= "core2-32"
2. bitbake core-image-sato -c populate_sdk
3. bitbake core-image-sato -c testsdk

The error message is like below.

  No package 'gtk+-3.0' found
  RESULTS - buildgalculator.GalculatorTest.test_galculator - Testcase -1: FAILED

As we don't have lib32-gtk+3 installed, the test case should be skipped when
testing against the lib32 environment setup script.

(From OE-Core rev: 163764ad4760a5fabf65640df5f968be98ad13d2)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-09-04 11:03:55 +01:00
Chen Qi
920e9a4ac4 assimp.py: fix AttributeError in tearDownClass
When running this test case, we will see the following error.

  AttributeError: type object 'BuildAssimp' has no attribute 'project'

assimp.py test case does not make use of SDKBuildProject, so remove
the import statement and the tearDownClass.

(From OE-Core rev: ca0a40a852abed981d54503ef2d86708471c821e)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-21 14:49:42 +01:00
Ross Burton
37c4f89d71 oeqa/sdk/buildgalculator: check for nativesdk-gettext-dev
We don't need target gettext to build, but nativesdk-gettext-dev (for nls.m4).

(From OE-Core rev: 0474326d79b7675dabe63f691733e8c6b24b2fb0)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-14 11:36:31 +01:00
Ross Burton
b152f84a73 oeqa/sdk: add test that CMake works
Add a new SDK testcase that builds assimp, a project that uses cmake.

Using TARGET_ARCH and TARGET_OS which is now exported into the environment,
check that the generated binaries match the ELF headers we expect.

(From OE-Core rev: b4acfa11b35b47c86d2d83d7b0693284a8dc7495)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-08-07 12:13:03 +01:00
Ross Burton
5b6fbaf727 oeqa/sdk/sdkbuildproject: use os.path.join
Instead of mushing two paths together and hoping that the slashes line up
correctly, use os.path.join.

(From OE-Core rev: ed0413babaf10ccf729472f603bbe32d84ba1931)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26 13:16:40 +01:00
Ross Burton
19905c78e7 oeqa: rationalise Perl tests
As with the Python test, this can be both better and faster.  No need to copy a
file, just run a one-liner.

(From OE-Core rev: c6eef46747fe58bb2310be4f06d2fa9b67901d72)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-26 13:16:40 +01:00
Ross Burton
ebad780985 oeqa/sdk/python: clean up Python test
For the same reasons as the runtime Python test, clean up the SDK test.

Also port from Python 2 to Python 3, as that's what is supported now.

(From OE-Core rev: bead742a3ffc0a53162fb0c36610d74a1422e7b3)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18 10:18:42 +01:00
Richard Purdie
da596a2ad6 testsdk: Enable multiprocess execution
This uses the new concurrenttest code to enable parallel test execution
if specified.

(From OE-Core rev: 07d19fb3adab7a8d83ba83d9a16395f70d7b7a47)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18 10:18:41 +01:00
Richard Purdie
4e4958cba2 oeqa/core/threaded: Remove in favour of using concurrenttests
We have several options for parallel processing in oeqa, parallel
execution of modules, threading and mulitple processes for the runners.

After much experimentation is appears the most scalable and least
invasive approach is multiple processes using concurrenttestsuite
from testtools. This means we can drop the current threading code
which is only used by the sdk test execution.

oeqa/decorator/depends: Remove threading code

Revert "oeqa/sdk: Enable usage of OEQA thread mode"
This reverts commit adc434c063.

Revert "oeqa/core/tests: Add tests of OEQA Threaded mode"
This reverts commit a4eef558c9.

Revert "oeqa/core/decorator/oetimeout: Add support for OEQA threaded mode"
This reverts commit d3d4ba902d.

(From OE-Core rev: a98ab5e560e73b6988512fbae5cefe9e42ceed53)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-18 10:18:41 +01:00
Richard Purdie
b3c379d93e oeqa/sdkbuildproject: Capture output to quieten selftest logs
Only show the output in the failure case.

(From OE-Core rev: 324785a99e3f2449cb443233e7ce224598c02a3b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-07-16 13:21:35 +01:00
Chen Qi
f0520721fd oeqa/sdk/cases/buildgalculator.py: skip if gettext not available
We need to skip this testcase when gettext is not available. Otherwise,
we will have the following error at configure.

  error: possibly undefined macro: AM_NLS

(From OE-Core rev: ccc10e95c9fcdabcf4ae5e6f9cc34c1d632b4654)

Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2018-05-29 21:07:13 +01:00
Jose Perez Carranza
aac343acc0 oeqa/sdk: Replace buildiptables for buildlzip tests
Buildiptables test cases are conflicting with images built with “musl”
as standard C library, in order to avoid those issues lzip package was
selected to be used on the tests as this does not have any "musl"
dependency.

[YOCTO #11713]

(From OE-Core rev: b798284f62b3cb171373716b1ee84403439314aa)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-08 13:34:46 +01:00
Aníbal Limón
8573de63aa oeqa/sdk/cases: Fix skip of buildgcalculator test
The tc.hasTargetPackage uses a re.search to see if gtk+3 is on
the manifest but + in regex means 1 or more causing the test
to be skipped.

(From OE-Core rev: 271cd99d00bde0b9f2aa27141acbe06812f34638)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12 23:01:23 +01:00
Francisco Pedraza
05697aa941 oeqa/sdk/cases: Added validation for SDK compatibility tests with eSDK
The manifests for eSDK are generated using shared states so there is a
need to validate to different "packages names" into the test cases.

For example for perl:

SDK provides nativesdk-perl
eSDK provides perl-native

[YOCTO #9090]

(From OE-Core rev: 8db06dd1290dd53d626050879c9c306f95d76ac2)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-12 23:01:23 +01:00
Aníbal Limón
adc434c063 oeqa/sdk: Enable usage of OEQA thread mode
oeqa/sdk/context.py - Use OETestContextThreaded.
classes/testsdk.bbclass - Enable bb event thread mode to avoid
corrupt the PIPE when multiple threads writes.

[YOCTO #11450]

(From OE-Core rev: 598c6579932c2ca1dbdb022c8bec8af2e6c21e6b)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02 13:36:14 +01:00
Aníbal Limón
d05acd6bab oeqa/sdk/context.py: Add return to OESDKTestContext.run() method
The run() methods of a OETestContext's are expected to return the
results.

(From OE-Core rev: c45546b771c3158e66b2df504576d6dc1758ea75)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02 13:36:13 +01:00
Aníbal Limón
13175d8d48 oeqa/sdk/context.py: Import argparse_oe at OESDKTestContext.run method
This import was at level of OESDKTestContext.register_commands
but OESDKTestContext.run method need it to raise exceptions.

(From OE-Core rev: 35efb419de1dbebd269d87895645934707130746)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-02 13:36:13 +01:00
Joshua Lock
1b4bd1b659 oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIR
All build project test cases will try to copy the requested source
artefacts from DL_DIR before fetching. This testcase is referencing bzipped
tarball whereas the recipe fetches a gzipped tarball.

Switch to fetching the gzipped tarball in the test case so that we're able
to use a cached tarball from DL_DIR

(From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
brian avery
c0970e0af9 meta/lib/oeqa: change sdk test from cvs to cpio
We currently fetch,configure,build, and install cvs as our test for the
sdk.  cvs unfortunately, requires a default editor in order to run.  The
change in 94790a8254 that checks to see if you have something like vi
installed is fragile since you may have a different default editor. This
patch switches from using cvs as a test to using cpio. cpio also uses
autotools so the functionality tested is equivalent.

(From OE-Core rev: 233d36b0382a8b2e430c3377e50885d1a0c3ba21)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-22 11:35:21 +00:00
Richard Purdie
23137a9897 oeqs/sdk*/case: Use universal_newlines for subprocess calls
This removes the need for some of the ugly decode calls with hardcoded
locales.

(From OE-Core rev: a14dddc77e553d2fa90d12576503dd3fc2e52bbc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-01 23:27:11 +00:00
Richard Purdie
08858ff213 oeqa/buildproject: Run gnu-configize by default
The runtime oeqa tests were failing in the on-target case, only for
aarch64. This was because an old config.sub was being used.

Similar to the SDK testing, call gnu-configize in the on-target
case too to resolve the failing tests.

(From OE-Core rev: 7918fe08d8e48f46cf2402afa66d35063eb72545)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-02-05 09:22:17 +00:00
Francisco Pedraza
aca3afcb59 oeqa/sdk: Updates sanity tests for minimal eSDK
Updates sanity tests to cope with minimal eSDK installer
1. Skips the validation of sanity if packagegroup-cross-canadian is in
host package.
2. Skips if SDK does not include toolchain at cases/devtool.py

This should fix [YOCTO #10794]

(From OE-Core rev: 59a99cd8661af594ee0c33e086578d29d50a6268)

Signed-off-by: Francisco Pedraza <francisco.j.pedraza.gonzalez@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-31 14:43:01 +00:00
Richard Purdie
6ab4c5033a classes/oeqa: Replace subprocess.check_call() with check_output()
If you use subprocess.check_output() the traceback will contain the output
when the command fails which is very useful for debugging. There is no
good reason not to use this everywhere.

(From OE-Core rev: ad750dd1cc9d789abe723daddd098ce41d8547f5)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 23:30:57 +00:00
Aníbal Limón
260741847a oeqa/sdkext/cases: Migrate test case to new OEQA framework
Summary,

- Changes base case class to OESDKExtTest.
- Changes decorator classes to new ones.
- Chnages variable names sdktestdir -> sdk_dir.
- Added missing license to MIT.

(From OE-Core rev: 49568055df0a64e4228f27130b13ccafbba2a460)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
3fac2417dd classes/testsdk: Remove the need of TEST_LOG_DIR variable
The TEST_LOG_DIR was used for store sdk_target_log this log
contains the output of the run of build commands now that information
could be found also on log.do_testsdk under WORKDIR.

The log will continue to store into SDK_DIR instead of TEST_LOG_DIR.

(From OE-Core rev: 1c9ba4b698bab916d42b58255692a7bf3d773bbc)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
c9fe59d7c5 oeqa/sdk/cases: Migrate tests to the new OEQA framework
Summary of the changes:

- Remove auto extend_path using pkgutil at __init__, is not needed.
- Change base class to OESDKTestCase.
- Add td_vars attr to set dependencies of certain variables in test
data.
- Change skips from module level to class level because Test context
  (tc)
now isn't at module level.
- Variable names changes to be consistent (i.e. sdktestdir ->
  sdk_dir).

[YOCTO #10599]

- Don't use bb.utils functions use instead remove_safe and shutil
  for copy files.
- SDKBuildProject pass test data variables instead of call getVar
  inside.

[YOCTO #10231]

(From OE-Core rev: 91cd1ed19a3f34c29cd77eb136036975fe465444)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
51be188063 oeqa/utils: {Target,SDK,}BuildProject remove dependency of bb
Don't use bitbake references inside utils modules, in order todo
that changes getVar calls for arguments in the __init__ method like
dl_dir for all the classes and testlogdir, builddatetime in
SDKBUildProject.

Also don't export proxies inside _download_archive method, a good
practice is to setup the proxies at init of the process instead of
do it in this helper module.

[YOCTO #10231]
[YOCTO #10599]

(From OE-Core rev: 581c34d1efe9839f50ef322761269b4e4d8a56a6)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
72e9ae377d oeqa/utils: Move targetbuild to buildproject module
The new buildproject module will contain only BuildProject class
a helper class for build source code.

The remaining classes TargetBuildProject and SDKBuildProject was
move to runtime and sdk respectively.

[YOCTO #10599]

(From OE-Core rev: 525fd2a5cda00890e921b63f7f608a10bc024d73)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
8a37763ae9 oeqa/sdk: Add case and context modules for the SDK component
Adds case and context modules for SDK based on oetest.py old code.

Enables SDK Test component usage with oe-test, the SDK Test component
adds command line options for specify sdk installed dir, sdk environment
and target/hosts maniftest.

[YOCTO #10599]

(From OE-Core rev: 19e875dd81c42841666e6db5f6b665b4e1cddfe6)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
9a23e0f703 oeqa/{runtime,sdk}/files: Move testsdkmakefile from runtime to sdk module
It doesn't make sense to have files related to sdk module into runtime
module.

[YOCTO #10599]

(From OE-Core rev: 9a3be58b17afbe4ef00030b0e6ad8b20b03adc49)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00
Aníbal Limón
2726c26efe oeqa/sdk: Move test cases inside cases directory
For match with the new structure of the OEQA framework.

In the new framework Test component base directory in this case
sdk module will contain case and context implementations.

[YOCTO #10599]

(From OE-Core rev: 57af8ee4021c302bd351adf03e6d85274ad7efd5)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-01-23 12:05:19 +00:00