summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa
Commit message (Collapse)AuthorAgeFilesLines
* selftest/reproducible: Don't call sync between each file compareRichard Purdie2021-03-281-1/+1
| | | | | | | | | | | | | Calling sync between each file compare is horrible performance wise as we compare thousands of files. We don't care about IO latency here so disable. (From OE-Core rev: 1fddd6b891265956e0a26963459e7511d757cace) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 25f78abd8bbeb201fd9452e7983e015027954948) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/pam: Need shadow installed for the testsKhem Raj2021-03-101-0/+3
| | | | | | | | | | | | | | | | Distros may not use shadow for login manager secondly login --help returns 1 only with shadow provided login utility, with busybox it returns normal 0, the testcase clearly assumes shadow being part of image, therefore add needed checks to ensure the pre-requisites are met (From OE-Core rev: 0535f0bbc792a5124a375e087a3a5b0c27c19456) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 0820aeba74869bf6e85b200f39bc610a43ab9a7a) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/commands: Fix compatibility with python 3.9Richard Purdie2021-03-101-2/+2
| | | | | | | | | | | Python 3.9 dropped isAlive() so use the preferred is_alive(). (From OE-Core rev: f101408bd43a5d41cb1710a7a848370292f84290) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 9bb06428cbb2ac0f3d98a1696f050d3393385503) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* df.py: Add feature check for read-only-rootfsWes Lindauer2021-03-101-0/+2
| | | | | | | | | | | | | | If the target is using a read-only rootfs, the available space on '/' will be zero. This will cause the test to incorrectly fail and skipping seems appropriate in this case. (From OE-Core rev: ca408f6c78c2a526c699e3978634c85d2fbd0cfe) Signed-off-by: Wes Lindauer <wesley.lindauer@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit af1dbea3c9b9b42a3e6803b231e425423d70e210) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: reproducible: Add more loggingJoshua Watt2021-02-261-0/+3
| | | | | | | | | | | | | | The reproducible build tests can take a long time, so having more logging messages at various points in the build can help debug where the build is taking a long time. (From OE-Core rev: 3ea201b2bcb40a3de6a2e36a43859fe354706b26) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 6b792afe8759d62af8e713b86dad8f6721961a05) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: reproducible: Fix SSTATE_MIRRORS variableJoshua Watt2021-02-261-1/+1
| | | | | | | | | | | | | The SSTATE_MIRRORS variable was misspelled, which allowed the "clean" test build to pull from the mirror. (From OE-Core rev: 99fc5a5847b82620904a0e120d92cad6bb79021a) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e42497bd84d0bb370a9f7b0448bff29f01fd1b0c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: debug mode to keep tmp directoryLee Chee Yang2021-02-261-0/+2
| | | | | | | | | | | | | | | | | | files in wic tmp directory can be usefull for debugging, so do not remove tmp directory when wic create run with debugging mode (-D or --debug). also update wic.Wic.test_debug_short and wic.Wic.test_debug_long to check for tmp directory. [YOCTO#14216] (From OE-Core rev: 04d334d5bc5353c39c5059d25d97f111a9e368d9) Signed-off-by: Lee Chee Yang <Chee.Yang.Lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a122e2418b67d38f691edcf8dd846c167d6b4fa9) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/selftest: test_permissions also test bitbake imageLee Chee Yang2021-02-111-0/+16
| | | | | | | | | | | | | | | | existing test case test_permissions use Wic command as standalone tools to create wic image and check that wic image for permissions. add extra steps to the test case to also check against image build using bitbake do_image_wic. (From OE-Core rev: d0a7383ca3e8ac206c88ac3cc1b8e1f18b439964) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 551ce73a90757ba43501fe5cf9ac84a7b77de549) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve_check: add CVE_VERSION_SUFFIX to indicate suffix in versioningLee Chee Yang2021-02-051-1/+10
| | | | | | | | | | | | | | | | | | | | | | | add CVE_VERSION_SUFFIX to indicate the version suffix type, currently works in two value, "alphabetical" if the version string uses single alphabetical character suffix as incremental release, blank to not consider the unidentified suffixes. This can be expand when more suffix pattern identified. refactor cve_check.Version class to use functools and add parameter to handle suffix condition. Also update testcases to cover new changes. (From OE-Core rev: 5dfd5ad5144708b474ef31eaa89a846c57be8ac0) (From OE-Core rev: 73f8c25a44ee33866a8fa61824437285cea96249) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 86b42289bda5bc2a4eff221ab476f170dd3d3794) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* cve-check: replace Looseversion with custom version classLee Chee Yang2021-02-051-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way distutils.version.LooseVersion compare version are tricky, it treat all these ( "1.0-beta2", "1.0-rc1", "1.0A", "1.0p2" and "1.0pre1") as greater version than "1.0". This might be right for "1.0A" and "1.0p1" but not for the rest, also these version could be confusing, the "p" in "1.0p1" can be "pre" or "patched" version or even other meaning. Replace Looseversion with custom class, it uses regex to capture common version format like "1.1.1" or tag format using date like "2020-12-12" as release section, check for following known string/tags ( beta, rc, pre, dev, alpha, preview) as pre-release section, any other trailing characters are difficult to understand/define so ignore them. Compare release section and pre-release section saperately. included selftest for the version class. [YOCTO#14127] (From OE-Core rev: 6ced85e9ddd3569240f1e8b82130d1ac0fffbc40) (From OE-Core rev: 02a44b507a1e49a4c460f3e1bec92832b71dfe08) Signed-off-by: Lee Chee Yang <chee.yang.lee@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 3807c6d9a78ac8ade24c9c69cfe2b9624c49a20d) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/tinfoil.py: increase timeout 10->60s test_wait_eventYi Fan Yu2021-02-051-2/+4
| | | | | | | | | | | | | | | | | | | | The test would timeout on autobuilders. This patch increases the timeout to 60s The test will now also exit as soon as we receive the 2 expected events Expected runtime is around 1s if successful Bug 14158 (From OE-Core rev: be02aa9283f805de718badd5ea12c4968da8774f) (From OE-Core rev: c925b83cbd31345f788515ca8b642b14e5e11898) Signed-off-by: Yi Fan Yu <yifan.yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1d803b70e599521ad0c743f49007e6fc5c055d1c) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: Add argument to keep build dirPaul Barker2021-01-181-4/+13
| | | | | | | | | | | | | | | | The oe-selftest code already keeps the selftest build directory in place if any tests failed. By default the build directory is deleted if all tests pass but there may be cases where it's desirable to keep this directory around, for example to compare intermediate files between passing and failing test runs. (From OE-Core rev: f41c17a155e9bfd233bc2166c6ab7f5e547f39fa) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 67aa7069dbe8f5f5f186eb67708ece5c4bd42976) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* bitbake.conf: Prevent pyc file generation in pseudo contextPaul Barker2021-01-121-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | This also effectively reverts commit b6d30c21b0: bitbake.conf: Extend PSEUDO_IGNORE_PATHS to ${COREBASE}/meta The contents of ${COREBASE}/meta were ignored as pyc files could be generated for the contents of the lib subdirectory if python modules were imported within a pseudo context. However this doesn't protect us from pyc files being generated in the lib directories for other layers. It's far better to tell python not to produce pyc files when running under pseudo (by setting the PYTHONDONTWRITEBYTECODE variable) as this will cover any location where pyc files could possibly be created. This variable is set in FAKEROOTBASEENV so that it applies to the bitbake-worker instance for fakeroot tasks, preventing pyc files from being generated for imports in python tasks themselves. Also add a test case to ensure that pyc files are not created in tasks which are executed under pseudo. (From OE-Core rev: 7aa1ae139b9131faff04c0ed156fd8efcde114f6) Signed-off-by: Paul Barker <pbarker@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 73d538f20743017a44cea4c20dbe09a0327cfc71) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/commands: Ensure sync can be found regardless of PATHRichard Purdie2021-01-121-0/+3
| | | | | | | | | | | | Avoid command not found errors shown in selftest logs due to changes to PATH settings which also risks intermittent problems due to IO load. (From OE-Core rev: 8d7f1c1574ceaff11966331855491ef7c96fd110) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 40bcae01b0be2f293dea9ab42c6b7f8f47827cf5) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/devtool.py: fix typo in ignore_patterns callSteve Sakoman2021-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | Causes intermittent autobuilder errors: 2020-12-21 19:34:23,035 - oe-selftest - INFO - testtools.testresult.real._StringException: Traceback (most recent call last): File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 68, in setUpModule bb.utils.edit_bblayers_conf(bblayers_conf, None, None, bblayers_edit_cb) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1460, in edit_bblayers_conf (updated, newlines) = edit_metadata(newlines, ['BBLAYERS'], handle_bblayers) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1290, in edit_metadata if handle_var_end(): File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1215, in handle_var_end (newvalue, newop, indent, minbreak) = varfunc(in_var, full_value, op, newlines) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/bitbake/lib/bb/utils.py", line 1425, in handle_bblayers res = edit_cb(layer, canonicalise_path(layer)) File "/home/pokybuild/yocto-worker/oe-selftest-ubuntu/build/meta/lib/oeqa/selftest/cases/devtool.py", line 60, in bblayers_edit_cb shutil.copytree(pth, destdir, ignore=ignore_patterns('*.pyc', '__pycache__')) NameError: name 'ignore_patterns' is not defined (From OE-Core rev: d8bdee355b4d42f0488ed91a3e5939ae3e574c92) Signed-off-by: Steve Sakoman <steve@sakoman.com> Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* meta/lib/oeqa/manual/oe-core.json: Update test_bitbake_devshellsangeeta jain2020-12-181-1/+1
| | | | | | | | | | | | | Update command used for cross compilation to include ${CONFIGUREOPTS} to ensure right arguments are passed for cross compiling on any host. (From OE-Core rev: b1a1e936169d9db8d5de46aace9370f5e695c24d) Signed-off-by: sangeeta jain <sangeeta.jain@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit e995e67bc7a3d30adf9f8d0d2f4df92a941baeae) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/devtool: use Yocto mirror for pv-1.5.3 tarballRoss Burton2020-12-181-1/+1
| | | | | | | | | | | | | | Some of the selftests failed over the weekend with "access denied" errors fetching this tarball. Instead of relying on upstream when fetching the tarball, use the Yocto source mirrors instead. (From OE-Core rev: bae9a74f4fb86d91721b493e97da5a5034c62828) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 988e0ff4131f46dfed14516ff5f61d72b9fb6941) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/context: initialize _run_end_timeKonrad Weihmann2020-11-201-0/+1
| | | | | | | | | | | | | with _run_start_time as value. For partial results of interrupted runs, this info might be otherwise missing for at least one testcase (From OE-Core rev: a91308482e1bb524df413d4342a9ebb472314663) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 1c5e8baf57fa2a33b9ef507b11d9ea9acaa77238) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/core/context: expose results as variableKonrad Weihmann2020-11-201-0/+3
| | | | | | | | | | | | | | | register an unittest handler for testresults and expose it as variable result. With this even partial results from an interrupted test suite run can be made available (From OE-Core rev: ba41688f7f0cb44293321df6c69fe47ac1804d63) Signed-off-by: Konrad Weihmann <kweihmann@outlook.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit a97ae47525157871b6c098ffc352293e365a4335) Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: New test case, test_empty_image, addedKhairul Rohaizzat Jamaluddin2020-10-261-1/+11
| | | | | | | | | | | | | | | | | | | An empty image build file exists under the meta-selftest folder, test-empty-image.bb, which builds an image with no additional packages. However, there were no further selftest created to verify its emptiness This change consists of the selftest related to the said image to verify its emptiness and the 'import glob' moved as global import instead of local import. The expected outcome of the test should be TRUE or 1 if the .manifest file content is empty. [YOCTO #8455] (From OE-Core rev: 1f8bdaa746c6e7efc07789256d5c050780c81f4c) Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Add sync call to command executionRichard Purdie2020-10-203-16/+15
| | | | | | | | | | | | We previously put a sync call into devtool to try and combat the bitbake timeout issues on the autobuilder. It isn't enough as the timeouts occur mid test. They are also occurring on non-devtool tests. Add in sync calls around command execution instead. (From OE-Core rev: ceca5ed121e2b54415a7ab3a217882e4ea86923a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/runtime_test: Exclude gpg directory from pseudo databaseRichard Purdie2020-10-101-0/+1
| | | | | | | | | Avoid pseudo abort()s like: path mismatch [1 link]: ino 6295376 db '/tmp/oeqa-feed-sign-2mw7z81v/S.gpg-agent.yocto-native' req '/tmp/jwkivmu6'. (From OE-Core rev: 189630ca6cdf7ceb6cf9b8f9d86c58997f505efc) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add test for recipes with patches in overridesRoss Burton2020-10-081-0/+20
| | | | | | | | | | devtool doesn't quite behave right when a recipe has patches applied in overrides, so add a test case to exercise that behaviour. (From OE-Core rev: ad89c3254cc6c06026f1bebe23ec3717c1546633) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: skip npm tests if nodejs-native isn't availableRoss Burton2020-10-082-0/+8
| | | | | | | | | | The tests are actually skipped if meta-oe isn't present which isn't quite the same thing, but hopefully close enough. (From OE-Core rev: d22ed015d8f38241acb783e1a468fb15d4317670) Signed-off-by: Ross Burton <ross.burton@arm.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/devtool: Add sync call to test teardownRichard Purdie2020-09-301-0/+7
| | | | | | | | | | Devtool tests are heavy on IO and if bitbake can't write out its caches, we see timeouts. Call "sync" around the tests to ensure the IO queue doesn't get too large, taking any IO hit here rather than in bitbake shutdown. (From OE-Core rev: ce265cf467f1c3e5ba2edbfbef2170df1a727a52) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testsdk.py: remove workspace/sources to avoid failure in case of multilibChen Qi2020-09-301-0/+3
| | | | | | | | | | | | | | | | | | When multilib is enabled, there are multiple environment scripts, and the test cases for eSDK are executed for each environment script. And we will have the following problem when executing test cases for the second environment script. ERROR: Source tree path /.../workspace/sources/librdfa already exists and is not empty So after executing test cases for one environment, we clean up the sources diretory to avoid such failure. (From OE-Core rev: f55924d8d2258ca8b60c46d78ae2de06add59798) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/cases/devtool.py: avoid .pyc raceTim Orling2020-09-301-1/+2
| | | | | | | | | | | | | | | | | In certain conditions, most likely under heavy load on the AutoBuilder, the prebuilt .pyc files are attempting to be executed before they have been completely copied. Avoid this by not copying the .pyc files (nor the __pycache__ directory). The impact of python3-native recreating the .pyc files should hopefully be negligible. YOCTO#13421 YOCTO#13803 (From OE-Core rev: 4df098aeecd589ddd11a883e281285588a6966ca) Signed-off-by: Tim Orling <timothy.t.orling@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* target/ssh.py: Add dump_target supportSaul Wold2020-09-301-0/+2
| | | | | | | | | | | | | | This adds the dump_target support when the ssh command fails with a 'No route to host'. This is will provide additional data when a Qemu target fails to respond during autobuilder testing. This does not fix 14002 [0], but may help track down why qemu looses networking [0] https://bugzilla.yoctoproject.org/show_bug.cgi?id=14002 (From OE-Core rev: cef1a2b03b359c018911abc29db1895d0f46814c) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* testimage: Add testimage_dump_target to kwargsSaul Wold2020-09-301-0/+4
| | | | | | | | | | | | | | | | | | This passes the list of commands to run on the OEQemuTarget when the TargetDumper needs to run in a test context due to a failure on the target. This is added here as a kwargs because the 'd' dictionary is not available in the staticmethod getTarget in the OERuntimeTestContextExecutor class. The OEQemuTarget is different from the QemuTarget which already uses the list of commands from testimage_dump_target from 'd'. The create_dir() is needed to initialize the TargetDumper's dump_dir variable. (From OE-Core rev: a63675fab4d9f638570912b15a07932f549cc4d1) Signed-off-by: Saul Wold <saul.wold@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime : add test for RTC(Real Time Clock)Teoh Jay Shen2020-09-281-0/+38
| | | | | | | | | This test is checking the functionality of the RTC(Real Time Clock). The Check_if_RTC_(Real_Time_Clock)_can_work_correctly manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. (From OE-Core rev: c6961c2fc04edbc5bc3827c7703997085d9c609e) Signed-off-by: Teoh Jay Shen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/containerimage: Update to match assumptions in configurationRichard Purdie2020-09-231-0/+3
| | | | | | | | | | Assumptions in the test mean it doesn't work with ssh-pregen-hostkeys. It also doesn't work with systemd. Update the configuration to make sure neither of these effect the test. (From OE-Core rev: e2f277657f1db6a0f805ac07d318a3850535d695) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/incompatible_lib: Fix append usageRichard Purdie2020-09-231-1/+1
| | | | | | | | It's pure luck this has worked so far, add a missing space to the append. (From OE-Core rev: 793e0575b1cebb953276b5f93ff31e48c19779c8) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/qemurunner: Increase serial timeoutRichard Purdie2020-09-201-1/+1
| | | | | | | | | | | | | | | | | Increase the serial login timeout from 60 to 120s. This seems like a long time, however for a qemumips image with systemd+PAM and openssh, (e.g. core-image-sato-sdk + DISTRO=poky-altcfg), the getty connects to systemd's pam module which waits on logind and 45s for all this to happen at the same time as things like ssh key generation happens is not unknown. Increase the timeout to match the longer times we know these things can take in the worst case scenarios since we're tired of intermittent issues related to the serial login affecting the autobuilder. (From OE-Core rev: d8b4292db741de660f756dfb766210814d587b7a) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic/bootimg-efi: IMAGE_EFI_BOOT_FILES variable added to separate bootimg-efi ↵Khairul Rohaizzat Jamaluddin2020-09-151-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | and bootimg-partition Due to recent changes in bootimg-efi to include IMAGE_BOOT_FILES, when both bootimg-partition and bootimg-efi occur in a single .wks and IMAGE_BOOT_FILES are defined, files listed in IMAGE_BOOT_FILES will be duplicated in both partition. Since IMAGE_BOOT_FILES are crucial for bootimg-partition, but optional for bootimg-efi, hence allowing bootimg-efi to have the option to ignore it. The new variable, IMAGE_EFI_BOOT_FILES, was added to help handle this issue. Its basic usage is the same as IMAGE_BOOT_FILES. Usage example: ${IMGDEPLOYDIR}/${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.img \ This commit is also squashed with the updated testcase to cover for this change. [YOCTO #14011] (From OE-Core rev: 945339e06b273df1935cfd784f548ef57e0b7f4c) Signed-off-by: Khairul Rohaizzat Jamaluddin <khairul.rohaizzat.jamaluddin@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime: add test for matchbox-terminalTeohJayShen2020-09-141-0/+18
| | | | | | | | | This test is checking that the terminal application is able to run. The click_terminal_icon_on_X_desktop manual test case from oeqa/manual/bsp-hw can be replace by this runtime test. (From OE-Core rev: cfa9c1ce853bfd31c1febe61d0f7ad9c5d35f709) Signed-off-by: TeohJayShen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/weston: Fix tests to run with systemdKhem Raj2020-09-141-3/+9
| | | | | | | | | | | | | Currently, weston tests fail when using systemd, fix it by providing transient unit file and inject it via systemd-run, which generates a service file automatically and launches another weston instance to test if it can launch a nested instance. Use systemctl stop to end the service and cleanup, instead of brutal kill (From OE-Core rev: 7572158b861cb5d4ebf6360ced08ab41419d74d3) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/concurrencytest: Improve builddir path manipulationsRichard Purdie2020-09-081-1/+3
| | | | | | | | | | Its possible some patterns may cause problems with the current path manipulations, make a small tweak to try and avoid potential pathname overlap issues. (From OE-Core rev: 889005dc17d3e3b8eadee907ee2c05b8ff613285) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/signing: Ensure build path relocation is safeRichard Purdie2020-09-081-1/+3
| | | | | | | | | Similarly to 04ee0e8b95cd8ed890374e0007f976684206b630, ensure only full build paths are replaced in the environment to avoid breaking buildtools. (From OE-Core rev: fcd0a9683af1a9155eabbd9056e3b46d4a931b2e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* package.bbclass: hash equivalency and pr serviceMark Hatle2020-09-031-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When the PR service is enabled a number of small changes may happen to variables. In the do_package step a call to package_get_auto_pr will end up setting PRAUTO and modifying PKGV (if AUTOINC is there). PRAUTO is then used by EXTENDPRAUTO, which is then used to generate PKGR. Since this behavior typically happens BEFORE the BB_UNIHASH is calculated for do_package, we need a way to defer the expansion until after we have the unihash value. Writing out the pkgdata files w/o AUTOPR and PKGV (AUTOINC) expanded to placeholder values is the easiest way to deal with this. All other variables are expanded as expected. In the next task, typically do_packagedata, we will then use the UNIHASH from the do_package to get the PR (AUTOPR) as well as generate the AUTOINC replacement value (now PRSERV_PV_AUTOINC). The do_packagedata then translates the placeholders to the final values when copying the data from pkgdata to pkgdata-pdata-input. Also update the prservice test case. With unihash, just changing the do_package (via a _append) will not change the PR. So write the date to a specific file that is incorporated into the unihash to ensure it is always different for the test. Various assert messages were also updated to make it easier to figure out where/why a problem occured. (From OE-Core rev: 2e32f37b0e4abc438c8f60e673cd18a5cc110768) Signed-off-by: Mark Hatle <mark.hatle@kernel.crashing.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/prservice: Improve test failure messageRichard Purdie2020-09-021-2/+2
| | | | | | | | | When failing, give more information about why exactly a failure is happening such as the PR values in question. (From OE-Core rev: bdd3abcc210e8f58b7b411da6bbd9c5314819908) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: reproducible: Fix test not producing diffsJoshua Watt2020-09-023-1/+29
| | | | | | | | | | | | | | | | Diffoscope changed the --exclude-directory-metadata option to require an argument. Add a test to validate that diffoscope is functioning as expected to ensure that future upgrades do not unintentionally break the reproducibility tests. [YOCTO #14025] (From OE-Core rev: ea8fbcb7978ce48d7a9a83143d09402329535f86) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: sdk: Capture stderr outputJoshua Watt2020-09-026-6/+6
| | | | | | | | | | | Redirect stderr to stdout when running subcommands while doing the SDK tests. The tests will show stdout when CalledProcessError is raised, but any output to stderr was lost. (From OE-Core rev: 7cb4e9ab8c1596281060e94a216966060103956e) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/multilib: un-skip the connman testAlexander Kanavin2020-08-281-1/+1
| | | | | | | | | | It was previously skipped as it was expecting plain connman to not be in the image, and for core-image-sato connman is always there. (From OE-Core rev: 5dc237aa6aa8d86433ff7885b88efd8a7b79aa74) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/multilib: rework to use readelf from the hostAlexander Kanavin2020-08-281-3/+6
| | | | | | | | | | | | It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. (From OE-Core rev: b7f62b28acb0efc9e9bf0126bd2425dcca012fd1) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/x32lib: rework to use readelf from the hostAlexander Kanavin2020-08-281-6/+11
| | | | | | | | | | | | It is difficult and error-prone to ensure binutils gets installed into target images where this test may run; on the other hand readelf is always present on the host, as it is a part of HOSTTOOLS. (From OE-Core rev: ecf9fbf7938c667cb648a34f690cfa8db6f5c157) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Apply patch to fix cpio build with -fno-commonRichard Purdie2020-08-261-1/+1
| | | | | | | | | | Patch a combined effort from Khem/RP, need to add$CONFIGURE_FLAGS to ensure tests still work. (From OE-Core rev: 48c82d42d510b9a8b6e819f2adf4cc1bebed8db4) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/recipetool: Drop globbing SRC_URI test, no longer supportedRichard Purdie2020-08-261-13/+0
| | | | | | | | | | Globbing is a bad idea in SRC_URI, it breaks the task checksums and can't really be fixed. Since we're removing it, drop the test for its interaction with recipetool. (From OE-Core rev: 8bf93fa89aa1ba73f6eec05b95d6e8ca5f7d4c4b) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: runtime_tests: Extra GPG debuggingJoshua Watt2020-08-251-1/+1
| | | | | | | | | | This patch enables extra debugging for gpg to try and get more debugging information when [YOCTO #14003] occurs (From OE-Core rev: f24d7be1fb863006b5414fa8f9c9a37bb48d5a6f) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: Add 512 Byte alignment to --offsetJoshua Watt2020-08-221-0/+24
| | | | | | | | | | | | | Allows the --offset argument to use the "s" or "S" suffix to specify that it is reporting the number of 512 byte sectors. This is required for some SoCs where the mask ROM looks for an item at a sector that isn't aligned to a 1KB boundary. (From OE-Core rev: 938595d1dc4abaf5f7f3a7900add3f0492b805d0) Signed-off-by: Joshua Watt <JPEWhacker@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/manual/bsp-hw.json : remove X_server_can_start_up_with_runlevel_5_boot testTeohJayShen2020-08-201-22/+0
| | | | | | | | | remove the test as graphical mode is already being validated (From OE-Core rev: ad5b5ca9ec1d9106911a610bb36fb98e3f17748d) Signed-off-by: TeohJayShen <jay.shen.teoh@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>