Commit Graph

1686 Commits

Author SHA1 Message Date
Andre McCurdy b1ffdf653c terminal.py: fix devshell with mate-terminal
Without the --disable-factory option, mate-terminal fails to start
with the error:

 | There was an error creating the child process for this terminal
 | Failed to execute child process "oe-gnome-terminal-phonehome" (No such file or directory)

The --disable-factory option was removed by:

  http://git.openembedded.org/openembedded-core/commit/?id=e8dca725ed8211a874472300a3ed50e494039ab9

apparently based on an assuption that mate-terminal continues to
track gnome-terminal since forking from it. However, based on the
mate-terminal man page in the upstream master branch, the option is
still supported:

  https://github.com/mate-desktop/mate-terminal

(From OE-Core rev: c7f769bd400756d180abf80dbfdf4ed2703fab60)

(From OE-Core rev: 764159600a202d1f0c2f0217c7bf7b55348a2f5d)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Andre McCurdy 452164e7d6 terminal.py: avoid 100% cpu while waiting for phonehome pid file
Some of the less common terminal types haven't been tested with the
recent phonehome pid file changes and there may be error cases where
the pid file is never created.

(From OE-Core rev: 6b0cf568e9fbe28fb6e7b17f4ad92348d33e2bf4)

(From OE-Core rev: 9aa06b3116c095a512be1d1f5da84ffaedf845dc)

Signed-off-by: Andre McCurdy <armccurdy@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Leonardo Sandoval 0f81fcb600 terminal: wait for terminal task to finish before procedding
This commit generalizes the work done in [1] and [2], both fixing
issues on several areas (the former with -c patch and gnome-terminal and
the latter with -c menuconfig and several terminals, including
gnome-terminal and tmux). The main idea is to get the PID
from the new spawned terminal and loop there until finished.

[1] 76e8ab47c9: terminal: Fix gnome-terminal to work with recent versions
[2] 7d02ea283b: cml1.bbclass: wait until menuconfig terminal finishes

(From OE-Core rev: 55707401d5bfb1f7686c273fc2d0db89df206395)

(From OE-Core rev: 3987dddff58410f1b2535ceb1f48aebbbd987889)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-09-11 22:15:59 +01:00
Peter Kjellerstedt 7ea76684cb package.bbclass: Restore functionality to detect RPM dependencies
During the transition to dnf and rpm4, the functionality to
automatically make RPM determine dependencies was lost.

Before the transition, an OE specific tool called rpmdeps-oecore had
been added to the rpm suit. It was based on the rpmdeps tool that is
part of rpm. For each file specified on its command line, it would
output the provides and requires that RPM could determine.

During the transition to rpm4, rpmdeps-oecore was replaced with the
standard rpmdeps. However, what no one noticed was that unless rpmdeps
is given options, e.g., -P or -R, to tell it what it should output, it
will not output anything. Thus, it would do all the work to determine
the requirements, but would keep silent about it. And since no output
from rpmdeps is expected unless there are requirements, there were no
warnings indicating that everything was not working as expected.

Porting the old rpmdeps-oecore to work with rpm4 is not really
possible since it relied on being able to access internals of RPM that
are no longer available. However, it turned out that rpmdeps had a
debug option, --rpmfcdebug, that would output exactly the information
that we need, albeit in a different format and to stderr. To make this
usable, rpmdeps has now received a new option, --alldeps, which sends
the information we need to stdout.

Since enabling this may cause packages to break, it is required that
ENABLE_RPM_FILEDEPS_FOR_PYRO is set to "1" to activate it for Pyro.
The name of this variable has been chosen as to indicate that it only
affects Pyro (since releases before and after Pyro has it enabled by
default).

(From OE-Core rev: 1009498f23ad319825c00ba60a4693d15aada553)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:12 +01:00
Peter Kjellerstedt 01406f8bf6 package_manager.py: Generate correct RPM package names again
During the transition to RPM4, the package names returned by
RpmPM.list_installed() changed from the expected names of the packages
that were installed into the image to some fictitious source RPM
names.

