summaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2015-07-16lib/oe/recipeutils: fix replace_dir_vars to return the correct variablesPaul Eggleton
If we sort by length of name here we get the variables we are interested in first. I've tested this with all of the variables we care about (the ones at the top of bitbake.conf) and it returns the right results. This fixes the failures we've been seeing in the oe-selftest test_recipetool_appendfile_* tests. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16oeqa/devtool: add useful failure messages for some test casesCostin Constantin
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16oeqa/buildoptions: add useful failure messages for all test casesCostin Constantin
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16oeqa/bblayers.py: add useful failure messages to all test casesCostin Constantin
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-16oeqa/bbtests: add useful failure messages for all test casesCostin Constantin
Signed-off-by: Costin Constantin <costin.c.constantin@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-12oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URIAníbal Limón
Recipes that don't have SRC_URI means that don't use upstream sources so returns 1.0. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12oeqa/sstatetests: Add NATIVELSB sstate signature equivalence testRichard Purdie
The sstate checksums should be independent of whichever NATIVELSBSTRING is detected. Add an automated QA test which tests this using bitbake -S. To make this possible, we need to be able to override the value of NATIVELSBSTRING so make a small change to allow this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12lib/oe/recipeutils: Ensure order of data store doesn't influence the resultRichard Purdie
The order of the keys from the data store is not prescribed. If target_datadir comes before datadir the selftests fail since the 'wrong' variable is used for substitutions. This highlights an issue with the replace_dir_vars() function. Fix this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08oeqa/selftest: Added 2 testcases and updated setup for other two in ↵Daniel Istrate
imagefeatures. Automated 2 oe-selftest testcases: - 1116: Check if clutter image can be built - 1117: Check Wayland support in image Updated setup for test_efi_gummiboot_images_can_be_build and test_wic_command_can_create_efi_gummiboot_installation_images to accomodate latest wic changes. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08oeqa/sstatetests: Add test for comparing 32 and 64 bit sstate checksumsRichard Purdie
The sstate checksums for both native and target should not vary whether they're built on a 32 or 64 bit system. Rather than requiring two different build machines and running a builds, override the variables calling uname() manually and check using bitbake -S. [YOCTO #5970] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08oeqa/bbtests: Fix to ensure DL_DIR is setRichard Purdie
write_config overwrites the config rather than appends to it, so ensure we write both variables in one go. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07oeqa/selftest: Added new testsuite for image features.Daniel Istrate
Automated 5 oe-selftest testcase: - 1107: Check if non root user can connect via ssh without password - 1115: Check if all users can connect via ssh without password - 1114: Check rpm version 4 support on image - 1101: Check if efi/gummiboot images can be buit - 1103: Check that wic command can create efi/gummiboot installation images Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07oeqa/selftest: Added @testcase decorators to oeselftest testcases.Daniel Istrate
Added decorator to some testcases missing this feature. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07oeqa/selftest: Add methods to manipulate bblayers.conf in base.pyDaniel Istrate
Added methods for manipulating bblayers.conf file in the same manner as local.conf file: - write_bblayers_config - append_bblayers_config - remove_bblayers_config Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-07oeqa/bbtests: Fix race over DL_DIR and SSTATE_DIRRichard Purdie
Running "-c cleanall" on shared DL_DIR and SSTATE_DIR is antisocial. It leads to hard to debug races where we wonder why files disappear and reappear from those directories. Fix this by using a specific set of directories for these tests. This avoids a long standing bug on the autobuilder where aspell and man sources would disappear. [YOCTO #6276] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02rootfs.py: Add check for kernel modules before running depmodSaul Wold
Add a check for kernel modules so we don't un-necessarily run the depmods, this will also handle the case with linux-dummy does not place the kernel-abiversion since it also does not have kernel modules. [YOCTO #7884] Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-07-02wic: Test rootfs plugin using rootfs pathsEd Bartosh
Added testcase to create multi-rootfs images using rootfs plugin with paths to rootfs directories in wic command line. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-02wic: Test rootfs plugin using image recipesEd Bartosh
Added canned wks and testcase to create multi-rootfs images referring bitbake image recipes. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-07-01oeqa/bbtests: Show useful failure message for gplv3 testRichard Purdie
If this test fails the current output tells us nothing about what happened. Show the exit status and output to aid debugging. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01oeqa/bbtests: Improve error handlingRichard Purdie
Currently if a test fails the cleanup isn't performed, leading to cascade failures in other tests. We can do better. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27oeqa/parselogs: Whitelist qemumips64 runtime errorRichard Purdie
Similarly to qemumips, ignore these errors upon bootup so that we have a good QA baseline for new errors. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27oeqa/parselogs: Whitelist qemuarm64 runtime errorsRichard Purdie
The qemuarm64 machine doesn't have graphics so whitelist the X server failures to start. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27oeqa/recipetool: Fix symlink resolutionRichard Purdie
Instead of readlink we need to use realpath to resolve any possible symlink in the file name. I'd got the two confused in the previous patch. This should really fix selftest failures on the autobuilder. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27oeqa/parselogs: Fixed a problem in parselogsLucian Musat
When the test passed it returned an error because grep did not return any error and the variable that held the results was being referenced but not assigned any value. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27oe.recipeutils: fix line.split error in bbappend_recipeChristopher Larson
Cc: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Christopher Larson <kergoth@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe/rootfs.py: DpkgRootfs/OpkgRootfs add support for dependency handling in ↵Aníbal Limón
postinsts scripts. The old code don't take into account package dependencies causing undefined execution order in postinsts scripts, in order to fix: Add DpkgOpkgRootfs class for store common operations in DpkgRootfs and OpkgRootfs. Add _get_delayed_postinsts_common method that process Depends from status file in dpkg/opkg and resolve dependency order causing an execption if found circular dependencies. [YOCTO #5318] Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26terminal.py: Allow devshell/menuconfig on recent gnome-terminalLeonardo Sandoval
Recent versions of gnome-terminal does not support non-UTF8 charset: https://bugzilla.gnome.org/show_bug.cgi?id=732127 as a result, devshell and menuconfig tasks silently hang (error found on trace log of 'strace -f -v -s 8192 -e write=2 bitbake -c devshell quilt-native': "Non UTF-8 locale (ANSI_X3.4-1968) is not supported!"). As a workaround, clearing the LC_ALL environment variable so it uses the locale. Once fixed on the gnome-terminal project, this should be removed. Tested on gnome-terminal versions: GNOME Terminal 3.4.1.1 GNOME Terminal 3.14.2 (Default on Ubuntu 15.04) [YOCTO #7791] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-26wic: oe-selftest: Test image compressingEd Bartosh
Added 4 new testcases for 'wic --compress-with <compressor>' functionality. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-26oeqa/selftest/recipetool: Fix appendfile_binary test on opensuse131Richard Purdie
On OpenSUSE 13.1, /bin/ls is a symlink to /usr/bin/ls. This means the test doesn't use a binary file an fails on that system. Ensure we resolve any symlink using readlink to avoid this failure. ====================================================================== FAIL: test_recipetool_appendfile_binary (oeqa.selftest.recipetool.RecipetoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/recipetool.py", line 115, in test_recipetool_appendfile_binary self.assertIn('WARNING: ', result.output) AssertionError: 'WARNING: ' not found in 'Parsing recipes..done.\nNOTE: Writing append file /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils_8.23.bbappend\nNOTE: Copying /bin/ls to /tmp/recipetoolqai0NY8l/recipes-core/coreutils/coreutils/ls' [YOCTO #7920] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26lib/oe/patch: Fix git patch application for source in subdirectoryRichard Purdie
Similarly to: http://git.yoctoproject.org/cgit.cgi/poky/commit/meta/lib/oe/patch.py?id=f205ccaf48ac36f4b26efc4aeb2e9d2939b28646 we need to fix patch application for source which is in a subdirectory. Passing "." as the git directory or work-dir appears to work (or is ignored) in some versions of git but does not work in others, probably quite correctly. Since we have reporoot from the above patch, pass this in directly. This bug caused this sanity test failure on some machines: FAIL: test_devtool_modify_git (oeqa.selftest.devtool.DevtoolTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/devtool.py", line 390, in test_devtool_modify_git self.assertEqual(result.output.strip(), "", 'Created git repo is not clean') AssertionError: '?? util/mkelfImage/patches/' != '' : Created git repo is not clean since git apply would fail, it would then fall back to quilt and the git tree would be left unclean. [YOCTO #7911] Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe/utils.py: Add support for init/end helper functions in ThreadWorker.Aníbal Limón
Add init/end helper functions for ThreadWorker also pass ThreadWorker as first argument to init/end/func functions this enables per-thread storage handling. classes/sstate.bbclass: Add thread_worker argument to checkstatus function. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26oe/utils.py: Fix thread leakage in ThreadPoolAníbal Limón
In order to fix Thread leakage caused by not call join() in Threads, Pass num_tasks in ThreadPool for add all the tasks into a Queue this enable catch of Queue.Empty exception and exit the threads. classes/sstate.bbclass: Change checkstatus function to match new ThreadPool operation. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23meta: Add explict getVar param for (non) expansionRichard Purdie
Rather than just use d.getVar(X), use the more explict d.getVar(X, False) since at some point in the future, having the default of expansion would be nice. This is the first step towards that. This patch was mostly made using the command: sed -e 's:\(getVar([^,()]*\)\s*):\1, False):g' -i `grep -ril getVar *` Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23wic: oe-selftest: Add 3 tests of 'wic help' commandEd Bartosh
Added tests for 'wic test overview', 'wic test plugins' and 'wic test kickstart' commands. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23wic: Return error code when wic fails to invoke commandEd Bartosh
Return 1 if command doesn't exist or wic is called without any commmand. Return result of invoke_command as wic return code. Added tests for unsupported command and no command. Fixed typo in test case test02_createhelp spotted by this fix. [YOCTO #7856] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-23oe-selftest: wic: Fix testcaseEd Bartosh
Fixed test05_build_artifacts testcase by using values of MACHINE and BUILD_SYS bitbake variables in paths to artifacts. Test was failing because of hardcoded machine(qemux86) and build_sys(qemux86-poky-linux) in artifact paths. [YOCTO #7730] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
2015-06-18devtool: deploy: fix preservation of symlinks and permissions/ownershipPaul Eggleton
It turns out that scp can't be used to copy symlinks because it follows them instead of copying them, and this is by design (since it emulates rcp which also behaved this way); the unfortunate result is that symlinks that point to valid files on the host translate into the host file being copied to the target (yuck). The simplest alternative that does not have this undesirable behaviour is to use tar and pipe it over ssh. At the same time, it would be even better if we properly reflect file permissions and ownership on the target that have been established within the pseudo environment. We can do this by executing the copy process under pseudo, which turns out to be quite easy with access to the pseudo environment set up by the build system. Fixes [YOCTO #7868]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-18lib/oeqa/utils/commands: ensure get_bb_var() works when value contains =Paul Eggleton
Only split on the first equals character so that values that contain equals characters (such as FAKEROOTENV) can be retrieved. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-11oeqa/parselogs: Added some more errors to the whitelist.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11oeqa/parselogs: The logs are now copied and parsed locally.Lucian Musat
This is to fix a problem with reaching the limit of the whitelist size. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11oeqa/utils: Added timeout decorator for testcases.Lucian Musat
Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11image: Support for VDIJuro Bystricky
Added support for VirtualBox VDI format. The support was implemented by merging with the already existing VMDK support for VM player by creating a new class image-vm.bbclass. This class replaces the previous VMDK only image-vmdk.class. Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: oe-selftest: Configure testing of gpt/UUID imageEd Bartosh
Added runtime dependency to gptfdisk-native to wic test suite to be able to test modified directdisk-gpt with UUID support. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11wic: Test creation of directdisk image with GPT tableEd Bartosh
Added new wic testcase to the sute - creation of directdisk-gpt image. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-11lib/oe/rootfs: tidy up log warning reportingPaul Eggleton
* bb.warn() should only be called once per warning - UIs such as Toaster assume that this is the case, so adjust the output accordingly. (It's tricky here because we have to include "log_check" on every line or we'll end up looping forever as the log checking code's own messages retrigger the log check, sigh...) * Iterating over a file already splits by line, there's no need to do it manually. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2015-06-08recipeutils: Improve get_recipe_pv_without_srcpv functionAníbal Limón
Use pv instead of rd this make the function more generic and avoid copy recipe data. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2015-06-03recipeutils: Add get_recipe_upstream_version and get_recipe_pv_without_srcpv ↵Aníbal Limón
functions The get_recipe_upstream_version functions tries to get the current version of recipe in upstream it uses bb.fetch2 latest_versionstring method also latest_revision when is SCM. The get_recipe_pv_without_srcpv discards the SRCPV in SCM's recipe like git it returns a tuple with the version, prefix and suffix of a PV. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-06-01oe/utils: Add simple threaded pool implementationRichard Purdie
Python 2.7 doesn't have a threaded pool implementation, just a multiprocessing one. We have need of a threaded implementation so add some simple class code to support this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-23image.bbclass: Add a method for creating a companion debug filesystemMark Hatle
The companion debug filesystem contains only the package database and the complementary *-dbg packages for the main filesystem component. This is useful in a production environment to produce a companion filesystem capable of remote system debugging, without requiring corresponding debug symbols or source code on the device. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> If dbg pkgs have already been installed to the rootfs image, the installation to companion debug filesystem will fail, because both of image creation make use of the same pm database. In this situation, try to copy installed dbg files from rootfs image to companion debug filesystem. Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Robert Yang <liezhi.yang@windriver.com> Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Acked-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-23oe-selftest: Build wic runtime requirements and images before testingEd Bartosh
Some native tools (syslinux, parted, mtools, etc) are required by wic to produce images. Unit tests fail if the tools are not available. Baked tools and image-core-minimal used by wic before running tests. [YOCTO #7730] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>