Commit Graph

726 Commits

Author SHA1 Message Date
Costin Constantin 9d02d3fd02 oeqa/pkgdata: add useful failure messages to test cases
(From OE-Core rev: 0884dc483e5111021d700e9a509c478de2e431b3)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Daniel Istrate 7d01c595c9 oeqa/runtime: Added one runtime testcase in connman.
(testcase 223) Check that only one connmand runs in background.

(From OE-Core rev: 904a3f2c772980b5dc65ef61a0aad23768fcb8dc)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Aníbal Limón 6deffe1258 recipeutils.py: get_recipe_pv_without_srcpv remove prefixes from pv
Some recipes uses v or r prefixes in versions that makes wrong
comparisions over recipes like lz4 r123 > 128.

(From OE-Core rev: f7d250c97f40a737df9020180852d2ee87ca06b3)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Aníbal Limón 74240ccbfa oe/recipeutils.py: get_recipe_upstream_info update to get revision
Bitbake fetcher latest_versionstring now returns a tuple with (version,
 revision) that helps SCM's like git to build current upstream version.

[YOCTO #7605]

(From OE-Core rev: 7ede979950fd265026c74526d8448627fd0a8c08)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Aníbal Limón e28c1eb708 oe/recipeutils.py: get_recipe_upstream_info only use sfx and pfx when exits
Don't use pfx and sfx when not exist because cause formatting errors
like 2.9HASH instead of 2.9+gitAUTOINC+HASH.

(From OE-Core rev: 382833cc7e7603241838e18e429f69da0c2ee4ac)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-23 08:48:37 +01:00
Daniel Istrate d6fa512d90 oeqa/selftest: Fix imagefeature testcases not to interfere with testimage on AB
[YOCTO #8017] - selftest does not use pkill qemu
[YOCTO #7976] - tests do not touch .ssh/known_hosts
              - don't hardcode qemu IP
[YOCTO #8027] - use qemu nographic
Extra: removed unnecessary assert for bitbake and runCmd status

(From OE-Core rev: f58df3a630b774083934171463b2b07add29dc0e)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-21 23:56:17 +01:00
Richard Purdie fbec9200fd lib/oe/package_manager: Use log-level warning instead of quiet
quiet means that no warnings are shown on the console and really is too
quiet for our needs. This is more verbose but that is better than too
little and does aid debugging things when they go wrong.

(From OE-Core rev: 9de391260e4491a4852410adf1009a1fa0c72a5c)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-20 10:40:41 +01:00
Paul Eggleton 723411dd92 lib/oe/recipeutils: fix replace_dir_vars to return the correct variables
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.

(From OE-Core rev: 95c54512c9fcdbaa419891e46fd99102722ba3d8)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:25 +01:00
Costin Constantin 4d77270c2d oeqa/devtool: add useful failure messages for some test cases
(From OE-Core rev: b6a66026ef547eb34c6019d2ac7da90b90741dad)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:25 +01:00
Costin Constantin 74dc0c833f oeqa/buildoptions: add useful failure messages for all test cases
(From OE-Core rev: 4d027bbb067cf508d73c0e23a77bbf430388b13f)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:25 +01:00
Costin Constantin eeed010b17 oeqa/bblayers.py: add useful failure messages to all test cases
(From OE-Core rev: 3d157c146659a9b976e61ae93d766773f9f21b4f)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:24 +01:00
Costin Constantin 2606cd2774 oeqa/bbtests: add useful failure messages for all test cases
(From OE-Core rev: a6b9cbb08f6052fbfad53444cd0e9eba8599d7b1)

Signed-off-by: Costin Constantin <costin.c.constantin@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-16 15:09:24 +01:00
Aníbal Limón 75c877b3cc oe/recipeutils.py: get_recipe_upstream_version returns 1.0 when not SRC_URI
Recipes that don't have SRC_URI means that don't use upstream sources
so returns 1.0.

(From OE-Core rev: 92f2481cf88e7b626cfe604134c9d020d06bd32c)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:45 +01:00
Richard Purdie e9817d59d3 oeqa/sstatetests: Add NATIVELSB sstate signature equivalence test
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.

(From OE-Core rev: 2da156d491caf25dfa3efd567d6dbb451dd7e9dc)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:38 +01:00
Richard Purdie b60521c9b3 lib/oe/recipeutils: Ensure order of data store doesn't influence the result
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.

(From OE-Core rev: d47c496aa058f5b18d03a68bcd79e5c8607de34f)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-12 22:55:38 +01:00
Daniel Istrate 975cb960aa oeqa/selftest: Added 2 testcases and updated setup for other two in 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.

(From OE-Core rev: cf3e145bb6823fb22e2701a9a7e0623e4c4a1791)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:20 +01:00
Richard Purdie 9fa842addc oeqa/sstatetests: Add test for comparing 32 and 64 bit sstate checksums
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]

(From OE-Core rev: da91637dd6991ae085ce82d932f1053d820b0cc4)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-09 18:00:17 +01:00
Richard Purdie 0aaa67a790 oeqa/bbtests: Fix to ensure DL_DIR is set
write_config overwrites the config rather than appends to it, so
ensure we write both variables in one go.

(From OE-Core rev: 50a37ee563d9003e21bfb9280f184cd81c62e9bf)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 13:09:28 +01:00
Daniel Istrate 923fb2e558 oeqa/selftest: Added new testsuite for image features.
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

(From OE-Core rev: ea414da3ecc59a48a0f2fb719fc86538b47fafb8)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:01:19 +01:00
Daniel Istrate ffa54b94b6 oeqa/selftest: Added @testcase decorators to oeselftest testcases.
Added decorator to some testcases missing this feature.

(From OE-Core rev: 2a9009583fd498df94a55f21a149e302180f19cc)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:01:19 +01:00
Daniel Istrate 9f91aa697f oeqa/selftest: Add methods to manipulate bblayers.conf in base.py
Added methods for manipulating bblayers.conf file in the same manner as local.conf file:
    - write_bblayers_config
    - append_bblayers_config
    - remove_bblayers_config

(From OE-Core rev: 477ed5931f40dd504a2ae3e184c09153f4fa9735)

Signed-off-by: Daniel Istrate <daniel.alexandrux.istrate@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-08 00:01:18 +01:00
Richard Purdie a24fdcae86 oeqa/bbtests: Fix race over DL_DIR and SSTATE_DIR
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]

(From OE-Core rev: 6b089c4a79dc3aae00c8a6e7ab0f6ba4b4b5f138)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-07 13:33:27 +01:00
Saul Wold 38d8f2eb9f rootfs.py: Add check for kernel modules before running depmod
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]

(From OE-Core rev: 1b696a45ddb00fbe1d993b19339071486d0cfef2)

Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:39 +01:00
Ed Bartosh 673343414f wic: Test rootfs plugin using rootfs paths
Added testcase to create multi-rootfs images using rootfs plugin
with paths to rootfs directories in wic command line.

(From OE-Core rev: 8becfc2281282a2e63b3bf511936df36315c9cb1)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:36 +01:00
Ed Bartosh b42d7d26e1 wic: Test rootfs plugin using image recipes
Added canned wks and testcase to create multi-rootfs images referring
bitbake image recipes.

(From OE-Core rev: 723ed56eda0e64b9678b846ef2001465b15e0c1b)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-02 23:08:35 +01:00
Richard Purdie 3360f9343d oeqa/bbtests: Show useful failure message for gplv3 test
If this test fails the current output tells us nothing about what happened.
Show the exit status and output to aid debugging.

(From OE-Core rev: e54437b7e7c5f1b8c33627b3914f896724207837)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01 15:39:59 +01:00
Richard Purdie 58ecd46c64 oeqa/bbtests: Improve error handling
Currently if a test fails the cleanup isn't performed, leading to cascade
failures in other tests. We can do better.

(From OE-Core rev: db01d6ba2ce87e1586dc8804dd823a0a038d5794)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-07-01 15:39:59 +01:00
Richard Purdie 4bc0fc70b9 oeqa/parselogs: Whitelist qemumips64 runtime error
Similarly to qemumips, ignore these errors upon bootup so that
we have a good QA baseline for new errors.

(From OE-Core rev: 592a1d94a7b0e80059016adb59c4c61e256206f0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:50:41 +01:00
Richard Purdie 6dba7a07a7 oeqa/parselogs: Whitelist qemuarm64 runtime errors
The qemuarm64 machine doesn't have graphics so whitelist the
X server failures to start.

(From OE-Core rev: 4e1b7773e480a05ac791fcceca23889ef9919aa7)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:50:41 +01:00
Richard Purdie e77c23cc35 oeqa/recipetool: Fix symlink resolution
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.

(From OE-Core rev: 878764ab7252f9b5b67b697dcd51b961b673fda0)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:56 +01:00
Lucian Musat 608bf2228d oeqa/parselogs: Fixed a problem in parselogs
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.

(From OE-Core rev: 0f5c2fb975010cf6e8154384b764a2c9da1b371e)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:55 +01:00
Christopher Larson 83a6611248 oe.recipeutils: fix line.split error in bbappend_recipe
Cc: Paul Eggleton <paul.eggleton@linux.intel.com>
(From OE-Core rev: 8d18c2e71b0fcb047831a67d93f4b489aff1b77d)

Signed-off-by: Christopher Larson <kergoth@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:55 +01:00
Aníbal Limón b2c9e7347a oe/rootfs.py: DpkgRootfs/OpkgRootfs add support for dependency handling in 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]

(From OE-Core rev: ed52d1040ee8be0bfa080d5679c583b1012bb575)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:52 +01:00
Leonardo Sandoval a8ae7317e2 terminal.py: Allow devshell/menuconfig on recent gnome-terminal
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]