This restores the original functionality so that the
installed-packages.txt files produced by inheriting buildhistory yet
again contains a list of the names of the installed packages.

(From OE-Core rev: cd982d5b8944fe231c7dd38c9a563d0fc0737b88)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-31 17:57:11 +01:00
Richard Röjfors 2002de4eae package_manager: Fix support for NO_RECOMMENDATONS
When support for dnf was introduced the check of the
no NO_RECOMMENDATIONS variable got broken.

This fixes the issue by compairing to the string "1"
rather than the number 1.

(From OE-Core rev: 5f9ea84d304a519acb0504516b86f2683a43f9e9)

Signed-off-by: Richard Röjfors <richard@puffinpack.se>
Signed-off-by: Ross Burton <ross.burton@intel.com>
(cherry picked from commit 1849ce3bd7c0af055f3e849a6508e746b6a0dca5)
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-29 11:57:28 +01:00
Alexander Kanavin d4c4708906 package_manager.py: set dnf's releasever setting from DISTRO_CODENAME
So that:

1) dnf does not complain anymore about releasever not being set and then fail
for the same reason;

2) it's possible to refer to $releasever in dnf package feed configuration
(repo paths in particular) without hardconding the release name (pyro, morty, etc.)

(From OE-Core rev: 789e3fc225adbb61f10aaa3bbc3677856f5f0238)

(From OE-Core rev: 5a97694767c76f3083e9ffeeaaa19d76ff424c83)

Signed-off-by: Alexander Kanavin <alexander.kanavin@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster808@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27 22:36:44 +01:00
Martin Jansa 185f4e7e6e package_manager: flush installed_pkgs file before oe-pkgdata-util uses it
* since this commit:
  commit f5a1013ffa9815f22e13989e2bcb83f966e7ce2c
  Author: Ross Burton <ross.burton@intel.com>
  Date:   Tue Apr 18 16:19:12 2017 +0100

    package_manager: don't race on a file when installing complementary
    packages

  the file isn't closed before oe-pkgdata-util uses it and this
  temporary file might look empty to oe-pkgdata-util, because it
  wasn't flushed yet. Which resulted in almost empty debugfs tarballs
  and no locale packages in regular rootfs.
* without this change:
  124K May 30 07:41 core-image-full-cmdline-raspberrypi3-64-20170530054003-dbg.rootfs.tar.gz
* with this change:
  173M May 30 07:29 core-image-full-cmdline-raspberrypi3-64-20170530052715-dbg.rootfs.tar.gz

(From OE-Core rev: 9b34200048b3d2b477a19b7ddc8d447f873adbb2)

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit 877d38db08aa7060d16405443cf70539c559fe82)
Signed-off-by: Anders Darander <anders@chargestorm.se>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-07 09:19:08 +01:00
Ross Burton f375c30a17 oeqa/selftest: lock down Meson git revision for reliability
The test_recipetool_create_github test fetches HEAD of the repository so
upstream changes can (and do) break the test.  Avoid these problems by passing
the rev= argument in the URL to lock the checkout to the same version that is
fetched in the github_tarball test.

Also pass the commands to runCmd() as a list instead of a string, the semicolon
in the URL needs more quotes if the shell is involved and passing a list
bypasses the shell entirely.

(From OE-Core rev: 5f02b4300fb2ed54270aede54d30317ba757f587)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-06-05 17:59:57 +01:00
Peter Kjellerstedt 439bb8cc71 bitbake.conf: Add COMPONENTS_DIR for ${STAGING_DIR}-components
The path to where to install and find the sysroot components is used
in many places. This warrants it to get its own variable.

