summaryrefslogtreecommitdiffstats
path: root/meta/lib/oeqa/selftest/cases
Commit message (Collapse)AuthorAgeFilesLines
* selftest/cases/runtime_test: ignore removal errors when cleaning temporary ↵Leonardo Sandoval2017-09-261-3/+7
| | | | | | | | | | | | | | | | | | | | | | | gpg directory The high-level method tempfile.TemporaryDirectory give us no way to ignore erros on removal thus use tempfile.mkdtemp instead. Ignoring possible issues on removal is neccesary because it contains gpg sockets that are automatically removed by the system once the process terminates, otherwise the following log is observed: File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser' This is the same fix as 7e3a7cd2426feac757def81850dc44156cd0f33e, but this applies to runtime (instead of signing). [YOCTO #11821] (From OE-Core rev: f28e8131f69913ff90ed210c7a58726d3ef37db6) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest/recipetool: use stable tarball for recipetool create testRoss Burton2017-09-181-6/+6
| | | | | | | | | | | GitHub dynamically generates the /archive/ tarballs but we're encoding checksums in the test suite. Change the URL to use a static tarball, and update the checksums. (From OE-Core rev: 9c668f9ff989a34e615e2ecc051dadbfe24a5bb4) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* devtool: rework source extraction so that dependencies are handledPaul Eggleton2017-09-181-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since it was first implemented, devtool's source extraction (as used by the devtool modify, extract and upgrade subcommands) ignored other recipe dependencies - so for example if you ran devtool modify on a recipe that fetches from svn or is compressed using xz then it would fail if those dependencies hadn't been built first. Now that we can execute tasks in the normal way (i.e. tinfoil.build_targets()) then we can rework it to use that. This is slightly tricky in that the source extraction needs to insert some logic in between tasks; luckily we can use a helper class that conditionally adds prefuncs to make that possible. Some side-effects / aspects of this change worth noting: * Operations are a little slower because we have to go through the task dependency graph generation and other startup processing. There's not really any way to avoid this though. * devtool extract didn't used to require a workspace, now it does because it needs to create a temporary bbappend for the recipe. (As with other commands the workspace be created on the fly if it doesn't already exist.) * I want any existing sysroot files and stamps to be left alone during extraction since we are running the tasks off to the side, and especially devtool extract should be able to be used without touching these. However, this was hampered by the automatic removal process in sstate.bbclass triggered by bb.event.ReachableStamps when the task signatures change, thus I had to introduce a way to disable this removal on a per-recipe basis (we still want it to function for any dependencies that we aren't working on). To implement this I elected to use a file written to tmp/sstate-control which gets deleted automatically after reading so that there's less chance of stale files affecting future sessions. I could have used a variable but this would have needed to be whitelisted and I'd have to have poked its value in using the setVariable command. Fixes [YOCTO #11198]. (From OE-Core rev: 830dbd66992cbb9e731b48d56fddf8f220349666) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: fix test_devtool_add hanging on some machinesPaul Eggleton2017-09-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | The code in scriptutils which implements the logic for running the editor used by devtool edit-recipe looks at the VISUAL environment variable before EDITOR, and thus if VISUAL is set in the environment it will override the EDITOR value we are setting here, the editor (usually vim) launches and there's nothing to stop it running forever short of manually killing it. Set VISUAL instead to fix this. Apparently VISUAL is in fact the variable we should really be preferring here - I don't think I knew that but somehow I got it right in the code, just not in the test. Here are the details for the curious: https://unix.stackexchange.com/questions/4859/visual-vs-editor-whats-the-difference Fixes [YOCTO #12074]. (From OE-Core rev: 6a7c50def569b5e86aa17bd9b287e8c63781dcb0) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/cases/signing: ignore removal errors when cleaning temporary gpg ↵Leonardo Sandoval2017-09-121-2/+5
| | | | | | | | | | | | | | | | | | | | | | directory The high-level method tempfile.TemporaryDirectory give us no way to ignore erros on removal thus use tempfile.mkdtemp instead. Ignoring possible issues on removal is neccesary because it contains gpg sockets that are automatically removed by the system once the process terminates, otherwise the following log is observed: .. .. File "/usr/lib/python3.5/shutil.py", line 436, in _rmtree_safe_fd os.unlink(name, dir_fd=topfd) FileNotFoundError: [Errno 2] No such file or directory: 'S.gpg-agent.browser' [YOCTO #11821] (From OE-Core rev: 7e3a7cd2426feac757def81850dc44156cd0f33e) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/devtool: Avoid writing on TOPDIR on kernel test caseJose Perez Carranza2017-09-121-4/+5
| | | | | | | | | | Use a tempdir to copy the .config file from the kernel instead of being copied to build directory. (From OE-Core rev: ccccf975c75055639c0ed5052ac0ad53ebbf53ca) Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: selftest: add test_wic_rm_ext test caseEd Bartosh2017-09-111-0/+23
| | | | | | | | | | | Tested if 'wic rm' correctly removes files from the ext4 partition of the wic image. (From OE-Core rev: 693b555e4f419b5d24f9f86c44354866492f8bb0) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: selftest: add test_wic_cp_ext test caseEd Bartosh2017-09-111-0/+30
| | | | | | | | | | | Tested if 'wic cp' correctly copies files to the ext4 partition of the wic image. (From OE-Core rev: 7970907c72d9533fd63d2c8796bbeb9be86b3fc3) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: selftest: add test_wic_ls_ext test caseEd Bartosh2017-09-111-0/+16
| | | | | | | | | | | Tested if 'wic ls' correctly lists directory contents of the ext* partition. (From OE-Core rev: 6ae3ff957b5c28c7853966cd5a7665772c594546) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: Replace "append +=" with normal "append =" in layerappend.pyRobert P. J. Day2017-09-111-1/+1
| | | | | | | | (From OE-Core rev: 0fae16b67542c59b059aa359146c38040785f200) Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/selftest: Add missing IDs to various test casesJose Perez Carranza2017-09-115-1/+25
| | | | | | | | | | | | | Add decorator @OETestID() with Tesopia TC-ID to the test cases that did not have it properly set. [YOCTO #11873] (From OE-Core rev: aa5b9edbd9c4495befe1912a5b401b536be39d5b) 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>
* selftest/prservice: Adapt to BB_SERVER_TIMEOUTRichard Purdie2017-08-311-1/+1
| | | | | | | | | | | | | In the memory resident mode, the user may not see a message about the server starting, it would be in the cookerdeamon logfile. We don't need this to test the server is functioning correctly so just drop the test. Add in an extra check that the file we expected to be created was created when exporting PR values. (From OE-Core rev: 811edd95420e907e71b5c7646bde5013b43d4c73) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: tinfoil: add a test for variable historyPaul Eggleton2017-08-311-0/+34
| | | | | | | | | | | | I recently found that variable history wasn't working properly for recipes when we enable history tracking, resulting in minor functionality loss in devtool upgrade, so add a test to ensure this doesn't regress now that it's fixed. (From OE-Core rev: f49042e707d641b59a71c687374b76df97c64c34) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: devtool: test find-recipe and edit-recipePaul Eggleton2017-08-311-8/+17
| | | | | | | | | | | | | | | We weren't testing the devtool find-recipe and edit-recipe subcommands, with the result that when they regressed recently we didn't notice. Add some code into the test_devtool_add to test this (since we need a recipe in the workspace, and adding a new test with all that preamble would seem a bit excessive for these simple checks). Also take the opportunity to refactor the test a little bit so that the recipe name and version are variables rather than hardcoding them everywhere. (From OE-Core rev: 355d8f42679e37610c2947dece597ed7db774bee) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* wic: setlftest: test expanding MBR imageEd Bartosh2017-08-271-0/+53
| | | | | | | | | | | | | Added test_expand_mbr_image test case to the wic oe-selftest suite. The test expands directdisk wic image to 1Gb target, checks if it's expanded correctly and boots it in qemu to make sure the image is bootable, i.e. bootloader, kernel, boot and root partitions are still functional. (From OE-Core rev: 83739174be5b3fabd7df559a35ac6407d82a6280) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runqemu: Use virtio to mount cdrom drivesRichard Purdie2017-08-231-1/+1
| | | | | | | | | | The IDE driver in the kernel is fragile and in 4.12 is causing backtraces. To unblock 4.12 kernel merging use the virtio CD driver instead to mount iso images which should be faster and more stable. (From OE-Core rev: f59e729f98ef9b506b0cfdc415567e03ec87f2a9) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* dnf: expand dnf selftest to test signed package feedsMarkus Lehtonen2017-08-161-1/+11
| | | | | | | | | [YOCTO #11209] (From OE-Core rev: 4d65421f381fc69397d7c61ba76488775e83e043) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa: fix dnf testsMarkus Lehtonen2017-08-161-1/+1
| | | | | | | | | | | | Rename one dnf runtime test that it will recognized as a python module and thus also found by the oe test loader. Also, fix value of TEST_SUITES in dnf selftest so that all test dependencies are satisfied and the runtime test may be successfully run from there. (From OE-Core rev: ee3be65aa1348798d385ead9b80c6a6ada21d6b0) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/tinfoil: Filter LogRecords in test_event_waitRichard Purdie2017-08-161-0/+3
| | | | | | | | | | As the code stands today, an event mask does not mask LogRecord events since the log levels are controlled separately. We therefore need to accept (and ignore) LogRecord events in this test to avoid errors. (From OE-Core rev: efe1f2c8ad09af3c5ee9c778601c7463c532b012) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: fix distrodata.py to use per-recipe UPSTREAM_VERSION_UNKNOWN settingAlexander Kanavin2017-08-161-9/+6
| | | | | | | | | | | ... instead of a global exception list which was problematic. [YOCTO #11896] (From OE-Core rev: 89dfede4ca795ba085f1ee7290c6dede573c11db) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests: limit the number of signature comparisons when differLeonardo Sandoval2017-08-131-14/+25
| | | | | | | | | | | | | For perfomance reasons, limit the number of signature comparisons when stamps differ. The limit set is hardcoded to 20. [YOCTO #11651] (From OE-Core rev: a2e2f434cd8d68b69e1ccdb7d7c17c0c73289866) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/buildoptions: remove unsafe-references-in-script testRoss Burton2017-08-131-18/+0
| | | | | | | | | This QA test is about to be deleted, so remove it from selftest. (From OE-Core rev: b9faf41ddc4510d484b5cbe8d182d8288fe00773) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/runtime_test: use subtests in test_postinst_rootfs_and_bootRoss Burton2017-08-131-33/+27
| | | | | | | | | | | | | | As this test has two nested loops and actually runs six times, use UnitTest.subTest() so we can tell which instance is failing, and to run all variations instead of failing on the first one. Also set PACKAGE_CLASSES to just the type we need to reduce the verboseness of the output, and consolidate the feature generation to be neater. (From OE-Core rev: c7ef6000b11f1b1cd27c9bc408eea9f76bb94a3b) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests: Use python function instead of bitbake-diffsigs scriptLeonardo Sandoval2017-08-091-3/+7
| | | | | | | | | | | | Using a python function instead of launching a subprocess fasten the diffsigs computation. [YOCTO #11651] (From OE-Core rev: 5dd65cf50273519fa45bd056b9ff342d9984a382) Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: Add a test for various hypervisor formatsTom Rini2017-07-301-0/+35
| | | | | | | | | | | | We add a new test that will create core-image-minimal for wic.vmdk, wic.vdi and wic.qcow2. We then confirm via qemu-img that the resulting file is of the expected type. Cc: Ed Bartosh <ed.bartosh@linux.intel.com> (From OE-Core rev: 1392fdeaf6acc7c8d2ff9a5a2bf6ef2f5928957d) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: Add a test for many CONVERSION_CMDs being chainedTom Rini2017-07-301-0/+30
| | | | | | | | | | | | Add a new test to create a long (and not otherwise useful) image, ext4.bmap.gz.bz2.lzo.xz.u-boot and also the sha256sum of it. Check that the resulting sha256sum is valid. Cc: Ed Bartosh <ed.bartosh@linux.intel.com> (From OE-Core rev: ac4402bff547b017284b12c1874d4094c169419d) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: Extend test_bmap to validate gzipTom Rini2017-07-301-2/+8
| | | | | | | | | | | | We extend the existing test_bmap test to also produce an ext4.bmap.gz file and then have gzip confirm that it contains valid gzip data. This tests that we are able to chain at least 2 CONVERSION_CMDs together. Cc: Ed Bartosh <ed.bartosh@linux.intel.com> (From OE-Core rev: 1e9ca92f84d9d5b4e56d47dfd4b3d7f9aba3d21b) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD typesTom Rini2017-07-301-4/+4
| | | | | | | | | | | | | | | | | The vmdk/vdi/qcow2 IMAGE_FSTYPEs predate wic. As such, they provide some similar underlying functionality in order to produce a "disk" image that in turn can be converted into different formats that various hypervisor types work with. They do not however provide the ability for other disk image types to be converted into these same output types. Furthermore, they are less flexible than what wic does provide. This drops the old style vmdk/vdi/qcow2 types and re-introduces them under the CONVERSION_CMD framework. The equivalent of vmdk is now wic.vmdk and so forth for the other types. (From OE-Core rev: 929ba563f1bc7195c4981b8e139c432b2cc388ea) Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: fix test_quemuEd Bartosh2017-07-301-1/+1
| | | | | | | | | | | This test case boots the image in qemu and checks for mounted partitions. As /boot is mounted automatically the test case fails. Fixed this by adding /boot to the list of mounted partitions. (From OE-Core rev: e5ba124b01ff6883a08c91daa47343dd09f6260d) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: change mkfs.btrfs optionsEd Bartosh2017-07-271-1/+1
| | | | | | | | | | | | | | | | test_mkfs_extraopts test case fails on ab with error caused by using -K --mixed options: output: extent-tree.c:2696: btrfs_reserve_extent: BUG_ON `ret` triggered, value -28 For this test case it's not important to use particular options, so changing options to anything less influential is OK. Changed extra options for mkfs.btrfs to '--quiet' to fix the failure. (From OE-Core rev: 6a1489f8deb2b26181ca340a0f6ef62aa18a5188) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: wic: add test_mkfs_extraopts test caseEd Bartosh2017-07-211-0/+19
| | | | | | | | | | | Test new wks option --mkfs-extraopts with all filesystems supported by wic. (From OE-Core rev: 79e853c450708e1e06684cf1216337cbad964770) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/cases/package: Call parent setUpClass methodAníbal Limón2017-07-211-0/+2
| | | | | | | | | | Since config paths are now passed in Test context the setUpClass method is expected to be call. (From OE-Core rev: 7281c995ff2b009c3fb23c7af1d91fe106ca8f87) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/eSDK: Ignore errors during directory cleanupRichard Purdie2017-07-211-1/+1
| | | | | | | | | | | | | | | The cleanup can fail with: ERROR [0.000s]: tearDownClass (eSDK.oeSDKExtSelfTest) FileNotFoundError: [Errno 2] No such file or directory: 'bitbake.sock' which is due to bitbake taking a small amount of time to shut down the server. The easiest fix is just to ignore these kinds of errors, bitbake shouldn't create any new files during shutdown. (From OE-Core rev: 68009f4eb323e07cec8c4421d546bd3125dec033) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* imagefeatures: add test_image_fstypes test caseEd Bartosh2017-07-171-0/+28
| | | | | | | | | | | | Tested if core-image-minimal can be built for existing fstypes by building an image and checking if result file <image>.<fstype> exists in the image deploy directory. (From OE-Core rev: 9db3dbde66e3590aea71400891eaea0ae2caf371) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: fixed 5 wic test casesEd Bartosh2017-07-171-4/+19
| | | | | | | | | | | | | | | | | Added core-image-minimal -> syslinux dependency to ensure syslinux artifacts are available from core-image-minimal build. This should fix test_iso_image, test_bootloader_config and test_default_output_dir test cases. Used --native-sysroot in test_image_vars_dir_long and test_image_vars_dir_short test cases to point out to wic-tools native sysrtoot. (From OE-Core rev: b7bcc4ba756aa3941c89999e9d6761738ea5bb05) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/tinfoil: Improve test_wait_event for race issuesRichard Purdie2017-07-081-9/+13
| | | | | | | | | | | | | | | | | | | | | | | | The test could break in a variety of ways: a) If BB_HEARTBEAT_EVENT was less than ~0.25 it would hang indefinitely b) The mask is set after draining the event queue meaning a heartbeat event could have happened c) The test exits once it sees the events it wants, it doesn't check for spurious events such as heartbeats which shouldn't have occured. d) The hardcoded delay of 0.25 is nasty and shouldn't be needed. I found a bitbake bug and fixed that meaning we don't need the delay any more which fixes d). That means a) is no longer an issue either. We now set the mask, then drain the queue meaning no spurious events should be able to sneak in. The test is also tweaked to wait for 5s in total to ensure spurious events don't occur such as heartbeat events we shouldn't see. [YOCTO #11045] (From OE-Core rev: 7dd5dfc4d56f1201110d947ce1ca3c6d64fbc7da) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* runcmd.py: unit testing for runCmd()Patrick Ohly2017-06-281-0/+117
| | | | | | | | | | | | | This covers the traditional API as well as the new output_log feature. While testing, it was noticed that killing hanging commands does not work when a shell is used to run the command(s). This might be worth fixing. (From OE-Core rev: 62489e58ca9975f58b48fc2bd8cf27fd22e25564) Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/archiver: only execute deploy_archives taskAndré Draszik2017-06-281-1/+1
| | | | | | | | | | | | | There should be no reason to execute a full build, as we're just interested in the deployment of the archives. The newly added tests already do the same. (From OE-Core rev: 78c2897dff7cd9fe2cab511549cb146d5231e573) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/archiver: add tests for recipe type filteringAndré Draszik2017-06-281-0/+76
| | | | | | | | | | | | | | | | The archiver used to be able to filter based on COPYLEFT_RECIPE_TYPES. Unfortunately, this got broken with the fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=6929 in commit ae9102bda398 ("copyleft_filter.bbclass: Allow to filter on name") Add two tests to prevent that from happening again. (From OE-Core rev: 709f02c5cb25983090251c6237bac4fc0a295c4f) Signed-off-by: André Draszik <adraszik@tycoint.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/seltest.py: Add test to check imports from other layersJose Perez Carranza2017-06-281-0/+51
| | | | | | | | | | | | | | This tests adds a check of selftest itself to verify if can add test from other layers. [YOCTO #9770] (From OE-Core rev: 4fe4c408246b9a4a563106d097876e6caefca694) Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> 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>
* selftest/devtool: Don't use removed remake as test caseJussi Kukkonen2017-06-281-2/+1
| | | | | | | | | | | remake was removed from oe-core: use another recipe in the devtool extract test. (From OE-Core rev: dbf680ce09ce54f97c781fc7a8e5e05ed4706073) Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oe-selftest: add a test for upstream version check regressionsAlexander Kanavin2017-06-281-0/+43
| | | | | | | | | | | | | | | | The test runs an upstream version check, and then compares the list of recipes that failed the check (i.e. those where latest upstream version could not be established) against the list of known-broken upstreams. Mismatches either way (upstream check failed, recipe not in the exception list, or upstream check worked, recipe in exception list) fail the test. [YOCTO #11031] (From OE-Core rev: 544e04a11ab6c26a367ac0b67774bf7ffdf43c88) Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: Add Testopia ID to test casesJose Perez Carranza2017-06-2312-0/+57
| | | | | | | | | | | Add decorator @OETestID() with proper Tesopia TC ID to the test cases that did not have it set. (From OE-Core rev: d7bc697534db911a3ce98537d772d87482a0f702) 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>
* selftest/devtool: replace file assertTrue/False with assertExists/NotExistsYeoh Ee Peng2017-06-231-65/+63
| | | | | | | | | | | | | | | | | | | | Current osselftest print confusing assertion message when using self.assertTrue(os.path.exists(filepath)) to test file path, example of confusing assertion message: AssertionError: False is not true Replce assertTrue/assertFalse with assertExists/assertNotExists to test file path, this will improve assertion message and simplify coding, self.assertExists(filepath) will print below AssertionError: <filepath> does not exist [YOCTO #11356] (From OE-Core rev: 08b0702492536d41d3cf2c9c05d1fab36d32a566) Signed-off-by: Yeoh Ee Peng <ee.peng.yeoh@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest/sstatetests: Fix potential failure on uniprocessor machinesRichard Purdie2017-06-141-1/+1
| | | | | | | | It was pointed out +1 is safer than -1 for systems with one processor. (From OE-Core rev: 78041e20e43d9583448ff31f8b9b1c6157da8625) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add test_wic_rm test caseEd Bartosh2017-06-141-0/+30
| | | | | | | | | | | Added test case for "wic rm" functionality. - remove file from vfat partition - remove directory from vfat partition (From OE-Core rev: fc42914d426ad2dad8c3026668726c003b3ab10b) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add test_wic_cp test caseEd Bartosh2017-06-141-1/+45
| | | | | | | | | | | Added test case for "wic cp" functionality. - copy file to vfat partition - copy directory to vfat partition (From OE-Core rev: cb416d1feea042bcdedc9f522d588fef2c4929bc) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* selftest: add new test case test_wic_lsEd Bartosh2017-06-141-0/+20
| | | | | | | | | | | Tested 'wic ls' functionality: - list of image partitions - list of directory content of vfat partition (From OE-Core rev: 3b271f6a40d7ef93fff9700dd8ac98bddd92d581) Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* sstatetests: Use higher parallelism valueRichard Purdie2017-06-141-2/+2
| | | | | | | | | Since the processing code for signature generation is now threaded, use higher thread values as examples in this code for better performance. (From OE-Core rev: f68ec7191546474f0bd688e57d2381a8e92be617) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
* oeqa/cases/oelib: Change default case class to unittest.case.TestCaseAníbal Limón2017-06-125-13/+13
| | | | | | | | | | | | | Some tests doesn't need call bitbake so it is better to use the basic unittest case class. [YOCTO #10828] (From OE-Core rev: 4d01610f36eaee8da3126bb5045856279371fd17) Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>