summaryrefslogtreecommitdiffstats
path: root/meta/lib
Commit message (Collapse)AuthorAgeFilesLines
* package_manager.py: fix the message used to catch failing postinsts from dnfAlexander Kanavin2018-11-221-1/+1
| | | | | | | | | Latest dnf versions have tweaked it. (From OE-Core rev: 477db7cf4a6a0d06554c9d1539a01fed7c5cb389) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* classes/testsdk: Split implementation into classesJoshua Watt2018-11-212-0/+246
| | | | | | | | | | | | | | | | | | | | | | | | | 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>
* oeqa/utils/httpserver: Rework to avoid hangs and improve loggingRichard Purdie2018-11-164-11/+32
| | | | | | | | | | | | | | | | | | testimage.bbclass installs a SIGTERM handler which conflicts with the use of multiprocessing here. This is paritcularly problematic if the http service is terminated before its started and hence before its had a chance to reset the default signal handler (as the code was written). Instead, temporarily remove testimage's handler whilst forking the http process which means the correct handler is installed and won't deadlock. Also take the opportunity to add in some log messages about the server start and shutdown so that future debugging is easier and its clearer what the code is doing. (From OE-Core rev: 0762b6021b87ceb1f37952f3a6d64a36e99ae6a5) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage/testsdk/selftest: Avoid platform.distro_identifier deprecation ↵Richard Purdie2018-11-161-1/+2
| | | | | | | | | | warnings Use our own lsb function instead as used elsewhere by the codebase. (From OE-Core rev: acac45a6fd604d28ef7c23d67482af3d7e8bcfe3) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: Avoid unclosed file warningsRichard Purdie2018-11-161-0/+3
| | | | | | | | | Avoid an unclosed file per thread warning when running selftests concurrently by closing the result stream. (From OE-Core rev: 33a4a076e8aa72a872807332501e7f5ae1cee0e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/package_manager: Avoid race problems when calling list_pkgs()Richard Purdie2018-11-161-5/+8
| | | | | | | | | | | | | | list_pkgs() for rpm calls RpmPM() which would try and create a copy of the package feed. This can be called for example from buildhistory whilst some other task may be working on an SDK or image construction, causing the package feed to disappear part way through an operation. Avoid the need to copy the package index just to list the installed packages, avoiding the race. (From OE-Core rev: d05fa49e06034913e22c223803c98cb265e2ae58) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/qemurunner.py: Fix python regex warningsRichard Purdie2018-11-161-5/+5
| | | | | | | | | | | | | | | | | | | Fix the warnings: meta/lib/oeqa/utils/qemurunner.py:250: DeprecationWarning: invalid escape sequence \. ips = re.findall("((?:[0-9]{1,3}\.){3}[0-9]{1,3})", cmdline.split("ip=")[1]) meta/lib/oeqa/utils/qemurunner.py:343: DeprecationWarning: invalid escape sequence \- if re.search("root@[a-zA-Z0-9\-]+:~#", output): poky/meta/lib/oeqa/utils/qemurunner.py:350: DeprecationWarning: invalid escape sequence \- if re.search("root@[a-zA-Z0-9\-]+:~#", output): meta/lib/oeqa/utils/qemurunner.py:448: DeprecationWarning: invalid escape sequence \- if re.search("[a-zA-Z0-9]+@[a-zA-Z0-9\-]+:~#", data): by correctly marking the regexs. (From OE-Core rev: 8e6987735002560fca714f77ea8ece9d4b28f7fa) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/context: Replace deprecated imp module usageRichard Purdie2018-11-161-2/+2
| | | | | | | | | | | | | Avoid the warning: meta/lib/oeqa/selftest/context.py:8: DeprecationWarning: the imp module is deprecated in favour of importlib; see the module's documentation for alternative uses import imp In this case importlib is a direct replacement. (From OE-Core rev: db7a60c36a2d3eefc61ae6e1ede01680dc932035) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/commands: Avoid unclosed file warningsRichard Purdie2018-11-141-0/+3
| | | | | | | | | | | Avoid warnings such as: meta/lib/oeqa/utils/commands.py:213: ResourceWarning: unclosed file <_io.BufferedReader name=4> return runCmd(cmd, ignore_status, timeout, output_log=output_log, **options) (From OE-Core rev: 6a68c42de08cffbadb59ebda63fa5e19f6e5acef) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: Correctly markup regexsRichard Purdie2018-11-141-2/+2
| | | | | | | | | Avoid the warning "DeprecationWarning: invalid escape sequence \(" by marking the regexs correctly. (From OE-Core rev: cb49980fa4a158d5529902df731dec61a8c9b3d4) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/loader: Fix deprecation warningRichard Purdie2018-11-141-1/+1
| | | | | | | | | | Clean up the warning: meta/lib/oeqa/core/loader.py:27: DeprecationWarning: inspect.getargspec() is deprecated, use inspect.signature() or inspect.getfullargspec() _failed_test_args = inspect.getargspec(unittest.loader._make_failed_test).args (From OE-Core rev: d2deb66830be2d44532fea3d5db763b57778252a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runner: Sort the test result output by result classRichard Purdie2018-11-141-1/+10
| | | | | | | | | | | We want to see failures/errors listed last since this is the most easily visible part of the log on consoles or autobuilder output and makes human processing easier rather than having to scroll up and scan for a single failure. (From OE-Core rev: 7954b19020c28a4120bc1671aa81b9e1e2b05fa2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runner: Always show a summary of success/fail/error/skip countsRichard Purdie2018-11-141-3/+1
| | | | | | | | | Its useful to have the counts of success/failure/error/skipped at the end of the results to allow for easier human reading of what happened. (From OE-Core rev: 080d8900d470a8e7f929b0c5c2765ad461744fbb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* locale: Allow usage of cross-localedef for ARCAlexey Brodkin2018-11-141-0/+2
| | | | | | | | | | With this it's possible to build locale data for ARC and not do it instead on the first boot. (From OE-Core rev: f13c303491dc8850126ea14baedc7b63b7b5ecf4) Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases: Improve dependencies of kernel/gcc/build testsRichard Purdie2018-11-146-30/+31
| | | | | | | | | Mark up these tests as needing a compiler, make and kernel source code as appropriate, the image feature requirements can then be retired. (From OE-Core rev: 9f64e6c25abdf494fb511e9cd401f8dcaa08be2a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/cases: Improve test dependency informationRichard Purdie2018-11-1410-25/+32
| | | | | | | | | | | | Add the OEHasPackage decorator to a variety of tests so they determine automatically if they should run against a given image. To ensure tests can do this we need to move target operations such as scp commands into the tests and out of the class startup/teardown. (From OE-Core rev: 60d6580b85714b8960a964e775d76a7f937f5e5a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk: fix skipped testcase output "UNKNOWN" status while multiprocess ↵Hongxu Jia2018-11-146-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* oeqa/runtime/utils/targetbuildproject: Use a subdir within ~/Richard Purdie2018-11-141-1/+3
| | | | | | | | | Without doing this, the code can and sometimes does try and do "rm ~/" which I think we'd all prefer it didn't. (From OE-Core rev: 9dc1de59330c366783ea043c68c1b59b1b49e707) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/buildproject: Only clean files if we've done somethingRichard Purdie2018-11-141-0/+5
| | | | | | | | | We should only be wiping out things on target if the tests have actually run. (From OE-Core rev: d38c3eac0a5a1a9b0eb98385832e92f48145655e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual/build-appliance: Drop test which is already automatedRichard Purdie2018-11-141-26/+0
| | | | | | | | The nightly-build-appliance target already tests this particular build. (From OE-Core rev: 02c5f853f30568eb3f289c6b6fb5cacf712d15f7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: Add tests for gstreamer CLIYeoh Ee Peng2018-11-141-0/+14
| | | | | | | | | | | | | | | | | | | We should not be finding GStreamer issues right around release time but that's what we seem to do. Port gstreamer tests from Intel Ref Kit. https://github.com/intel/intel-iot-refkit/blob/master/meta-iotqa/ lib/oeqa/runtime/multimedia/gstreamer/gstreamer_cli.py Add tests for gstreamer commandline tools (gst-inspect-1.0 & gst-launch-1.0). [YOCTO #11418] (From OE-Core rev: 3e77f845b517e3f4b3e7d09d088a9a80bf171653) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: Fix problems from changing upstream sourceMohamad Noor Alim Hussin2018-11-091-2/+2
| | | | | | | | | | | | The upstream source tarball checksums changed. Use the copy from our source mirror to avoid failures. [YOCTO #12979] (From OE-Core rev: e97a31e6bbaec5cb56d4750bf5171dbba510ee33) Signed-off-by: Mohamad Noor Alim Hussin <mohamad.noor.alim.hussin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image-buildinfo,oeqa/selftest/containerimage: Ensure image-buildinfo doesn't ↵Richard Purdie2018-11-091-0/+1
| | | | | | | | | | | | | | | | | | | break tests Having image-buildinfo enabled causes containerimage.ContainerImageTests.test_expected_files to fail due to the presence of an unexpected file: ['./', './etc/', - './etc/build', './etc/default/', './etc/default/postinst', Tweak the class to allow it to be disabled and disable it from the test just in case it was enabled. (From OE-Core rev: af67bf422a4df5b7e07894512ff73a5f493682ab) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Standardize json logging output directoryYeoh Ee Peng2018-11-091-1/+1
| | | | | | | | | | | | Currently sdk & sdkext will output json file to LOG_DIR, while selftest will output json file to TOPDIR/log. Standardize selftest json output file to LOG_DIR. (From OE-Core rev: 2012d6b076fc833864a0254d56d78536314a6799) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add test for Yocto source mirror functionality/completenessRichard Purdie2018-11-071-0/+23
| | | | | | | | | | | | | | We've had a number of occasions where the Yocto Project source mirrors have not been complete or functioning correctly. This adds a test so that if this happens we find out out it sooner. It also only works over http meaning we should be able to test that anyone behind an http only proxy (no git protocol) also has functional fetches for OE-Core and layers built by the core of the project. (From OE-Core rev: 9a25b2eb9cc13dd77a774dad83067ea5f9bf9716) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/ptest: Inject results+logs into stored json results fileRichard Purdie2018-11-072-2/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This allows the ptest results from ptest-runner, run in an image to be transferred over to the resulting json results output. Each test is given a pass/skip/fail so individual results can be monitored and the raw log output from the ptest-runner is also dumped into the results json file as this means after the fact debugging becomes much easier. Currently the log output is not split up per test but that would make a good future enhancement. I attempted to implement this as python subTests however it failed as the output was too confusing, subTests don't support any kind of log output handling, subTest successes aren't logged and it was making things far more complex than they needed to be. We mark ptest-runner as "EXPECTEDFAILURE" since its unlikely every ptest will pass currently and we don't want that to fail the whole image test run. Its assumed there would be later analysis of the json output to determine regressions. We do have to change the test runner code so that 'unexpectedsuccess' is not a failure. Also, the test names are manipuated to remove spaces and brackets with "_" used as a replacement and any duplicate occurrences truncated. (From OE-Core rev: a13e088942e2a3c3521e98954a394e61a15234e8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/utils/metadata: Allow to function without the git moduleRichard Purdie2018-10-291-2/+15
| | | | | | | | | | The python git module may or may not be enabled, allow this code to function without it, falling back to the same method as metadata_scm.bbclass uses. This will be cleaned up in the next round of feature development. (From OE-Core rev: 6350586ba9f4a4107a2d457590824cd4d662d5b9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: Don't add empty log entriesRichard Purdie2018-10-291-1/+4
| | | | | | | | | There is no point in adding empty log entries to the json result files, only add them if there is log data. (From OE-Core rev: da6aef0b6bd4655805f7f743858d4e04341f75ed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Improvements to the json loggingRichard Purdie2018-10-291-14/+11
| | | | | | | | | | | | | Tweak the preceeding commit to: * Add STARTTIME to the identifier to make it unique * Use LOG_DIR * Store the layer config in a more natural json format * Drop '_' function prefixes (From OE-Core rev: 173f59acf9722e2ef27fdd49c20f7d3d664917eb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/context: write testresult to json filesYeoh Ee Peng2018-10-291-3/+31
| | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia to store testresult, OEQA selftest need to output testresult into json files, where these json testresult files will be stored into git repository by the future test-case-management tools. By default, json testresult file will be written to "oeqa" directory under the oe-selftest log directory. To configure multiple instances of bitbake to write json testresult to a single testresult file at custom directory, user will define the variable "OEQA_JSON_RESULT_DIR" with the custom directory for json testresult. (From OE-Core rev: 10697165c832e3dbb2913b6215164ea75e23ec23) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: write testresult to json filesYeoh Ee Peng2018-10-291-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia to store testresult, OEQA need to output testresult into single json file, where json testresult file will be stored in git repository by the future test-case-management tools. The json testresult file will store more than one set of results, where each set of results was uniquely identified by the result_id. The result_id would be like "runtime-qemux86-core-image-sato", where it was a runtime test with target machine equal to qemux86 and running on core-image-sato image. The json testresult file will only store the latest test content for a given result_id. The json testresult file contains the configuration (eg. COMMIT, BRANCH, MACHINE, IMAGE), result (eg. PASSED, FAILED, ERROR), test log, and result_id. Based on the destination json testresult file directory provided, it could have multiple instances of bitbake trying to write json testresult to a single testresult file, using locking a lockfile alongside the results file directory to prevent races. Also the library class inside this patch will be reused by the future test-case-management tools to write json testresult for manual test case executed. (From OE-Core rev: 00e03b5004f1eb6d59295544b3a8620504278f51) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager.py: correct the deploydir when packagefeed-stability inheritedMingli Yu2018-10-281-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After create_packages_dir added in below commit: 85e72e1 package_manager: Filter to only rpms we depend upon When add below line into conf/local.conf INHERIT += "packagefeed-stability" There comes below error when do_rootfs Exception: FileExistsError: [Errno 17] File exists: '/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' -> '/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm' def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencies): [snip] bb.utils.remove(subrepo_dir, recurse=True) [snip] In create_packages_dir function, there is a logic as bb.utils.remove(subrepo_dir, recurse=True) to clean subrepo_dir which is actually as example is /$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm. But currently when inherit packagefeed-stability class, the deploydir should be /$Prj/tmp/deploy/rpm-prediff, not the default /$Prj/tmp/deploy/rpm. If use /$Prj/tmp/deploy/rpm, then result in the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm") Update to the actual deploydir to guarantee the logic as below: os.link("/$Prj/tmp/deploy/rpm-prediff/i586/initscripts-1.0-r155.i586.rpm", "/$Prj/tmp/work/qemux86-poky-linux/core-image-minimal/1.0-r0/oe-rootfs-repo/rpm/i586/initscripts-1.0-r155.i586.rpm") (From OE-Core rev: 3b17052611e640fb3db5d03c06ab87185a12be58) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: Support meta being a symbolic linkuninative-2.3Peter Kjellerstedt2018-10-211-1/+2
| | | | | | | | | | | oe-selftest's devtool tests have been broken since commit 2457cd57 (oe-selftest: devtool: avoid parallel races by using temporary copy of core) if meta is a symbolic link. (From OE-Core rev: daba6c5a991b370709d17e51305334f55a3858ec) Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/runner: refactor for OEQA to write json testresultYeoh Ee Peng2018-10-181-41/+29
| | | | | | | | | | | | | | Refactor the original _getDetailsNotPassed method to return testresult details (test status and log), which will be reused by future OEQA code to write json testresult. Take the opportunity to consolidate and simplify the logic used to gather test status and log within the TestResult instance. (From OE-Core rev: 79ee7d1c371a86edeb61c99679985118da657e5d) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: handle remove() with no packagesRoss Burton2018-10-181-1/+8
| | | | | | | | | | | | If remove() is called with an empty package list, ensure we do nothing instead of calling the underlying package manager with an invalid command line. [ YOCTO #12900 ] (From OE-Core rev: 715ec20c433cb4ed5fde938c33a42b2a296e4e56) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: implement PACKAGE_EXCLUDE for opkgRoss Burton2018-10-181-1/+5
| | | | | | | | | | opkg has supported the --add-exclude option to install since 0.3.0, so use it to implement support for PACKAGE_EXCLUDE. (From OE-Core rev: 6cc99d48c57cb22104980d0d758540e06cb7b80d) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: possibility to add packages to debug rootfsAndrej Valek2018-10-181-0/+10
| | | | | | | | | | | Static libraries are not included in rootfs, it means, that sources are not going into debug rootfs. This option enables to install additional packages even if the standard package is not installed. (From OE-Core rev: 708fe1df3d3e22dd693ae7bbfdd3e5af1a1b0bdc) Signed-off-by: Andrej Valek <andrej.valek@siemens.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests.py: reset TCLIBCAPPENDKai Kang2018-10-161-0/+12
| | | | | | | | | | | | | | It appends TCLIBCAPPEND to TMPDIR in meta/conf/distro/defaultsetup.conf: TMPDIR .= "${TCLIBCAPPEND}" It affects some oe selftest cases in sstatetests.py. Reset TCLIBCAPPEND for these cases. (From OE-Core rev: 4549c9dd96be8db69d520f66f4507939df9e9587) Signed-off-by: Kai Kang <kai.kang@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* ksample.py: fix error messageChen Qi2018-10-121-1/+1
| | | | | | | | | | | | | | | The current error message is like: kobject-example.kodoesn't exist Add a space so that it looks like: kobject-example.ko doesn't exist (From OE-Core rev: 30f2cdd0a3ee0874bebd135e35ab591f630e8adc) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual/oe-core: Drop image build during taskexp testRichard Purdie2018-10-111-4/+0
| | | | | | | | | Building an image takes time and isn't necessary to test taskexp, we can drop this step. (From OE-Core rev: 298eb27037172925a83b37541e5955bbf3b7d2fb) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual: Remove bitbake-selftest executionRichard Purdie2018-10-111-30/+0
| | | | | | | | | The autobuilder runs bitbake-selftest already so we don't need to execute this manually. (From OE-Core rev: f223f49b7e3d3f6ef07915edea1a6233ae9869e2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual: transfer manual test cases from testopia to oeqaYeoh Ee Peng2018-10-119-0/+2750
| | | | | | | | | | | | | | | | | | | | | | As part of the solution to replace Testopia, manual test cases need to be migrated to OEQA. These manual test case json files will serve two use cases. Use case#1: as input to the future commandline-based manual test runner script, where this script will display actions and expected result information in user friendly text, then it will capture user input for test result and log, finally it will write test result and log into existing standardize test result json format from OEQA framework for automated tests. Use case#2: QA will open and read these json file manually for planning manual test execution. Any reader interested in understanding manual test cases will open and read these files. (From OE-Core rev: dcaf843878e9adcb3fab025d54cd5d9ceb6c2fce) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime/opkg: Ensure the test works on multilibRichard Purdie2018-10-111-1/+4
| | | | | | | | | After allarch was disabled in multilib, this test broke. Fix the test to account for that change. (From OE-Core rev: 6f692d86c2c6742c67aba93fa24b930af02d8e85) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/utils: add eol to format_pkg_list()grygorii tertychnyi via Openembedded-core2018-10-111-1/+7
| | | | | | | | | | | | | | | | | Append '\n' to the non-empty formatted string before return. If you write it to the (manifest) file, it will ensure file ends with a newline. Many GNU utilities have problems processing the last line of a file if it is not '\n' terminated. E.g. if the last line is not terminated by a newline character, then "read" will read it but return false, leaving the broken partial line in the read variable(s). It can also break or adversely affect some text processing tools, that operate on the file. (From OE-Core rev: ee4d0c879713ba50dc6cc3300f44647faebee2e0) Signed-off-by: grygorii tertychnyi <gtertych@cisco.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/runqemu: Handle SystemExitRichard Purdie2018-10-091-8/+11
| | | | | | | | | | | | | | | | | | | The sigchld handler in runqemu can raise a SystemExit when qemu shuts down. Rather than backtracing, accept this as a successful test result. ERROR: runqemu.QemuTest.test_qemu_can_shutdown (subunit.RemotedTestCase) testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 183, in test_qemu_can_shutdown qemu_shutdown_succeeded = self._start_qemu_shutdown_check_if_shutdown_succeeded(qemu, shutdown_timeout) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/runqemu.py", line 175, in _start_qemu_shutdown_check_if_shutdown_succeeded time.sleep(1) File "/home/pokybuild/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/utils/qemurunner.py", line 100, in handleSIGCHLD raise SystemExit SystemExit (From OE-Core rev: 417245923c1c2c35a60d6db29cbe5a78548860d2) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* qemurunner: Remove the signal handler before stopping qemuRichard Purdie2018-10-091-2/+2
| | | | | | | | | | | The qemu shutdown can race with the signal handler removal leading to confusing tracebacks on slower/loaded systems. Remove the signal handler first before shutting down. (From OE-Core rev: 1b63ce7bb83134f84bf07d1075d5ca0d5466ed3d) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs.py: Install -src packages when PACKAGE_DEBUG_SPLIT_STYLE is ↵Joshua Watt2018-09-251-0/+4
| | | | | | | | | | | | | | | "debug-with-srcpkg" When the source packages are created, they need to be included in the debug image created when IMAGE_GEN_DEBUGFS = "1" for it to be usable for debugging. [YOCTO #12930] (From OE-Core rev: 5fc7fbc10bbd3a54df16db275ecd6080bc58f19e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* rootfs: always update the opkg indexIoan-Adrian Ratiu2018-09-251-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | The previous logic assumed that if $BUILD_IMAGES_FROM_FEEDS=1 then a complete set of ipk feeds from which to build the image is already present under $IPK_FEED_URIS at do_rootfs runtime. $IPK_FEED_URIS usually contains "file://${DEPLOY_DIR_IPK}" which renders the above assumption bad because some recipes in the current build can contain code like do_install[nostamp] = "1" which will cause rebuilds bumping $PR and invalidating the index. Even when the index is manually re-created before an image build ("bitbake package-index"), the nostamp will cause failures because the dependency gets rebuilt before do_rootfs in the "bitbake <image>" call. So make the opkg rootfs index logic the same as for rpm/deb, to always update the index in $DEPLOY_DIR_IPK to fix the above nostamp failure. Feeds outside $DEPLOY_DIR_IPK added to $IPK_FEED_URIS continue to work as usual, for eg. by using a http:// URI. (From OE-Core rev: bce90f48d1cc136fdfdf98b3830f5d99e381271b) Signed-off-by: Ioan-Adrian Ratiu <adrian.ratiu@ni.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* lib/oe/elf.py: Add LatticeMico32 architecture definitionNathan Rossi2018-09-211-0/+1
| | | | | | | | | | | Add the ELF definition for the LaticeMico32 architecture. This architecture is 'elf' OS only as it does not target Linux. (From OE-Core rev: d14f86f39a25649c923deecc24a283ba968b13f5) Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package_manager: use normalized path when doing the filtered copyMax Krummenacher2018-09-211-0/+1
| | | | | | | | | | | | | | | | | The linking/copying of the package files failes if the deploy dir is set in a non normalized way e.g. like this DEPLOY_DIR = "${TOPDIR}/../deploy" Then the simple string replacement which is used to calculated the link destination from the link source fails, as the link source is normalized but the deploydir prefix is not. Normalizing deploydir fixes this. (From OE-Core rev: e0ebfaa92bbfd3158b48e28dfb6435890c73bef3) Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>