Commit Graph

26900 Commits

Author SHA1 Message Date
Corneliu Stoicescu b9afc0d262 meta-selftest: create a new test layer to be used by oe-selftest script
Everything in this layer is meant to be used by tests called by
scripts/oe-selftest. These are helper recipes/appends to test various bitbake
options or scripts.
Currently most of these files here only have "include test_recipe.inc" which
is the file tests will actually use.

(From OE-Core rev: 71a5053eea2aa0055663ccb2318eda866df49bb7)

Signed-off-by: Corneliu Stoicescu <corneliux.stoicescu@intel.com>
Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Stefan Stanacar 645dd61cd2 scripts/oe-selftest: script to run builds as unittest against bitbake or various scripts
The purpose of oe-selftest is to run unittest modules added from meta/lib/oeqa/selftest,
which are tests against bitbake tools.

Right now the script it's useful for simple tests like:
  - "bitbake --someoption, change some metadata, bitbake X, check something" type scenarios (PR service, error output, etc)
  - or "bitbake-layers <...>" type scripts and yocto-bsp tools.

This commit also adds some helper modules that the tests will use and a base class.
Also, most of the tests will have a dependency on a meta-selftest layer
which contains specially modified recipes/bbappends/include files for the purpose of the tests.
The tests themselves will usually write to ".inc" files from the layer or in conf/selftest.inc
(which is added as an include in local.conf at the start and removed at the end)

It's a simple matter or sourcing the enviroment, adding the meta-selftest layer to bblayers.conf
and running: oe-selftest to get some results. It would finish faster if at least a core-image-minimal
was built before.

