From acc069eae454e337d999fee6f0aee5afe191d6f4 Mon Sep 17 00:00:00 2001 From: Brad Bishop Date: Fri, 13 Sep 2019 06:48:36 -0400 Subject: poky: subtree update:3b87508a9a..745e38ff0f Jacob Kroon (2): bitbake: bitbake-user-manual: Correct description for _append/_prepend/_remove bitbake: bitbake-user-manual: key-expansion: Don't refer to overrides Nathan Rossi (2): oeqa/selftest/context.py: For -t/-T use append argparse action chrpath.bbclass: Add break_hardlinks kwarg to allow breaking hardlinks Trevor Gamblin (1): libevent: don't treat test stats line as pass/fail in ptest Change-Id: I453a18f9177b070de9a2109a8b2b96694aa6e1c3 Signed-off-by: Brad Bishop --- .../bitbake-user-manual-metadata.xml | 15 ++++++--------- poky/meta/classes/chrpath.bbclass | 19 +++++++++++++------ poky/meta/lib/oeqa/selftest/context.py | 12 ++++++------ poky/meta/recipes-support/libevent/libevent/run-ptest | 9 +++++---- 4 files changed, 30 insertions(+), 25 deletions(-) (limited to 'poky') diff --git a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml index 88622421d..421364c2c 100644 --- a/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml +++ b/poky/bitbake/doc/bitbake-user-manual/bitbake-user-manual-metadata.xml @@ -369,9 +369,8 @@ These operators differ from the ":=", ".=", "=.", "+=", and "=+" - operators in that their effects are deferred - until after parsing completes rather than being immediately - applied. + operators in that their effects are applied at variable + expansion time rather than being immediately applied. Here are some examples: B = "bval" @@ -435,7 +434,7 @@ Like "_append" and "_prepend", "_remove" - is deferred until after parsing completes. + is applied at variable expansion time. @@ -800,17 +799,15 @@ Key Expansion - Key expansion happens when the BitBake datastore is finalized - just before BitBake expands overrides. + Key expansion happens when the BitBake datastore is finalized. To better understand this, consider the following example: A${B} = "X" B = "2" A2 = "Y" - In this case, after all the parsing is complete, and - before any overrides are handled, BitBake expands - ${B} into "2". + In this case, after all the parsing is complete, + BitBake expands ${B} into "2". This expansion causes A2, which was set to "Y" before the expansion, to become "X". diff --git a/poky/meta/classes/chrpath.bbclass b/poky/meta/classes/chrpath.bbclass index ad3c3975a..2870c10d5 100644 --- a/poky/meta/classes/chrpath.bbclass +++ b/poky/meta/classes/chrpath.bbclass @@ -1,7 +1,7 @@ CHRPATH_BIN ?= "chrpath" PREPROCESS_RELOCATE_DIRS ?= "" -def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d): +def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = False): import subprocess as sub p = sub.Popen([cmd, '-l', fpath],stdout=sub.PIPE,stderr=sub.PIPE) @@ -39,6 +39,9 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d): # if we have modified some rpaths call chrpath to update the binary if modified: + if break_hardlinks: + bb.utils.break_hardlinks(fpath) + args = ":".join(new_rpaths) #bb.note("Setting rpath for %s to %s" %(fpath, args)) p = sub.Popen([cmd, '-r', args, fpath],stdout=sub.PIPE,stderr=sub.PIPE) @@ -46,7 +49,7 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, tmpdir, d): if p.returncode != 0: bb.fatal("%s: chrpath command failed with exit code %d:\n%s%s" % (d.getVar('PN'), p.returncode, out, err)) -def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d): +def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = False): import subprocess as sub p = sub.Popen([d.expand("${HOST_PREFIX}otool"), '-L', fpath],stdout=sub.PIPE,stderr=sub.PIPE) @@ -61,11 +64,14 @@ def process_file_darwin(cmd, fpath, rootdir, baseprefix, tmpdir, d): if baseprefix not in rpath: continue + if break_hardlinks: + bb.utils.break_hardlinks(fpath) + newpath = "@loader_path/" + os.path.relpath(rpath, os.path.dirname(fpath.replace(rootdir, "/"))) p = sub.Popen([d.expand("${HOST_PREFIX}install_name_tool"), '-change', rpath, newpath, fpath],stdout=sub.PIPE,stderr=sub.PIPE) out, err = p.communicate() -def process_dir (rootdir, directory, d): +def process_dir(rootdir, directory, d, break_hardlinks = False): import stat rootdir = os.path.normpath(rootdir) @@ -95,7 +101,7 @@ def process_dir (rootdir, directory, d): continue if os.path.isdir(fpath): - process_dir(rootdir, fpath, d) + process_dir(rootdir, fpath, d, break_hardlinks = break_hardlinks) else: #bb.note("Testing %s for relocatability" % fpath) @@ -108,8 +114,9 @@ def process_dir (rootdir, directory, d): else: # Temporarily make the file writeable so we can chrpath it os.chmod(fpath, perms|stat.S_IRWXU) - process_file(cmd, fpath, rootdir, baseprefix, tmpdir, d) - + + process_file(cmd, fpath, rootdir, baseprefix, tmpdir, d, break_hardlinks = break_hardlinks) + if perms: os.chmod(fpath, perms) diff --git a/poky/meta/lib/oeqa/selftest/context.py b/poky/meta/lib/oeqa/selftest/context.py index 3126ada71..c4eb5d614 100644 --- a/poky/meta/lib/oeqa/selftest/context.py +++ b/poky/meta/lib/oeqa/selftest/context.py @@ -78,12 +78,12 @@ class OESelftestTestContextExecutor(OETestContextExecutor): parser.add_argument('--machine', required=False, choices=['random', 'all'], help='Run tests on different machines (random/all).') - parser.add_argument('-t', '--select-tags', dest="select_tags", - nargs='*', default=None, - help='Filter all (unhidden) tests to any that match any of the specified tags.') - parser.add_argument('-T', '--exclude-tags', dest="exclude_tags", - nargs='*', default=None, - help='Exclude all (unhidden) tests that match any of the specified tags. (exclude applies before select)') + parser.add_argument('-t', '--select-tag', dest="select_tags", + action='append', default=None, + help='Filter all (unhidden) tests to any that match any of the specified tag(s).') + parser.add_argument('-T', '--exclude-tag', dest="exclude_tags", + action='append', default=None, + help='Exclude all (unhidden) tests that match any of the specified tag(s). (exclude applies before select)') parser.set_defaults(func=self.run) diff --git a/poky/meta/recipes-support/libevent/libevent/run-ptest b/poky/meta/recipes-support/libevent/libevent/run-ptest index 080806dea..d3b5e793c 100644 --- a/poky/meta/recipes-support/libevent/libevent/run-ptest +++ b/poky/meta/recipes-support/libevent/libevent/run-ptest @@ -10,10 +10,11 @@ LOG="${LIBEVENTLIB}/ptest/libevent_ptest_$(date +%Y%m%d-%H%M%S).log" cd ${LIBEVENTLIB}/ptest -for test in ./test/* -do - $test 2>&1| sed -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG} -done +# Run only the libevent "regress" test. All other test scripts in the +# libevent "test" folder are related to performance, e.g. read/write +# rates, and/or do not provide a pass/fail output that can be recorded +# in the ptest log. +./test/regress 2>&1| sed -e '/TESTS/d' -e '/tests/d' -e '/OK/ s/^/PASS: / ; /FAILED/ s/^/FAIL: / ; /SKIPPED/ s/^/SKIP: / ; /DISABLED/ s/^/SKIP: /' | cut -f1,2 -d ':' | tee -a ${LOG} passed=`grep PASS ${LOG}|wc -l` failed=`grep FAIL ${LOG}|wc -l` -- cgit v1.2.3