(From OE-Core rev: ec79684a1eb594099d342a416ba3f5ad0b342a53)

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>
2015-06-27 22:42:51 +01:00
Ed Bartosh e6f29dd712 wic: oe-selftest: Test image compressing
Added 4 new testcases for 'wic --compress-with <compressor>' functionality.

(From OE-Core rev: 0ffc5c38ef28605abf815a47eb41923802d31df7)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-27 22:42:50 +01:00
Richard Purdie ffd7cac8f6 oeqa/selftest/recipetool: Fix appendfile_binary test on opensuse131
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]

(From OE-Core rev: 792107de1586336f4a734557c0c3fa36a1174e9e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:31 +01:00
Richard Purdie d85231ef14 lib/oe/patch: Fix git patch application for source in subdirectory
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]

(From OE-Core rev: 91d76e632336d6af96f24bcf92be25f41a216856)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:30 +01:00
Aníbal Limón 615b351bf4 oe/utils.py: Add support for init/end helper functions in ThreadWorker.
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.

(From OE-Core rev: 08c50d62b520c8405f034e3d7adeea89e06226ee)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:30 +01:00
Aníbal Limón 3fa32158c4 oe/utils.py: Fix thread leakage in ThreadPool
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.

(From OE-Core rev: 524d92ed7b53bef933527095e82f378b934f25ef)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-26 09:27:30 +01:00
Richard Purdie 86d30d756a meta: Add explict getVar param for (non) expansion
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 *`

(From OE-Core rev: ab7c1d239b122c8e549e8112c88fd46c9e2b061b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:57:25 +01:00
Ed Bartosh 4862a4c33a wic: oe-selftest: Add 3 tests of 'wic help' command
Added tests for 'wic test overview', 'wic test plugins' and
'wic test kickstart' commands.

(From OE-Core rev: 2009df2aa048bb51b7b3050b69a44fe414c4de9d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:35 +01:00
Ed Bartosh 40764a309d wic: Return error code when wic fails to invoke command
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]

(From OE-Core rev: ebd9f7b1da8ed556e98aab4d5f4e81707ac44b27)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:34 +01:00
Ed Bartosh 410e272591 oe-selftest: wic: Fix testcase
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]

(From OE-Core rev: dda85cd420d47d97b0d0b0f294b37cd6066c541c)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-23 11:47:30 +01:00
Paul Eggleton 2054b29dd7 devtool: deploy: fix preservation of symlinks and permissions/ownership
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].

(From OE-Core rev: 69adaed0e982d627ebfa57b360b0ee049ea7a276)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-18 09:14:06 +01:00
Paul Eggleton e22c18113b lib/oeqa/utils/commands: ensure get_bb_var() works when value contains =
Only split on the first equals character so that values that contain
equals characters (such as FAKEROOTENV) can be retrieved.

(From OE-Core rev: ff720dd3b77130b2c485d7acad63735fd8751a7d)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-18 09:14:06 +01:00
Lucian Musat 7a4d72dc18 oeqa/parselogs: Added some more errors to the whitelist.
(From OE-Core rev: 70f514719b1bac2a478bc05afd5382b3a26a419a)

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-06-11 23:59:18 +01:00
Lucian Musat ee663961bb oeqa/parselogs: The logs are now copied and parsed locally.
This is to fix a problem with reaching the limit of the whitelist size.

(From OE-Core rev: 7f49f098cff1848ab7bd25a6a232b09b4f0b4b03)

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-06-11 23:59:18 +01:00
Lucian Musat ad0aa8d548 oeqa/utils: Added timeout decorator for testcases.
(From OE-Core rev: c6fe26ade5734efb5250e00c56fdbb4095b0018b)

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-06-11 23:59:17 +01:00
Juro Bystricky a13c51e751 image: Support for VDI
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.

(From OE-Core rev: 0a3e8eb9f592c3f1edd2c7521855f7406541651a)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11 23:59:13 +01:00
Ed Bartosh 998273aee2 wic: oe-selftest: Configure testing of gpt/UUID image
Added runtime dependency to gptfdisk-native to wic test suite to
be able to test modified directdisk-gpt with UUID support.

(From OE-Core rev: 16e7d43cd4a4d16e498152764a8dbc8b933eef89)

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>
2015-06-11 23:59:12 +01:00
Ed Bartosh 921ea71607 wic: Test creation of directdisk image with GPT table
Added new wic testcase to the sute - creation of directdisk-gpt
image.

(From OE-Core rev: 73762747dfda5013563f15b13bcb19b40d0f69d9)

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>
2015-06-11 23:59:11 +01:00
Paul Eggleton 0090170e77 lib/oe/rootfs: tidy up log warning reporting
* 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.

(From OE-Core rev: 8dfdd329f0137cab8cab97e1d0c1181810fe5b32)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-11 23:59:09 +01:00
Aníbal Limón a8c746743e recipeutils: Improve get_recipe_pv_without_srcpv function
Use pv instead of rd this make the function more generic and
avoid copy recipe data.

(From OE-Core rev: c1c3c9a4fbaf01a905f79b0970f98ccb221a3935)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-08 17:34:05 +01:00
Aníbal Limón 8c6bd8a843 recipeutils: Add get_recipe_upstream_version and get_recipe_pv_without_srcpv 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.

(From OE-Core rev: d1683b5bb584e2b09bda76bf8523b12636d91d73)

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>
2015-06-03 16:38:45 +01:00
Richard Purdie 5331bbc1ac oe/utils: Add simple threaded pool implementation
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.

(From OE-Core rev: 44ae778fefca5112900b870be7a485360c50bc2e)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-06-03 16:38:45 +01:00
Mark Hatle 7a7c6b021f image.bbclass: Add a method for creating a companion debug filesystem
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.

(From OE-Core rev: 1a6ed48c65f922c66b005aa966d7ee4878ee95e3)

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-24 07:19:21 +01:00
Ed Bartosh 29d5503a54 oe-selftest: Build wic runtime requirements and images before testing
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]

(From OE-Core rev: 379c9bb7ffae5b40c5450e968cdde600b6edd3f3)

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>
2015-05-24 07:19:20 +01:00
Ross Burton a60aeca3f5 utils: add helper to perform the intersection of two string lists
Useful for e.g. generating a COMBINED_FEATURES list from DISTRO_FEATURES and
MACHINE_FEATURES.

(From OE-Core rev: c5b6f672b88f5f42fe0bd59d28104b8dc9ee9a6e)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-24 07:19:19 +01:00
Peter Seebach 65c0027940 rootfs.py: Make set -x not break rootfs creation
The rootfs logfile check errors out if it finds an "exit 1" in
a log. But consider the shell idiom:
	if ! $command; then exit 1; fi
and consider a postinstall script with a "set -x" for debugging
purposes (to get log output in /var/log/postinstall.log.)

Solution: Ignore lines prefixed with a +, because those show shell
code even if a specific fragment won't be executed.

(From OE-Core rev: f23f129dba66144abf8fe8450320e01fa4c02f5c)

Signed-off-by: Peter Seebach <peter.seebach@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-24 07:19:18 +01:00
Ed Bartosh a0cbb5ba31 rootfs.py: Improve rpm log_check_regex
Current regex can cause false negatives if paths in bitbake log files
contain "ERR" or "Fail". do_rootfs fails with return code 1 in
this case.

Improved regexp is based on error messages produced by rpm.
Those are found by analyzing rpm source code.

[YOCTO #7789]

(From OE-Core rev: 38871dc0295fb2516e1c8b1dc9948c2d2fc4d2cd)

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>
2015-05-22 13:29:47 +01:00
Paul Eggleton 7539c1f889 devtool: update-recipe: add option to write changes to bbappend
Quite often what you want to do having made customisations to a piece of
software is to apply those customisations in your own layer rather than
in the original recipe. Thus, add a -a/--append option to the
update-recipe subcommand which allows you to specify the layer to write
a bbappend into. The bbappend will be created at the appropriate path
within the specified layer directory (which may or may not be in your
bblayers.conf) or if one already exists it will be updated
appropriately.

(This re-uses code written for recipetool appendfile.)

Implements [YOCTO #7587].

(From OE-Core rev: 87d487ea4fdfb6cd30e3b3fad47732db12e86f23)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-20 21:41:04 +01:00
Paul Eggleton fbfc06a969 recipetool: add appendfile subcommand
Locating which recipe provides a file in an image that you want to
modify and then figuring out how to bbappend the recipe in order to
replace it can be a tedious process. Thus, add a new appendfile
subcommand to recipetool, providing the ability to create a bbappend
file to add/replace any file in the target system. Without the -r
option, it will search for the recipe packaging the specified file
(using pkgdata from previously built recipes). The bbappend will be
created at the appropriate path within the specified layer directory
(which may or may not be in your bblayers.conf) or if one already exists
it will be updated appropriately.

Fairly extensive oe-selftest tests are also provided.

Implements [YOCTO #6447].

(From OE-Core rev: dd2aa93b3c13d2c6464ef0fda59620c7dba450bb)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-20 21:41:04 +01:00
Paul Eggleton c63adf5c5b oe-selftest: move recipetool tests to their own module
These tests really belong in their own module; if we refactor
out a base class from DevtoolTests with shared functions then we can
move them out easily. Also create temp directory in setupLocal() so we
don't have to do that in individual tests anymore.

(From OE-Core rev: 2f88f6e7b2e54b13376338354aae1d61c0c0db60)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-20 21:41:04 +01:00
Paul Eggleton 2298b4a03e lib/oe/patch: use with open() for all file operations
with open(...)... is preferred for reading/writing files as it is neater
and takes care of closing the file for you.

(From OE-Core rev: 99ac382d84667eb496dc510d3277b8c55b237738)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-20 21:41:04 +01:00
Paul Eggleton 5796fe4591 lib/oe/recipeutils: add a parse_recipe_simple() function
Add a function that simply parses a recipe by name and optionally the
bbappends that apply to it. (Note that if you're using tinfoil you need
to have initialised it with config_only=False so that it can map the
recipe name to a recipe file.)

(From OE-Core rev: a8f221f6c6c0562a5ed06438231c2906e542fb7b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-16 22:31:51 +01:00
Lucian Musat 3e7dde7d16 oeqa/utils: Fixed a problem with get_bb_var not returning right variable.
It searches using regex now and should be more accurate.

(From OE-Core rev: 1ae7e1cc4a5c7a217dee937c330539e5c8ac794d)

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-05-14 11:44:00 +01:00
Aníbal Limón b394cd4c7e license: Add support for handle INCOMPATIBLE_LICENSE in manifest creation
When INCOMPATIBLE_LICENSE's is specified it need to be removed from
license.manifest and also avoid copy to target image.

Add ManifestVisitor that walk the license string searching for
INCOMPATIBLE_LICENSE's if found remove it.

[YOCTO #6765]

(From OE-Core rev: d1278570041029d7c9fc6ce657e9a1701a421841)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09 22:28:14 +01:00
Aníbal Limón bb3469f9d3 license: Split visit_string in LicenseVisitor
Create get_elements and visit_elements in LicenseVisitor based
on visit_string this allow to do modifications on elements before
parsing with AST.

(From OE-Core rev: c16cf0a0331d128e4ba7341fe28510a9bfb7ee16)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09 22:28:14 +01:00
Aníbal Limón 8c7082de0a license_class: Generalize license_ok function
Add dont_want_licenses as parameter to license_ok function and move it
to oe.license module in order to use in other modules.

(From OE-Core rev: 243fe3a4583a21ad6c0b2a26196ed18d41740f7a)

Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-09 22:28:14 +01:00
Paul Eggleton 4a711028c7 oe-selftest: devtool: add a proper test to see if tap devices exist
Check up front in test_devtool_deploy_target whether the tap devices
exist and skip if not. If we don't do this we get a significantly less
comprehensible error via pexpect.

(From OE-Core rev: 2258345e19efff7717fe19a5026ec55f1b6f90b6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07 14:59:43 +01:00
Paul Eggleton 1f15117404 devtool: fix for rename of gcc-source
After OE-Core commit 67db7182faf6742b0d971d61d8c5ba34f69d2e12, PV is
appended to the end of the gcc-source PN, thus we need to handle that in
devtool and the corresponding test.

Part of the fix for [YOCTO #7729].

(From OE-Core rev: 440029dc229a566b9bead1481215d5e5760c5fe6)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07 14:59:43 +01:00
Paul Eggleton b7cff751fd oe-selftest: devtool: fix broken URL in test_devtool_add_fetch
I already had the file fetched from some previous work and thus it
didn't attempt to download the invalid URL when I tested it earlier.

Part of the fix for [YOCTO #7729].

(From OE-Core rev: f9bad5aeb507f5b3c1346118011c7766c44d9ba4)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-07 14:59:43 +01:00
Ed Bartosh fd254d007f wic tests: Move wic tests to oe-selftest infra
Modified existing wic test modules to work with oe-selftest
infrastructure.

$ oe-selftest --run-tests wic
...
test01_help (oeqa.selftest.wic.Wic)
Test wic --help ... ok
test02_createhelp (oeqa.selftest.wic.Wic)
Test wic create --help ... ok
test03_listhelp (oeqa.selftest.wic.Wic)
Test wic list --help ... ok
test04_build_image_name (oeqa.selftest.wic.Wic)
Test wic create directdisk --image-name core-image-minimal ... ok
test05_build_artifacts (oeqa.selftest.wic.Wic)
Test wic create directdisk providing all artifacts. ... ok

----------------------------------------------------------------------
Ran 5 tests in 6.434s

OK

(From OE-Core rev: 2a7f16b19d78186ed6c2eb119ec102c645596b87)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03 11:43:49 +01:00
Ed Bartosh 8bc5ccb7a6 oeqa/utils: Allow ~ in bblayers
Bitbake can parse ~ in bblayer's paths.
Added this functionality to oeqa code.

(From OE-Core rev: b4dc5b271247a1894d66908c5f20973be2a60d43)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-03 11:43:48 +01:00
Paul Eggleton 1643a7f3bc oe-selftest: devtool: add some tests for devtool add -f
Tests the following aspects of "devtool add" with the -f option:
* Works for a git and https URI
* Extracts to the appropriate directory
* Uses the correct recipe file name with and without -V
* Sets SRC_URI and S appropriately with and without -V
* Sets SRCREV if rev= is specified in the URI

A lot of this functionality relies on "recipetool create" which
"devtool add" wraps around, so the associated behaviour of that is also
being tested here.

Refactor out the code to check a recipe for variable values / inherits
at the same time so we can use it to check the generated recipe.

(From OE-Core rev: 0e626639ee75d42cb44d357efe2d9c4d2ff65294)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-05-01 17:08:50 +01:00
Ed Bartosh 74dc93651f split_and_strip_files: regroup hardlinks to make build deterministic
Reverted 7c0fd561bad0250a00cef63e3d787573112a59cf

Created separate group of hardlinks for the files inside
the same package. This should prevent stripped files to be
populated outside of package directories.

This turns out not to be straightforward and has overlap with the
other hardlink handling code in this area. The code is condensed
into a more concise and documented form.

[Original patch from Ed with tweaks from RP]

[YOCTO #7586]

(From OE-Core rev: 82d00f7254b7d3bb6a167d675d798134884d1b19)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29 10:58:55 +01:00
Richard Purdie 9eb4222e36 lib/oe/package: Improve strip subprocess handling
Currently if the strip process fails, we get a message but don't know why. This adds
code to show the return value and any error output.

(From OE-Core rev: 85e8fb1c7a3baac5633ecdfb36113aec7f4235cb)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29 10:58:55 +01:00
Richard Purdie 26997d1d21 lib/oeqa: Add sdk tests for gcc/perl/python
Enhance testing of the generated SDK tarballs by adding tests for
gcc/perl/python based on the existing runtime tests.

(From OE-Core rev: 18160403427b2aab4207c939312fb0981c3f2d1b)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29 10:58:55 +01:00
Richard Purdie 94ed114eff oeqa/targetbuild: Use DL_DIR for downloads if present
This isn't a test of wget so if the files we need are present in DL_DIR,
use them from there and save a bit of speed/bandwidth and skip the wget.

(From OE-Core rev: dc1d83d021afd77ca8fb948dc47bbd11e3844865)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-29 10:58:54 +01:00
Paul Eggleton e8db1ccef3 devtool: add: use correct bbappend file name with -V option
We weren't adding the version into the bbappend file name when -V was
specified which meant that building or resetting failed.

Also adjust one of the tests so that we're testing devtool add both with
and without this option.

Fixes [YOCTO #7647].

(From OE-Core rev: bdbeff0cd342e31053d7203d78fc5dda611052b1)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 15:05:52 +01:00
Paul Eggleton f1f9fab266 devtool: handle . in recipe name
Names such as glib-2.0 are valid (and used) recipe names, so we need to
support them.

Fixes [YOCTO #7643].

(From OE-Core rev: b9fd8d4d4dfae72de2e81e9b14de072e12cecdcf)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 15:05:52 +01:00
Markus Lehtonen ca1f4d7279 devtool: include bbappends in recipe parsing
In order to get correct metadata, SRCREV for example.

Fixes [YOCTO #7648].

(From OE-Core rev: 8b1794559dd7fd956716179d628e61cffdce1686)

Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 15:05:52 +01:00
Paul Eggleton a8c7558c76 oe-selftest: devtool: fix test_devtool_update_recipe_git
Make this test work after recent changes to the mtd-utils recipe, and
hopefully make it robust against any future changes.

(From OE-Core rev: 5be62624a6537659f9f6229c82762da45909f902)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 15:05:51 +01:00
Cristian Iorga a6ad4183cf oeqa/selftest/toaster: fix bad indent
oe-selftest --list-classes crashes because
of a bad indent (see below). Fixed.

systemd-build$ oe-selftest --list-classes
2015-04-22 12:12:39,141 - selftest - INFO - Listing all available test modules:
_sstatetests_noauto (hidden)
 -- SStateBase
 -- RebuildFromSState
 --  -- test_sstate_rebuild
 --  -- test_sstate_relocation
_toaster (hidden)
Traceback (most recent call last):
  File "/mnt/Yo/yoctoproject/poky/scripts/oe-selftest", line 201, in <module>
    ret = main()
  File "/mnt/Yo/yoctoproject/poky/scripts/oe-selftest", line 157, in main
    modlib = importlib.import_module(test)
  File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
    __import__(name)
  File "/mnt/Yo/yoctoproject/poky/meta/lib/oeqa/selftest/_toaster.py", line 438
    time.sleep(3)
    ^
IndentationError: unexpected indent

(From OE-Core rev: 46869abf72c1c5babce49537f221d7a4f53ca820)

Signed-off-by: Cristian Iorga <cristian.iorga@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-27 10:10:11 +01:00
Nathan Rossi 71db5767a8 oeqa/utils/decorators: Fix up frame selection
Use threading to get the current threads ident to select the current
executing frame to ensure that the scanned stack is the expected stack.

This allows for the decorators to be used within a process that has
multiple threads executing.

(From OE-Core rev: a44d27b92baba4ab51f432ec01cdc473436ce406)

Signed-off-by: Nathan Rossi <nathan.rossi@xilinx.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-21 07:20:25 +01:00
Paul Eggleton d92970f7c1 lib/oe/package_manager: avoid traceback with no packages
If you were using deb packaging, had buildhistory enabled and produced
an SDK that contained no packages in one of the sysroots (such as with
uninative-tarball) then the do_populate_sdk was failing with a python
traceback because there were no fields to split in the output line.

(From OE-Core rev: a0eb3ebbc82133ad239a752a4a85d154be31a311)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-19 13:34:43 +01:00
Richard Purdie 710b01e01e oeqa: Add test for layer append and FILESPATH tracking
This test actually tests a spectrum of bitbake functionality. Three
layers are created, one containing a recipe, one with a bbappend adding
a file to the recipe and another which overwrites the file in another
bbappend.

The correct outcomes in building the recipe are tested, with the file
in the final layer added, removed and then re-added.

This tests bitbake's cache handling as well as restoration from
sstate which happens in the final test phase.

Based on a test case from:
[YOCTO #7019]

(From OE-Core rev: e57437c0e02b148a878c8db91660674069fbd6e2)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-15 14:19:44 +01:00
Jean-Benoit MARTIN eb6d324d60 package_manager: RpmPM: Fix scriptlet for rpm 4
Path of rpm post install script is different between rpm 4 and 5

(From OE-Core rev: a880669f767532ce3c39eb160fa9deb9fce29677)

Signed-off-by: Jean-Benoit MARTIN <jean-benoit.martin@open.eurogiciel.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-13 22:33:22 +01:00
Lucian Musat 3d1106ea4b oeqa/runtime: Boot test for poky-tiny.
Bug 6705.

(From OE-Core rev: 4d3574e7fe5353b4dbbf5266a8b950b57542a743)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:27 +01:00
Lucian Musat 38320db53f oeqa/utils: Add runner for poky-tiny qemu.
The connection and commands are done via serial.

(From OE-Core rev: bc6ac3058d7adb6f1bf87e57deaa50347f452e59)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:27 +01:00
Lucian Musat fa5970e0d9 oeqa/targetcontrol: Add support for poky-tiny in QemuTarget.
(From OE-Core rev: 8f1a52a3f72506911154769e6ad4a44f32c3112e)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:27 +01:00
Lucian Musat 39d5666da4 oeqa/runtime/smart: Added new decorators for existing automated tests.
(From OE-Core rev: d307950f4938ea2f9d480d4f4cd184b76e33df0b)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Lucian Musat e58e983076 oeqa/runtime/rpm: Added new decorators for existing automated tests.
(From OE-Core rev: 7381c10f2260181eccd3abddf5d0289c969863cb)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Lucian Musat 3dabad439a oeqa/runtime/ping: Added new decorators for existing automated tests.
(From OE-Core rev: 9ca0f5c7837ef42cf3b95ff4091ea6951b4e8021)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Lucian Musat f33488a656 oeqa/runtime/parselogs: Added new decorators for existing automated tests.
(From OE-Core rev: 8fb4bc7296d8da62ac2db3bf65d202a9c27d743f)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Lucian Musat d48df946c3 oeqa/runtime/ldd: Added new decorators for existing automated tests.
(From OE-Core rev: 6385874553b8bd9302c1b77d0586edd821e999be)

Signed-off-by: Lucian Musat <george.l.musat@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Patrick Ohly f626c58c32 testimage: sort modules based on dependencies
TEST_SUITES="auto" is useful to run all suitable tests without
having to hard-code the list. However, it did not take test
dependencies into account, which can be an issue for tests
which really depend on some other test to run first.

To fix this, modules get loaded in the order determined by
TESTS_SUITES, but then get re-ordered based on dependencies
derived from @skipUnlessPassed before running them. The original
order is used to break ties when there are no dependencies, so
reordering only occurs when really necessary.

@skipUnlessPassed gets extended such that it makes the test name
a method depends on available for inspection by the test loader
in oetest.py.

Unfortunately Python's unittest offers no API to inspect tests
in a TestSuite, so the code has to rely on implementation details
to find all tests. The worst that can happen when the implementation
changes is that tests are not found and reordering does not happen.

(From OE-Core rev: 6e4543a35836c572b23b9f8162b19d1e038d3ed2)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Patrick Ohly 206d532180 oeqa/runtime/systemd.py: skip instead of failing without avahi
The SystemdServiceTests assume that avahi-daemon is installed,
which is not necessarily the case depending on the image being
tested.

Better check this dependency before starting the tests and skip
them if the service is not installed. This has to be done for
each test instead of for the entire module, because other
tests in the module can run without avavi.

(From OE-Core rev: ca23337d517cfdb7119e5fd8bd9a9a663ae135de)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Patrick Ohly 058e75d60e oeqa/oetest.py: use bb logging
Plain print has two drawbacks:
- the output is handled by different processes, causing the message
  about found tests to appear randomly after the result of the initial
  tests
- the output is not part of the bitbake console output

Affects image testing with testimage.bbclass.

(From OE-Core rev: 4b6f87a82ece230b7296f1577d4092ef559af1d4)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:25 +01:00
Yi Zhao c0fc3c4727 lib/oeqa/selftest/bblayers: improve test for add-layer and remove-layer
Use absolute path instead of relative path for meta-skeleton.
Otherwise the case would fail if the builddir outside the poky source
tree.

(From OE-Core rev: 90edaf9b9e51a24bf67c1c95732fc2d8cb22b098)

Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2015-04-10 18:10:24 +01:00