(From OE-Core rev: 70a84b525470f72339568409daf84845904e4cab)

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-05-11 16:55:59 +01:00
Jose Perez Carranza 71fd36a8ab devtool: Avoid touch sstates when cleaning linux-yocto environment
sstates are cleaned when ruining  test_devtool_virtual_kernel_modify to
have a clean environment but this is affecting eSDK test that are
dependent of those sstates, hence “cleansstate” is replaced for
“clean”.

[YOCTO #11300]

(From OE-Core rev: 182fdb97ed6c11c7b55fdb99773da6f72c9828b3)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:22 +01:00
Ross Burton 1bc292fe25 selftest/bbtests: improve download rename test
This test was assuming the format of SRC_URI so broke when SRC_URI was changed.
Fix the test by hardcoding a complete SRC_URI instead of appending and hoping
for the best.

(From OE-Core rev: afe1d3073a435ef6c838cc676748842af4c4af83)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-29 11:17:22 +01:00
brian avery ecd485650c meta: add search, replace strings to export2json
We want to be able to save relative paths so that we can relocate the
deploy dir images and kernels, yet still have qemu and testimage work
correctly.  This extends export2json with 2 named arguments so a
search/replace operation can be done to remove the leading path.

[YOCTO #11375]

(From OE-Core rev: 4829f1ebd89dc91860cf72fbbdc7b6bb0d5822bc)

Signed-off-by: brian avery <brian.avery@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 07:55:26 +01:00
Jussi Kukkonen adea8003ab package_manager.py: Reverse rpm arch order
The architecture list used by dnf/libsolv was in the wrong order.
As a result, the images were built with wrong and unpredictable
packages.

$ MACHINE=intel-corei7-64 bitbake core-image-sato
$ MACHINE=qemux86-64 bitbake core-image-sato
$ MACHINE=intel-corei7-64 bitbake -ccleansstate core-image-sato
$ MACHINE=intel-corei7-64 bitbake core-image-sato

The first image had 0 core2_64 packages in it, but the last one had
583 core2_64 packages (which were built for the qemu image in
between).

Reverse the arch order in etc/dnf/vars/arch.

Fixes [YOCTO #11384].

(From OE-Core rev: 4a82433de42943f8219beca3286f40b67157172f)

Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-20 07:55:25 +01:00
Ross Burton ae5d643114 package_manager: don't race on a file when installing complementary packages
PackageManager.install_complementary() uses WORKDIR/installed_pkgs.txt as a
temporary file but if two tasks are executing for the same recipe which uses
this file (e.g. bitbake my-image my-image:do_populate_sdk) then it's possible
for the file to be overwritten or deleted.

Instead of using a static filename, use tempfile to generate a unique name and
ensure it is cleaned up when finished.

Also move the glob generation/expansion earlier in the function as if there are
no globs to install, we don't need to generate a package list.

(From OE-Core rev: f5a1013ffa9815f22e13989e2bcb83f966e7ce2c)

Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-19 10:18:43 +01:00
Ian.Arkver 2bc2e67dd0 package_manager.py: Generate separate repo entries per arch
dnf requires a serparate repo for each architecture. This patch
writes one config file per PACKAGE_FEED_URIS entry with an entry
for each architecture, if any.

It also uses a space separated version of the repo id as the repo
name instead of just the id again.

(From OE-Core rev: 3eed822b5c5661aa9f43af6582c1481bacf0d39a)

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-14 09:47:08 +01:00
Leonardo Sandoval 3f32ca2a57 oeqa/core/runner: Append PID in the test result folder name
It was found a case (see the bugzilla entry) where two runners were running at the same
second, creating identical test result folders, so one of them (the second runner)
was not able to create the folder because the other has already created it,
raising the following exception (many text was removed from log)

NOTE: Executing RunQueue Tasks
NOTE: Running task 1 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-core/images/core-image-minimal.bb:do_testsdkext)
NOTE: Running task 2 of 2 (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/recipes-sato/images/core-image-sato.bb:do_testsdkext)
NOTE: recipe core-image-sato-1.0-r0: task do_testsdkext: Started
NOTE: recipe core-image-minimal-1.0-r0: task do_testsdkext: Started
.
.
The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: <module>
     0001:
 *** 0002:do_testsdkext(d)
     0003:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 188, function: do_testsdkext
     0184:
     0185:testsdkext_main[vardepsexclude] =+ "BB_ORIGENV"
     0186:
     0187:python do_testsdkext() {
 *** 0188:    testsdkext_main(d)
     0189:}
     0190:addtask testsdkext
     0191:do_testsdkext[nostamp] = "1"
     0192:
File: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/meta/classes/testsdk.bbclass', lineno: 171, function: testsdkext_main
     0167:        except Exception as e:
     0168:            import traceback
     0169:            bb.fatal("Loading tests failed:\n%s" % traceback.format_exc())
     0170:
 *** 0171:        result = tc.runTests()
.
.
File: '/usr/lib64/python3.5/os.py', lineno: 241, function: makedirs
     0237:            cdir = bytes(curdir, 'ASCII')
     0238:        if tail == cdir:           # xxx/newdir/. exists if xxx/newdir exists
     0239:            return
     0240:    try:
 *** 0241:        mkdir(name, mode)
     0242:    except OSError:
     0243:        # Cannot rely on checking for EEXIST, since the operating system
     0244:        # could give priority to other errors like EACCES or EROFS
     0245:        if not exist_ok or not path.isdir(name):
Exception: FileExistsError: [Errno 17] File exists: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-mips/build/build/TestResults_20170409130114'

[YOCTO #11318]

(From OE-Core rev: 10aa09d39c1b70ce2a88f59601f1f8dbc96ed817)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-13 10:54:10 +01:00
Ian.Arkver f2e41a197f package_manager.py: Add a name for the generated dnf repo.
This adds repo_name as the name, which is the same as the
repo ID and hence a bit pointless, but it stops dnf from
complaining that the repo doesn't have a configured name.

(From OE-Core rev: c92cff23893e87cfb7ef9f77b16761310104543a)

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:58 +01:00
Robert Yang 620655697d selftest/wic.py: vda -> sda
Previously, runqemu grep root=/dev/sd or root=/dev/hd on the image, and
would use vda if no grep result, now we have set QB_DRIVE_TYPE to
"/dev/sd" by default, and the device will be /dev/sda, so use sda to
replace vda in the test case.

(From OE-Core rev: a722016df3f452f7a870157a99a1abb7d97d8280)

Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:57 +01:00
Ed Bartosh 8838dd2dbd oe-selftest: test wic sparse_copy API
Added new parameter 'api' to sparse_copy function to specify
underlying filemap API to use. By default sparse_copy will
try both available APIs.

Added test case for sparse_copy to wic test suite.

(From OE-Core rev: 88701cef6ba399e82f96ed1b0eef9a44ed8c1687)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-12 15:09:57 +01:00
Joshua Lock 1b4bd1b659 oeqa/sdk/cases/buildcpio: enable use of cached cpio from DL_DIR
All build project test cases will try to copy the requested source
artefacts from DL_DIR before fetching. This testcase is referencing bzipped
tarball whereas the recipe fetches a gzipped tarball.

Switch to fetching the gzipped tarball in the test case so that we're able
to use a cached tarball from DL_DIR

(From OE-Core rev: 27a5883e8ae01e69f5425efe8b035bea7087b2f9)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:18 +01:00
Paul Eggleton 1f19d9dfe5 buildhistory-diff: add option to compare actual signature differences
Use the code underpinning bitbake-diffsigs to add an option to
buildhistory-diff to determine and display the differences between the
actual signature inputs, with a twist - we collapse identical
changes across different tasks, showing only the most recent task to
have that difference, meaning that there's less noise to wade through
when you just want to know what changed in order to cause some
rebuilding you're seeing.

(From OE-Core rev: 86cb4b01f2020553902554e512c02147eb4e0f51)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Paul Eggleton 9049c09793 buildhistory-diff: add option to compare task signature list
Having added writing out of the task signature list to buildhistory
(when BUILDHISTORY_FEATURES includes "task"), we now need a way to
compare the list. This just shows which tasks have been added / changed
signature / removed.

(From OE-Core rev: 63bd7e9f780a98dda458d612877495756bcc5463)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Paul Eggleton 6774995322 classes/buildhistory: write out task signatures on every build
If we want to determine what changed since the last build, one angle
from which to look at it is to check the signatures. However, if we
don't actually have the signatures from the last build we don't have
anywhere to start. Save the signatures on each build in order to give us
the starting point.

NOTE: you need to set your BUILDHISTORY_FEATURES value to include
"task" to enable collection of these signatures as it is is disabled by
default.

(From OE-Core rev: 11f68f65c46c5bc26ddeeade3021e83b3a7f895a)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Ian.Arkver ae65b95354 package_manager.py: Split feed_archs for RPM repo URIs
By default the feed_archs variable is split into single characters
resulting in very many broken short repo_uris. Add a split() to
split the string into words first.

(From OE-Core rev: 7bd6a4d56c08bf7f9ced7c07327e6163216fee08)

Signed-off-by: Ian.Arkver <ian.arkver.dev@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Juro Bystricky 34db499e6b classutils.py: deterministic sorting
The method "prioritized" returns a list sorted by the value
of the "priority" field, in descending order. However, if several
list items have the same priority, the ordering of those items
within the priority-sorted list becomes random. As a consequence,
we may end up with a non-deterministic oe-terminal spawning, as several
terminals have the same priority. So running commands such as

$ bitbake xxx -cdevshell
$ bitbake yyy -cmenuconfig

may spawn a different terminal each time, for example sometimes Gnome
and sometimes Konsole as hey have the same priority.
Rather than modifying the priorities so they all differ, we sub-sort
the list based on (terminal) names.
This way we achieve a deterministic outcome.

[YOCTO#10938]

(From OE-Core rev: 82ae62f28dd2d5fb2fb261478ac6161315ac6c38)

Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-11 18:10:17 +01:00
Richard Purdie 684eefd7a3 scripts: Drop cleanup-workdir
This script appears broken and is actively breaking build directories.
For example, binutils-cross-i586 gets run do_fetch to do_populate_sysroot by:

$ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify

then:

$ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff

wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/
but does not wipe out the corresponding stamps, then:

$ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot

needs binutils-cross-i586:do_populate_lic and if and only if this is
unavailable from sstate, it fails since it thinks the source is already
unpacked when it isn't resulting in:

WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nigh
tly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto
-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LI
B: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-l
inux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB'
ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/
pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum]

and similar errors.

Its safer for users to wipe tmp than try and maintain scripts which try
to remove pieces of tmp and get it wrong so remove the script.

(From OE-Core rev: 809b23c829f352c0eae455ea89f53e2a9ee87f06)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Richard Purdie 503009b831 oeqa/selftest: Don't use cleanup-workdir
cleanup-workdir isn't a partcularly good way to attempt to cleanup after
tests and in some cases is actively breaking the workdir. Whilst this is
a bug in cleanup-workdir, I'd prefer it didn't break tests, particularly
when as far as I can see, these calls are "belt and braces" and don't appear
to serve a specific purpose. If this introduces bugs, we should fix this
bugs.

For the purposes of history, binutils-cross-i586 gets run do_fetch to
do_populate_sysroot by:

$ oe-selftest -r devtool.DevtoolTests.test_devtool_virtual_kernel_modify

then:

$ oe-selftest -r oescripts.BuildhistoryDiffTests.test_buildhistory_diff

wipes out the contents of tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/
but does not wipe out the corresponding stamps, then:

$ oe-selftest -r runtime-test.Postinst.test_postinst_rootfs_and_boot

needs binutils-cross-i586:do_populate_lic and if and only if this is
unavailable from sstate, it fails since it thinks the source is already
unpacked when it isn't resulting in:

WARNING: binutils-cross-i586-2.28-r0 do_populate_lic: Could not copy license file /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB to /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/license-destdir/binutils-cross-i586/COPYING3.LIB: [Errno 2] No such file or directory: '/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3.LIB'
ERROR: binutils-cross-i586-2.28-r0 do_populate_lic: QA Issue: binutils-cross-i586: LIC_FILES_CHKSUM points to an invalid file: /home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/x86_64-linux/binutils-cross-i586/2.28-r0/git/COPYING3 [license-checksum]

and similar errors.

(From OE-Core rev: a66857096df3f68d38271b3a6792150f009a54b1)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Richard Purdie 90c1bb7569 selftest/sstatetests: Replace glibc-initial with linux-libc-headers
The intent in these tests was to find something early in the bootstrap
process to run tests against which didn't require long build times.
This breaks with the removal of the glibc-initial do_build target.
Replacing it with linux-libc-headers seems like a good choice
and simplifies the conditionals too.

(From OE-Core rev: c37d610272f9d0a506334ff9f724c025acace137)

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Paul Eggleton 23095a6b01 lib/oe/sstatesig: avoid reporting duplicate siginfo files from sstate
In find_siginfo(), which is used by bitbake-diffsigs among other things,
avoid adding a siginfo file from the sstate-cache where we've already
collected a sigdata file from the stamps directory with the same hash.
This avoids the possibility that the top two files (as picked by default
using the bitbake-diffsigs -t option) are for the same signature and
thus the tool would report no differences. In order to do that, just use
the hashfiles dict that we already have - we just need to change the
code to populate that even if we're collecting matching files without
looking for a fixed set of hashes (i.e. taskhashlist isn't set).

This replaces previous code in bitbake-diffsigs that attempted to filter
these out with limited success.

(From OE-Core rev: 5b69eef40868180c59400624096d7ebbbbea446b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Paul Eggleton 27b7de94f0 lib/oe/sstatesig: fix finding native siginfo files in sstate-cache
When comparing signatures with bitbake-diffsigs -t or bitbake -S
printdiff, we use this find_siginfo() function implemented in this
module to find the siginfo/sigdata files corresponding to the tasks
we're looking for. However, native sstate files go into a
NATIVELSBSTRING subdirectory and there was no handling for this when
asking about native recipes.

I'm not even sure why we were walking SSTATE_DIR in order to find
this - we don't need to, we just need to run glob.glob() on the filespec
we calculate, which should be a little bit more efficient.

(From OE-Core rev: 8cb472e4ed25e56ec0d9cf6d8d101d1ab6687a5b)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:44 +01:00
Leonardo Sandoval 4d1b21fd6d selftest/recipetool: skip create_git in case x11 feature is not present
The unit test requires x11 as distro feature, otherwise it will fail
while building the test requirements.

[YOCTO #10903]

(From OE-Core rev: 2fe8f39b5f5e7390cc46f8cb47c2503b3c5f78e2)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Leonardo Sandoval f91aedf6b5 selftest/wic: skip wic unit tests in case NLS is disable
WIC test case requires wic-tools which in turn depends on intltool-native and
gettext-native. However, if NLS is disable, the gettext-minimal-native is used instead
of gettext-native causing a failure on intltool-native as seen below:

  checking for msgfmt... no
  checking for gmsgfmt... no
  configure: error: GNU gettext tools not found; required for intltool
  ERROR: Function failed: do_configure (log file is located at /home/lsandov1/poky/build/tmp/work/i586-poky-linux-musl/systemd-boot/232-r0/temp/log.do_configure.7518)
  ERROR: Task (/home/lsandov1/poky/meta/recipes-bsp/systemd-boot/systemd-boot_232.bb:do_configure) failed with exit code '1'
  NOTE: Tasks Summary: Attempted 609 tasks of which 604 didn't need to be rerun and 1 failed.

[YOCTO #10902]

(From OE-Core rev: ccd2faca99331e010badbb78d42b0ee644ca1a0a)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-10 23:00:43 +01:00
Joshua Lock 633ad6c9f4 oeqa/runtime/utils/targetbuildproject: use parent classes defaults tmpdir
Rather than hard-coding the tmpdir for TargetBuildProject to /tmp allow the
parent's default handling to define an appropriate tmpdir.

(From OE-Core rev: 901659a51cd53625a93f57a9c5865e90a07ec09d)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06 10:13:39 +01:00
Joshua Lock fa2e536c44 oeqa/utils/targetbuild: tmp dir improvements
Don't hard-code /tmp as the tmpdir, instead use WORKDIR as the tmpdir if the
instantiater doesn't specify a value.

(From OE-Core rev: c43c966e0ed4ed836bdf90b1d4c3f2f45426f1ec)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06 10:13:39 +01:00
Joshua Lock 04cf8ad80e oeqa/utils/buildproject: create a more unique tmp dir
Rather than hardcoding /tmp as the default tmpdir make a more unique tmpdir
with tempfile.mkdtemp() when the caller doesn't specify a tmpdir value.

(From OE-Core rev: 9425c2658fea0b45468a04574cd77bffc6668a8d)

Signed-off-by: Joshua Lock <joshua.g.lock@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-06 10:13:39 +01:00
Leonardo Sandoval e3c3d09562 selftest/devtool: skip test in case of poky-tiny distro
The recipe being tested (devtoo-test-patch-gz) by devtool has dependencies (at
least libxres and virtual/libx11) that cannot be built with poky-tiny distro so
skip the test for this particular policy.

[YOCTO #10891]

(From OE-Core rev: 03751783cb063bc6a57cd19357bc1016bfa2a814)

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>
2017-04-05 23:22:13 +01:00
Choong YinThong e66da71d31 selftest/recipetool: replace fedorahosted.org SRC_URI with github.com source
fedorahosted.org was retired on March 1st, 2017. This is to
update the SRC_URI to point to github.com.

[YOCTO #11226]

(From OE-Core rev: 9b3c9193d4a04061e64e43d55782a4d73ee166ad)

Signed-off-by: Choong YinThong <yin.thong.choong@intel.com>
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Jose Perez Carranza 163bb0e21b runtime/dnf : Add ID to the dnf test cases
Add the corresponding Testopia ID to the test cases for dnf

(From OE-Core rev: 434b48566f2febcc5bd5d6cd9c04788f008ffce1)

Signed-off-by: Jose Perez Carranza <jose.perez.carranza@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Leonardo Sandoval e19289f28f selftest/devtool: use kernel provider instead of recipe allowing other kernel providers
To generalize the unit test for other kernel providers, use virtual/kernel instead
of linux-yocto, allowing to run the selftest on non-poky distros, i.e. poky-tiny.

(From OE-Core rev: 087e1204fb27e2952f16c2e4761f5993b7722732)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Leonardo Sandoval b84671102e selftest/commands: extend variable regex to include A_B variable notation
This change allows quering for variables with the format A_B, i.e.
PREFERRED_PROVIDER_virtual/kernel instead of just A.

(From OE-Core rev: 3810738eff6bdcf27c7e291dbeaedc699ab14bfc)

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-05 23:22:12 +01:00
Leonardo Sandoval 63a3081006 selftest/pkgdata: replace the glibc recipe allowing execution on non-poky distros
Replace the glibc recipe for zlib on unit tests, otherwise tests are restricted
to glibc distros (poky).

[YOCTO #10890]

(From OE-Core rev: b77cf437e89a2ec21de6a69d5e34736925f1eeba)

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>
2017-04-01 08:14:58 +01:00
Ed Bartosh 67ec097bc3 wic: remove prepare_empty_partition_squashfs
There is not much sense in creation of empty squashfs
partition. It's also not possible to create empty squashfs
partition of specified size.

Even more, prepare_empty_partition_squashfs method is
absolutely broken. It raises exception when called and
even its signature differs from the rest of of similar
methods. It means that nobody uses it and it's safe
to remove it.

Removed prepare_empty_partition_squashfs method and
testing of empty squashfs partition.

(From OE-Core rev: 9152960f250cb4df1e559d747fb09005675a0d75)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:58 +01:00
Ed Bartosh 5efb8e039b oe-selftest: test creation of msdos partition
Added msdos partition to the .wks file in test_fs_types
wic test case.

[YOCTO #11137]

(From OE-Core rev: 044dd146d39542d0e6b598ee1dcadc49e0db3de9)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:58 +01:00
Ed Bartosh 09548406e1 oe-selftest: fix incorrect fstype
Fixed typo in wks content: squash->squashfs

(From OE-Core rev: cf06e6763d06e3e631bed85e2cb087f713808e6d)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:57 +01:00
Ed Bartosh a24ffc7088 oe-selftest: add test_image_bootpart_globbed test for wic
Test image-bootpart wic plugin with globbed value of
IMAGE_BOOT_FILES variable to increase test coverage.

[YOCTO #10618]

(From OE-Core rev: 4da2526800de1d40b51db96b0d5ab44dbaff68ff)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:57 +01:00
Ed Bartosh a7f22bd46f oe-selftest: add kickstart_parser test case
Added test_kickstart_parser test case to test wks parser
options not yet covered by tests.

[YOCTO #10618]

(From OE-Core rev: 36779a95f2e1e2c0d94ba81d30c8b1fc9dd161e4)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:57 +01:00
Ed Bartosh fae19c345d oe-selftest: add wic test case test_fs_types
Added wic test case to test all possible filesystem
types for empty and not empty partitions.

[YOCTO #10618]

(From OE-Core rev: 95ec9e6b987706fac9bd410681f0950f957989bb)

Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:57 +01:00
Mariano Lopez 739130370f oeqa/runtime/cases: Migrate underscore cases
There were two missing cases to be migrated to the new framework: _qemutiny and
_ptest.

qemutiny was straightforward.

ptest on the other hand wasn't working even in previous releases; it has been
migrated from smart to dnf, and how ptest packages are gathered to be
installed, adapted to use unicode, and removed a lot of code that wasn't needed
anymore.

(From OE-Core rev: ee7c19546b686e852d01df25143504d9798d10d6)

Signed-off-by: Mariano Lopez <mariano.lopez@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-04-01 08:14:57 +01:00
Patrick Ohly c76abc379e oeqa: allow persistent image writes in runqemu()
By default, QemuRunner avoids modifying the image files that it boots
into by enabling the qemu snapshot mode. However, some tests may want
to test changes that must persists across reboots, so this mode
should be optional.

This can be combined by copying the image file to a temporary location
first and then booting with that copy. It's also useful when testing
with additional drives attached to a virtual machine.

QemuTinyRunner doesn't use the snapshot parameter and therefore ignores
the new parameter.

Long term, a better way of passing these various configuration
parameters should be used, and perhaps QemuRunner and QemuTinyRunner
can be merged into one again to avoid code duplication. But for now
the patch follows the exiting style.

Also beware that QemuTarget.start() now acts in two different modes
(with or without explicit launch command), and depending on that mode
parameters like discard_writes must be ignored, i.e. not get passed to
launch().

(From OE-Core rev: 969d079a33a57f5a8f7af86d7bab04d35ab07584)

Signed-off-by: Patrick Ohly <patrick.ohly@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-03-28 10:34:37 +01:00