[ YOCTO #4740 ]

(From OE-Core rev: 41a4f8fb005328d3a631a9036ceb6dcf75754410)

Signed-off-by: Stefan Stanacar <stefanx.stanacar@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 1fa51bf949 classes/buildhistory: do git garbage collection after committing
We don't normally perform any operations (such as "git pull") that
trigger "git gc --auto", thus garbage collection never happens which
means performance of accessing the repository degrades noticeably over
time. Add an explicit "git gc --auto" to clean things up when needed.

Thanks to Elijah Newren and Ross Burton for suggesting this.

(From OE-Core rev: 4a45a999e0ad2e99581428a5a6d34f483c00544f)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton d51b3f3758 classes/buildhistory: reduce parsing time
Disable several python functions if not parsing within the worker
context. This avoids executing expensive operations while parsing
recipes (which is unnecessary).

(Thanks to Richard Purdie for pointing out the issue and suggesting the
workaround.)

(From OE-Core rev: 540a2a30be21c3eca4323efbe91e7dcfc31a4c97)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton cdfef971d3 classes/buildhistory: improve collection of package info
Use a function added to SSTATEPOSTINSTFUNCS and read the necessary
information out of pkgdata, instead of using a function executed
during do_package that reads the data directly. This has two benefits:

* The package info collection will now work when the package content is
  restored from shared state

* Adding/removing the inherit of buildhistory will no longer change the
  do_package signatures and force re-execution of that function for
  every recipe.

Fixes [YOCTO #5358]

(From OE-Core rev: cd7f7efcd5f297d876823b8f579ecefb9542b089)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 0cb38ee34a classes/buildhistory: add additional variables to image information
Add PACKAGE_EXCLUDE and NO_RECOMMENDATIONS to the info we track for
images, since these can change what ends up in the image.

(From OE-Core rev: a10189366f180b87f5be20b66834b7e7a9bb8c12)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:50 +00:00
Paul Eggleton 1c37266c2a classes/buildhistory: drop cruft from old SRCREV tracking implementation
This should have been removed when the implementation was rewritten in
OE-Core commit 2179db89436d719635f858c87d1e098696bead2a. The collected
values weren't being used anywhere since then.

(From OE-Core rev: cbc23a87c1897b7fda40f452dd36acb0bca3d197)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton c36c1989c1 classes/package: write PE and PKGE out to pkgdata
These are important parts of the version for every package, so we should
include them in PKGDATA just as we include PV/PR/PKGV/PKGR.

(From OE-Core rev: 5ceed97ba02a698f1c260c3f56cdf2cc156e6d8b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton f4e91404f8 classes/package: record PKGSIZE as total file size in pkgdata
We were using "du -sk" to collect the total size of all files in each
package for writing out to PKGSIZE in each pkgdata file; however this
reports the total space used on disk not the total size of all files,
which means it is dependent on the block size and filesystem being used
for TMPDIR on the build host. Instead, take the total of the size
reported by lstat() for each packaged file, which we are already
collecting for FILES_INFO in any case.

Note: this changes PKGSIZE to be reported in bytes instead of kilobytes
since this is what lstat reports, but this is really what we should be
storing anyway so that we have the precision if we need it.

Fixes [YOCTO #5334]

(From OE-Core rev: 29615b36fca696822a715ece2afbe0bf9a43ed61)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Paul Eggleton 4a75e83b29 classes/package: fix FILES_INFO serialisation in pkgdata
The FILES_INFO entry in each pkgdata file stores the list of files for
each package. Make the following improvements to how this is stored:
* Store paths as they would be seen on the target rather than
  erroneously including the full path to PKGDEST (which is specific to
  the build host the package was built on)
* For simplicity when loading the data, store complete paths for each
  entry instead of trying to break off the first part and use it as the
  dict key
* Record sizes for each file (as needed by Toaster)
* Serialise the value explicitly using json rather than just passing it
  through str().

Fixes [YOCTO #5443].

(From OE-Core rev: ca86603607a69a17cc5540d69de0e242b33382d3)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 17:45:49 +00:00
Scott Rifenbark a6450a951f ref-manual: Added the multilib* class.
(From yocto-docs rev: df154cd0c0176c9d213ab03862b1fec41f94b4ec)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:40 +00:00
Scott Rifenbark ab2744b909 ref-manual: Added the mirrors class.
(From yocto-docs rev: 372f1496e8d5b256c1560b950efc438af257a41b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:40 +00:00
Scott Rifenbark 80342f0a69 ref-manual: Added the mime class.
(From yocto-docs rev: ca593c93ec728fe67c4dbf00fe3d8c4329abe8ba)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:39 +00:00
Scott Rifenbark 0e9e1b28f6 ref-manual: Added the metadata_scm class.
(From yocto-docs rev: a0a4ca849b6a9e464c5e2dd7e597e3fb6951c8f3)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:39 +00:00
Scott Rifenbark 6fb5661ca5 ref-manual: Added the meta class.
(From yocto-docs rev: b9fee079d920a3ae52214718d1846b26c671998b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:39 +00:00
Scott Rifenbark 926eb4b601 ref-manual: Added the logging class.
(From yocto-docs rev: 9c443dc0732b1e2a59bf583cf6348d0b6c0cdeb4)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:39 +00:00
Scott Rifenbark 86c58a5375 ref-manual: Edits to license class added INHERIT_DISTRO variable.
(From yocto-docs rev: a3a4c62c489a262fdf484e0c38b86e7c65a08fcb)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:38 +00:00
Scott Rifenbark b465168fea ref-manual: Added the license class.
(From yocto-docs rev: 55bf04258cd93184058022dbf069178104239fd2)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:38 +00:00
Scott Rifenbark abbc253ecd ref-manual: Added the linux-kernel-base class.
(From yocto-docs rev: 32355612d393696b48634bb67569b890c1315593)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:38 +00:00
Scott Rifenbark 96ed7b9eec ref-manual: Added the lib_package class.
(From yocto-docs rev: a43b40d813e3e8d467179334119d14a24dca9989)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:38 +00:00
Scott Rifenbark 842461e2f4 ref-manual: Added the kernel-yocto class.
(From yocto-docs rev: 76534fa2ffd936ef3ba33804b59e9bc7c296cfca)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:37 +00:00
Scott Rifenbark 11589c4a0b ref-manual: Added kernel module split class.
(From yocto-docs rev: 72691cb7e9d6837f33fe08c8ea76c04a0fbd0e47)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:37 +00:00
Scott Rifenbark ed179025e7 ref-manual: Added kernel-arch class.
(From yocto-docs rev: cea9cce8f1715cfc6a7b7554700610567650fef9)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:37 +00:00
Scott Rifenbark c3fd5f99b1 ref-manual: Added the insserve class.
(From yocto-docs rev: a64e8ed7c59d5550e5d2a5a8a1be136ee3859437)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:37 +00:00
Scott Rifenbark 8033de834b ref-manual: Added the image_types_uboot class.
(From yocto-docs rev: 02c8b81e132b48f150817f12346a573cf40c5c97)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:36 +00:00
Scott Rifenbark 67ecb81bc9 ref-manual: Edits to image_types class.
Noticed that this class file name is "image_types.bbclass" and not
"image-types.bbclass".  Fixed it.

(From yocto-docs rev: 594cc933c919b7b84248c670ed7563bd23b8597d)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:36 +00:00
Scott Rifenbark a6a3c796b7 ref-manual: Added the image-types class.
(From yocto-docs rev: fa3749248b95cc0fe636d513269b5751d0b092cb)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:36 +00:00
Scott Rifenbark 8cdc2d5855 ref-manual: Added the image-swab class.
(From yocto-docs rev: aa8b80cf42e4ce4949bec7dc1d6522fed1081b0e)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:35 +00:00
Scott Rifenbark 89a3793e20 ref-manual: Added image-mklibs and image-prelink classes.
(From yocto-docs rev: 2dc02cc572f217b4f15b51cb58fcb63856902e71)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:35 +00:00
Scott Rifenbark 6b1b052e87 ref-manual: Added image-vmdk class.
(From yocto-docs rev: bb4b26ce0c400db95915b6a2a07cad45a446493b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:35 +00:00
Scott Rifenbark 5f20fb847e ref-manual: Added image-live class and updated IMAGE_FSTYPES variable.
Added a note to the existing IMAGE_FSTYPES variable based on
using "live" as an image type.  Need to be sure that appears
before inherit line in the recipe.

(From yocto-docs rev: 1fc45b2bc7c70f00882d495d659830b94eb7d2df)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:35 +00:00
Scott Rifenbark bd0ab4eb50 ref-manual: Added image-empty.bbclass to undocumented class list.
I accidently removed this so had to add it back in.

(From yocto-docs rev: 928bc686735fb8bc80df2a8c070846c33ca6aa3c)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:34 +00:00
Scott Rifenbark 5ac2e267e4 ref-manual: Removed image-empty.bbclass from undocumented list.
(From yocto-docs rev: e91619e3f2b3abf98a72cc284a0aa4832b25b48b)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:34 +00:00
Scott Rifenbark 223bfdc14d ref-manual: Placed the ICECC_CC variable as entry point for "I" variables.
(From yocto-docs rev: 071d47b1cd1e7d09c4ff34b4da799ae765980e65)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:34 +00:00
Scott Rifenbark cd83080983 ref-manual: Added icecc class and several ICECC_* variables.
New variables added for:

  ICECC_CC
  ICECC_CXX
  ICECC_ENV_EXEC
  ICECC_PATH
  ICECC_USER_CLASS_BL
  ICECC_USER_PACKAGE_BL
  ICECC_USER_PACKAGE_WL
  ICECC_VERSION

(From yocto-docs rev: 264b0e8ce7d867edbdcbfbdc5621bcf087c13f58)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:34 +00:00
Scott Rifenbark 172cf55943 ref-manual: Edits to the GRUB_GFXSERIAL variable.
Told where to set this variable.

(From yocto-docs rev: f95fb5821383721da6a63bb8eb74807e89e6b21d)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:33 +00:00
Scott Rifenbark b503308dba ref-manual: Added gzipnative class.
(From yocto-docs rev: d6f30c9a617589393442463b7d0c6c1a83c2b7aa)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:33 +00:00
Scott Rifenbark 11c3ed6c64 ref-manual: Added the gtk-immodules-cache class and GTKIMMODULES_PACKAGES variable.
(From yocto-docs rev: 3bbec60f64e6a0b7cb3d42548f837466bec44312)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:33 +00:00
Scott Rifenbark 02af524762 ref-manual: Added gtk-icon-cache class.
(From yocto-docs rev: cf53ebcc18437bf4dc7c41a80577268f65f597d2)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:32 +00:00
Scott Rifenbark 694a1712ce ref-manual: Added gtk-doc class.
(From yocto-docs rev: debb03e8934b8a8b0f07e7c583aa712bacacfe74)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:32 +00:00
Scott Rifenbark 8d1637d95b ref-manual: Added gsettings class.
(From yocto-docs rev: 66bfbee13191aef7171ad2fe570bd40ce2bd0f97)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:32 +00:00
Scott Rifenbark 28a6b529c0 ref-manual: Added grub-efi class and supporting variables.
Created glossary entries for the GRUB_GFXSERIAL, LABELS,
APPEND, GRUB_OPTS, and GRUB_TIMEOUT variables.

(From yocto-docs rev: 31bcc25866525ef998bc01e11ab9ddb0601b8ded)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:32 +00:00
Scott Rifenbark 04d8460277 ref-manual: Fixed class name gtext to gettext.
I put this name in wrong in the original commit.

(From yocto-docs rev: 654ba14a17886b5743e6732f825a693375d264cf)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:31 +00:00
Scott Rifenbark 93267b79fb ref-manual: Added gnome, gnomebase, gtk-icon-cache, and mime classes
The entries for gtk-icon-cache and mime are placeholders only
with this commit.

(From yocto-docs rev: 8652cc5d4fe880768e746a80dde82513c5d83a09)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:31 +00:00
Scott Rifenbark 65d7a93066 ref-manual: Addedt gtext class.
(From yocto-docs rev: 0b432081ef273045c9c570649d344747a2e11292)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:31 +00:00
Scott Rifenbark 8a5a6c3478 ref-manual: Added gconf class.
(From yocto-docs rev: 85d002b3cc2beab0c47e31fa4f3bdef7570e9d73)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:31 +00:00
Scott Rifenbark d2d4febc89 ref-manual: Added fontcache class and FONT_PACKAGES variable.
(From yocto-docs rev: 5d0cd87e45155236cd72b02267d5d081654bc2d3)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:30 +00:00
Scott Rifenbark 37802407f8 ref-manual: Added extrausers class and EXTRA_USERS_PARAMS variable.
(From yocto-docs rev: 9638963d1eb7c4cf6d724b3633ac6410b13f6b2d)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:30 +00:00
Scott Rifenbark f7d0456334 ref-manual: Added classes_distro_features class.
(From yocto-docs rev: ae263641ec3a03a2f6b968431500573ba4f9adab)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:30 +00:00
Scott Rifenbark d68f52fbcd ref-manual: Added distrodata class.
(From yocto-docs rev: 1726ab65329d91ba8db9c79281afa7447470f234)

Signed-off-by: Scott Rifenbark <scott.m.rifenbark@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2013-12-03 12:53:29 +00:00