aboutsummaryrefslogtreecommitdiffstats
path: root/meta/lib
AgeCommit message (Collapse)Author
2015-11-25terminal: Open a new window instead of split on older tmux versions (<1.9)Leonardo Sandoval
If an old version is detected (<1.9), create a new window instead of split: the reason is that there is no easy way to get the active pane height if no nested formats are supported. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24package_manager.py: Delete installed_pkgs.txt fileMariano Lopez
This change removes the file installed_pkgs.txt after it was used for installation of complementary packages. This file was causing confusion when left in the WORKDIR after the build. Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24rootfs.py: Stop using installed_pkgs.txtMariano Lopez
The method _uninstall_unneeded uses the file installed_pkgs.txt, this file is left after the build and can cause confusion. This changes allow to get the installed packages using functions of rootfs instead of the installed_pkgs.txt file. With this change now is possible to remove the file without breaking anything. [YOCTO #8444] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24lib/oe/distro_check: don't set empty proxy keysRoss Burton
If the proxies dictionary has a proxy set to None urllib will throw an exception instead of not using a proxy (abridged stack): File: '/home/ross/Yocto/poky/meta/lib/oe/distro_check.py', lineno: 43, function: get_links_from_url *** 0043: with create_socket(url,d) as sock: 0044: webpage = sock.read() File: '/home/ross/Yocto/poky/meta/lib/oe/distro_check.py', lineno: 5, function: create_socket 0003:def create_socket(url, d): 0004: import urllib *** 0005: socket = urllib.urlopen(url, proxies=get_proxies(d)) File: '/usr/lib/python2.7/urllib.py', lineno: 87, function: urlopen 0086: if data is None: *** 0087: return opener.open(url) File: '/usr/lib/python2.7/urllib.py', lineno: 203, function: open 0201: else: 0202: proxy = None *** 0203: name = 'open_' + urltype 0204: self.type = urltype 0205: name = name.replace('-', '_') Exception: TypeError: cannot concatenate 'str' and 'NoneType' objects Filter out unset values so that the dictionary only has valid assignments in. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24lib/oe/copy_buildsystem: Don't expand BB_TASKDEPDATARichard Purdie
The value isn't a string so don't try and expand it. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24oeqa/selftest/sstatetests: prettier output for allarch testRoss Burton
Instead of creating two lists of full paths and comparing them which in failure produces a list of every stamp file (so all tasks, twice), reduce the filename down to a recipe/task->hash dictionary and compare those, meaning unittest shows the differences in the dictionaries. In the future get_files() should be generalised so all tests in this class can use it, and find a pair of hashes that don't match and run diffsigs on them. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24oeqa/selftest/signing: Added new test for signing sstate.Daniel Istrate
[YOCTO #8182] Optional signing sstate archives and signature verification [YOCTO #8559] Signing sstate archives with custom dir for gpg keys Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24oeqa/selftest/signing: New test for Signing packages in the package feeds.Daniel Istrate
[YOCTO # 8134] This test verifies features introduced in bug 8134. It requires as resources the files from meta-selftest/files/signing: For 'gpg --gen-key' the used input was: key: RSA key-size: 2048 key-valid: 0 realname: testuser email: testuser@email.com comment: nocomment passphrase: test123 Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-24classes: Ensure pass setVar/setVarFlag strings, not integersRichard Purdie
This doesn't cause any issues right now but it make sense to standardise on consistently using strings in the data store. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16oe-selftest: add test for bitbake-layers show-recipesPaul Eggleton
Add a test for bitbake-layers show-recipes including the recently added -i option. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16oeqa/selftest/layerappend: fix test if build directory is not inside COREBASEPaul Eggleton
Fix test_layer_appends to work when build directory is not inside COREBASE. Fixes [YOCTO #8639]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16oeqa/selftest/devtool: fix test if build directory is not inside COREBASEPaul Eggleton
Fix test_devtool_update_recipe_git to work when build directory is not inside COREBASE. Fixes [YOCTO #8639]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16qemurunner: Remove the timeout in run_serialMariano Lopez
Sometmes when there is high load in the server the commands executed in the target take a lot of time to complete and this lead to incorrect dump files or empty files. This is caused because run_serial has a timeout of five seconds when running the commands in the target. This change removes the timeout and just keep reading the socket until it finds the prompt from the target or when the socket is not ready to be read. [YOCTO #8510] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16qemurunner: Enable timestamps on kernel boot-upLeonardo Sandoval
Having the timestamps in the log is useful when debugging those cases when the booting time takes longer than expected. printk.times=1 enables stamping into every printk Kernel call. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16oeqa/runtime/multilib: run the arch tests on connmand not connman-appletRoss Burton
Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-11-16oeqa/runtime: remove dmesg testRoss Burton
This has been obsoleted by parselogs. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-27oeqa/utils/decorators: fix missing keyword arguments on decoratorsPaul Eggleton
We need to handle keyword arguments here or sending a keyword argument to a decorated function that accepts keyword arguments will trigger an error. (This showed up when testcase decorators were added to the recipetool.RecipetoolTests.test_recipetool_appendsrcfiles_basic_subdir test). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-24lib/oe/rootfs: tell intercepts where the native sysroot isRoss Burton
Some intercepts may want to access files in the native sysroot that are not on $PATH (such as something in $libexecdir) but any use of STAGING_DIR_NATIVE in the postinst that calls the intercept will be "baked" into the package, so if sstate is reused it will use paths that may not exist. Solve this by exporting the location of the native sysroot in the environment so the postinst and intercept can use an environment variable instead of a bitbake variable. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24oeqa/selftest: Added testcase decorators.Daniel Istrate
Added testcase decorators for testopia integration. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24qemurunner: Show the output of runqemu scriptMariano Lopez
This change will show runqemu output in the logs when running the runtime tests. This is helpful for debugging testimage errors. [YOCTO #8550] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24rootfs.py: add more info to the warning messageEd Bartosh
Since the log_check_regex can potentially be false positive it makes sense to print the whole line where error is found. This way user will be able to see the error and understand if it's valid or not. [YOCTO: #7789] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-24package_manager: fail if signed feeds are enabled for ipk or dpkgMarkus Lehtonen
Signed package feeds are not yet implemented for these package formats. Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-10-24package_manager: support GPG_PATH variableMarkus Lehtonen
If defined, use GPG_PATH as the gpg home directory when signing package feeds. This setting is only used by package_manager if package feed singning has been enabled, i.e. PACKAGE_FEED_SIGN="1". Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
2015-10-21oeqa/selftest: improve config writing and cleanupRoss Burton
The selftest.inc configuration file is deleted in both tearDown() and setUp() so there's no need to use addCleanup() to remove statements from it. Use write_config instead of append_config if the intention is to start from an empty config file, for clarity. Finally remove some misleading comments that claim that append_config() writes to local.conf when it doesn't. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: remove numbers from test namesRoss Burton
There isn't any required ordering of tests, and the numbers meant that the tests didn't appear in oe-selftest --list-classes. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest: clean up selftest.inc in teardownRoss Burton
Test cases may want to do call bitbake in setUpClass() but at that point the previous selftest.inc is still present which could change the build configuration and result in any built artifacts being removed in the next bitbake invocation as part of the sysroot clean up. Resolve this by cleaning selftest.inc in the tearDown, the clean in setUp should be considered a safety net. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: fix cleaningRoss Burton
In some situations the native tools built in setUpClass() are wiped from the sysroot by the time the tests are executed, likely due to the cleanup performed in the base setUp() method. Avoid this by doing all of the preparatory building in setUpLocal. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/wic: corrected testcase decorator for test18_iso_imageDaniel Istrate
Changed testcase decorator for TC test18_iso_image from 1264 to 1346. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest: verify that devtool can use plugins in other layersRoss Burton
In selftest we want to exercise devtool's ability to use plugins from other layers, so add a basic command to reverse a string to meta-selftest and a test in oe-selftest to call it. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/buildoptions: Use the correct script for cleaning the workdirLeonardo Sandoval
The script 'cleanupworkdir' does not exit, so changing it to 'cleanup-workdir'. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/bbtests: Updated bitbake TCsDaniel Istrate
- Added new TC test_force_task_1 (1354); check that do_package_write_rpm() re-executes upon changes in package image. - Updated TC test_force_task_2 (163); changed test recipe to zlib and added do_package() to the task execution list. - Removed unnecessary imports. Fix for bug [YOCTO #5875]. Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/bbtests: clean up local DL_DIR/SSTATE_DIR safelyRoss Burton
Now that the selftests clean selftest.inc in the tearDown using bitbake in a function passed to addCleanup (which happens after teardown) will use the default configuration and not the customised one. As the intention was to clean away the temporary DL_DIR and SSTATE_DIR, simple use track_for_cleanup to delete the entire directory instead. Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/utils/ftools: From functions that expect data, check if NoneLeonardo Sandoval
ftools functions that expect data may get 'None'; this patch does this check and return immediately if this is the case. Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/utils/ftools: Ignore the exception if file does not existLeonardo Sandoval
There may be cases where the configuration file (path) does not exist, thus the remove_from_file should catch this exception. In case the exception is not the latter (errno.ENOENT), then re-raise it. [YOCTO #8540] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21oeqa/selftest/manifest.py: Test support for manifestsBenjamin Esquivel
adding support for tests to verify that manifest contents contain entries that exist in an specified pkgdata dir tests added: - manifest.VerifyManifest.test_image_manifest_entries - manifest.VerifyManifest.test_SDK_manifest_entries test support written for future tests: -adding a setUpClass that supports other manifest tests -a get dir from bb var function that verifies if the dir exists -a ManifestEntry class defined with missing items list -check for the paths and fail gracefully if not there -debug prints for failure analysis [YOCTO#8028] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21populate SDK: prepare calling of bb.utils for exceptionsBenjamin Esquivel
bb.utils.remove, bb.utils.movefile and bb.utils.mkdirhier can throw exceptions that need handling and proper error messages more work is required for these methods to handle properly the exceptions that can be raised within the various OS calls they make but this is a start to at least not hide the errors in the requested operations [YOCTO#8213] Signed-off-by: Benjamin Esquivel <benjamin.esquivel@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-21devtool: handle virtual providersPaul Eggleton
For modify / extract / upgrade, if the specified "recipe" is not actually a recipe but a virtual target such as virtual/kernel, map it correctly to the actual recipe and make sure we use that name within the workspace. Thanks to Chris Larson for reminding me this was still broken and for a hint on how to fix it. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-19oeqa/runtime: Fix setUp and tearDown methodsMariano Lopez
Currently some of the runtime test overwrites the setUp and tearDown methods provided by oeRuntimeTest, this will avoid some checks required when running the test suit. This patch changes the setUp and tearDown methods for their local counterparts, so when these tests are called, it will run the parent setUp and tearDown and also the local ones. [YOCTO #8465] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-19oetest: Add tearDownLocal classMariano Lopez
In the current state there are some runtime test that don't run the tearDown method fromm oeRuntimeTest class because the tearDown class is overwritten in the child class. This change adds tearDownLocal method in oeRuntimeTest class that will run after tearDown. This method can be overwritten in the child classes to implement specific test functionality. [YOCTO #8465] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-14lib/oe/image.py: Fix dependency handling for compressed typesOtavio Salvador
The dependency code needs to also include the dependency of base types. For example: - sdcard.gz image with ext4 The dependency chain needs to include: - sdcard - ext4 - gz Until this change, the ext4 dependency were not being taken into account when using the compressed one. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-12lib/oe/distro_check: Remove '_proxy' on dict values used by urllib.openLeonardo Sandoval
There are two ways to pass the proxies values into urllib.open: exporting the environment variables *_proxy and passing as dictionary into the urllib.open call. The latter is currenty used and values should not have the '_proxy' string, so removing it. Also, ignore uppercase proxies, these are not taken into account by the library. Tested on a network with proxy, adding 'inherit +="distrodata"' on local.conf with the following commands for distrotask in distrodataall distro_checkall checklicenseall; do bitbake universe -c $distrotask done [YOCTO #7567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2015-10-03oeqa/utils/qemurunner: Add support for Unicode from qemuMariano Lopez
The current state of qemurunner will drop the Unicode characters received from qemu, this is because error report web had problems with Unicode characters; now that the server support Unicode, it is possible to log all the output from qemu. So far the only Unicode character seen is the copyright symbol. This patch allows to get Unicode characters from the qemu target and save the log in an UTF-8 file for latter use. [YOCTO #8225] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-03lib/oe/image.py: Add image generation for companion debug filesystemMark Hatle
The companion debug filesystem, enabled with IMAGE_GEN_DEBUGFS, was creating the companion filesystem but was missing the code to actually package it into a usable filesystem. The code (and associated documentation) will allow the debugfs to generate a companion tarball or other image. Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-03package_manager.py: sort output of OpkgPkgsList().listAndre McCurdy
Without explicit sorting, the output generated by OpkgPkgsList().list follows the order of packages in /var/lib/opkg/status, which appears to be "random". Add sorting to make OpkgPkgsList().list behaviour consistent with that of RpmPkgsList().list. Signed-off-by: Andre McCurdy <armccurdy@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-03oe-selftest: wic: fix LocalSetupEd Bartosh
Appended required features to build config every time LocalSetup is run to ensure that core-image-minimal is not rebuilt due to configuration changes. This should fix test22_mkgummidisk and test23_mkefidisk testcases as they depend on specific features set in LocalSetup. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01oeqa/runexported: Replaced optionparser with argparse.Lucian Musat
Also added the default json file name as default for the first positional argument. Signed-off-by: Lucian Musat <george.l.musat@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01testimage: Added IO commands to dumpsMariano Lopez
This change just add two more commands to the host dumps to get more information related to the IO. [YOCTO #8412] Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01Revert "oeqa/runtime: Added one runtime testcase in connman."Cristian Iorga
connman daemon forks during normal usage, so this test is no longer valid and generates sometimes false positives. This reverts commit 7d01c595c96eb3d67b90caf71050c4e9345257de. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01distrodata: Take account proxies on distrodata tasksLeonardo Sandoval
Proxies defined in the enviroment where not taken into account on the distrodata tasks. This commit implied passing the datastore into the distro_check library and context manager for the urllib.urlopen function. One way to run distrodata tasks is using 'universe' as target and the 'all' distrodata task: $ bitbake universe -c distrodataall $ bitbake universe -c distro_checkall $ bitbake universe -c checklicenseall Logs are located under TMPDIR/log [YOCTO #7567] Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-10-01oeqa/selftest/wic: Use SetupLocal instead of SetupRichard Purdie
If we replace the code Setup method, we don't get the cleanup it performs and this just resulted in failures on the autobuilder due to a stale config fragment. Setup will call SetupLocal so this should be a safe and easy fix to resolve the auobuilder failures. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>