aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
AgeCommit message (Collapse)Author
2017-08-15recipetool: create: fix incorrect URL variable usagepaule/recipetool-fetchuriPaul Eggleton
We have two variables here, srcuri and fetchuri. srcuri is what eventually ends up in the recipe, whereas fetchuri is what we actually pass to the fetcher when we fetch the source within recipetool - sometimes these need to be different particularly for an upcoming patch to handle automatically setting the branch parameter. In OE-Core revision 9a47a6690052ef943c0d4760630ee630fb012153 I erroneously changed the call to scriptutils.fetch_url() to pass srcuri instead of fetchuri - this likely didn't have any ill effect, but change it back to passing fetchuri to match the original intent. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
2017-08-09scripts/oe-publish-sdk: use hook to call git update-server-infoAndrea Galbusera
The author's initial intent was to use a git hook to automatically call update-server-info, but the wrong hook type was chosen (post-update). A post-commit one will do the job, hence allowing to drop the explicit call to update-server-info. Signed-off-by: Andrea Galbusera <gizero@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-09devtool: sdk-update: fix pulling updates from gitAndrea Galbusera
Commit 4657bc9d165e51981e034e73e7b92552e873eef7 replaced the git pull logic with the git fetch + git reset --hard combo, but resetting to HEAD does not really pull in new commits from remote... Replace with resetting to the upstream branch instead. Signed-off-by: Andrea Galbusera <gizero@gmail.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-08-08devtool: fix handling of errors during task executionPaul Eggleton
* If an error is logged while executing a task, we need to ensure we exit instead of assuming everything went OK. * If we receive CookerExit, the server is shutting down and we need to stop waiting for events and probably exit (knotty does this). This will occur if an exception or bb.fatal() happens during an event handler. This fixes a couple of issues highlighted when using devtool upgrade or modify on a non-supported recipe with intel-iot-refkit together with bitbake master, but I'd be very surprised if it were hard to reproduce in other scenarios. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03python: don't include -tests with modulesMark Asselstine
Although 'test' is listed in the python module list (https://docs.python.org/3/py-modindex.html) it is meant only to be used 'internally' by folks developing python itself. Per the documentation: Note The test package is meant for internal use by Python only. It is documented for the benefit of the core developers of Python. Any use of this package outside of Python’s standard library is discouraged as code mentioned here can change or be removed without notice between releases of Python. Per the above it is best not to include this module to discourage folks who might not head the above warnings. Additionally this module is one of the largest py modules going, by dropping this unneeded module from the 'modules' package we can reduce overall image size, something which is important for many embedded deployments. The generator scripts as well as the manifests have thus been modified accordingly, providing a generic mechanism to exclude modules from the 'all modules' package. Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-08-03wic: improve generating disk system identifierJonathan Liu
This should reduce the chance of generating 0xffffffff as the disk system identifier. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: Switch to using --use-uuid by defaultTom Rini
The most portable way to specifiy a root device in a disk image that we create is to use PARTUUID rather than /dev/sda2. As background, both GPT and MBR tables provide valid UUID values for each partition and the Linux Kernel contains the logic to parse this value. With this change we can now boot the default disk images when used as any valid block device that the included kernel uses. This for example means that VirtualBox can be used to run vmdk without changes as it uses IDE for the virtual disk controller. Cc: Matt Porter <mporter@konsulko.com> Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30image: Convert vmdk/vdi/qcow2 to strict CONVERSION_CMD typesTom Rini
The vmdk/vdi/qcow2 IMAGE_FSTYPEs predate wic. As such, they provide some similar underlying functionality in order to produce a "disk" image that in turn can be converted into different formats that various hypervisor types work with. They do not however provide the ability for other disk image types to be converted into these same output types. Furthermore, they are less flexible than what wic does provide. This drops the old style vmdk/vdi/qcow2 types and re-introduces them under the CONVERSION_CMD framework. The equivalent of vmdk is now wic.vmdk and so forth for the other types. Signed-off-by: Tom Rini <trini@konsulko.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: ensure generated disk system identifier is non-zeroJonathan Liu
Zero may be interpreted as no MBR signature present and another partitioning program might install a new MBR signature. Signed-off-by: Jonathan Liu <net147@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: add /boot mount point to fstab by defaultEd Bartosh
wic avoided adding /boot to fstab for no reason. This exception was hardcoded in the wic code. There is no need for this as mountpoint in .wks file is an optional field. It can be used only if user wants to have partitions automatically mounted on system boot. [YOCTO #11662] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: rootfs: make copied rootfs uniqueEd Bartosh
Used unique suffix (line number from .wks file) for the copied rootfs directory to avoid possible conflicts. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: rootfs: fix rootfs path reportingEd Bartosh
wic gets rootfs paths from partition object property 'rootfs_dir' and shows them in final report. rootfs plugin sets this property to the temporary path, which causes temporary paths appearing in the report. Changed the code to prevent storing temporary rootfs path in part.rootfs_dir. This should fix the report. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: use absolute paths in rootfs pluginEd Bartosh
Using relative paths can cause copyhardlinktree API to fail as it changes current directory when working. Converted all paths to absolute paths using os.path.realpath. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-30wic: copy rootfs directory before changing fstabEd Bartosh
wic updates /etc/fstab on root partition if there are valid mount points in .wks When wic runs from bitbake this can cause incorrect results or even breakage of other tasks working with the same rootfs directory in parallel with do_image_wic. Implemented copying rootfs directory to a temporary location using copyhardlinktree before updating fstab to avoid conflicts with other tasks working with the same rootfs directory. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-27runqemu: chmod 0o777 for lockdirRobert Yang
Multi-users may run qemu on the same host, all of them should be able to create or remove lock in lockdir, so set lockdir's mode to 0o777. Note, os.mkdir()'s mode is default to 0o777, but the current umask value is first masked out, so use os.chmod() to set it. Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-07-27runqemu: validate combosRobert Yang
Error out ealier if the combos is invalid, e.g.: $ runqemu tmp/deploy/images/qemux86/bzImage-qemux86.bin tmp/deploy/images/qemux86/core-image-minimal-qemux86.wic This will fail at kernel panic, no we check and error out early. We can add other checkings in the future. [YOCTO #11286] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-07-27runqemu: check tar.bz2 and .tar.gzRobert Yang
Handle them as nfs, so that cmd like the following can be boot: $ runqemu tmp/deploy/images/qemux86/core-image-minimal-qemux86.tar.bz2 [YOCTO #11286] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-07-27runqemu: check qbconfload before running bitbakeRobert Yang
If qbconfload (.qemuboot.conf is found) is present, we can get DEPLOY_DIR_IMAGE from it rather than "bitbake -e". Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-07-27runqemu: add --debug and --quietRobert Yang
And move some debug info into logger.debug(), this can make it easy to read key messages like errors or warnings. I checked meta/lib/oeqa/ they don't depend on these messages. And I have run "oe-selftest -a", it doesn't break anything. [YOCTO #10474] Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
2017-07-21wic: add description of --mkfs-extraoptsEd Bartosh
Updated help contents with the description of new wks option --mkfs-extraopts Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21wic: implement wks option --mkfs-extraoptsEd Bartosh
This option specifies extra options to pass to mkfs.<fstype> utilities. [YOCTO #11709] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21devtool: standard: enable options for PREMIRRORS and MIRRORSChang Rebecca Swee Fun
Since we have provide an option to manually enable PREMIRRORS and MIRRORS in recipetool, we need to make sure devtool is having the same options as devtool uses recipetool in creating new recipes. Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21devtool: find-recipe: enable new subcommand for devtoolChang Rebecca Swee Fun
devtool find-recipe will prints out the path to the recipe in a workspace. This subcommand can also help to find recipe outside of current workspace using "-a" or "--any-recipe" option. This enhancement helps developer to get the recipe path when working with devtool. [YOCTO #11434] Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21scriptutils: pass in logger as parameterChang Rebecca Swee Fun
logger was not defined in scriptutils.py based on the observation in python traceback. Traceback (most recent call last): File "/workdir/poky/scripts/devtool", line 351, in <module> ret = main() File "/workdir/poky/scripts/devtool", line 338, in main ret = args.func(args, config, basepath, workspace) File "/workdir/poky/scripts/lib/devtool/utilcmds.py", line 55, in edit_recipe return scriptutils.run_editor(find_recipe(args, config, basepath, workspace)) File "/workdir/poky/scripts/lib/scriptutils.py", line 141, in run_editor logger.error("Execution of '%s' failed: %s" % (editor, exc)) NameError: name 'logger' is not defined We pass in logger as parameter to run_editor() from where it has been called (devtool/utilcmds.py and recipetool/newappend.py), which both modules already has logger setup. Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21scriptutils: exit politely when no text editor availableChang Rebecca Swee Fun
devtool edit-recipe now has ugly tracebacks if executed without an editor available. This happens in the build containers whenever no text editor is available. subprocess.check_call will run text editing command with recipe path provided. It will wait for command to complete. If the return code was zero then return, otherwise raise CalledProcessError exception. This enhancement will suppress the traceback by catching the exception and prompt the error messages in a proper manner shown below: pokyuser@59c99c507238:/workdir/docker-dbg$ devtool edit-recipe ifupdown /bin/sh: 1: vi: not found ERROR: Execution of 'vi' failed: Command 'vi "/workdir/docker-dbg/workspace/recipes/ifupdown/ifupdown_0.8.16.bb"' returned non-zero exit status 127 [YOCTO #11434] Signed-off-by: Chang Rebecca Swee Fun <rebecca.swee.fun.chang@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21wic: fix calculation of partition numberEd Bartosh
Total number of partitions should be taken into account when calculating real partition number for msdos partition table. The number can be different for the 4th partition: it can be 4 if there are 4 partitions in the table and 5 if there are more than 4 partitions in the table. In the latter case number 4 is occupied by extended partition. [YOCTO #11790] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-21argparse_oe: Add int_positive typeAníbal Limón
Sometimes only expect positive values from cmdline so it's better to filter at parsing cmdline step instead of validate later. Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
2017-07-21recipetool: Setup logging before calling prepareRichard Purdie
This avoids test failures like: ====================================================================== ERROR [0.946s]: test_recipetool_load_plugin (recipetool.RecipetoolTests) INFO - ---------------------------------------------------------------------- INFO - Traceback (most recent call last): File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f return func(*args, **kwargs) File "/media/build1/poky/meta/lib/oeqa/selftest/cases/recipetool.py", line 514, in test_recipetool_load_plugin with open(srcfile) as fh: FileNotFoundError: [Errno 2] No such file or directory: 'NOTE: Starting bitbake server...\n/media/build1/poky/meta-selftest/lib/recipetool/bbpath.py' INFO - ---------------------------------------------------------------------- which comes from: $ recipetool --quiet pluginfile NOTE: Starting bitbake server... /media/build1/poky/meta-selftest/lib/recipetool/bbpath.py since there is corruption in the output despite the --quiet option. Setting the logging up before calling tinfoil.prepare() resolves this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21devtool: Setup logging before calling prepareRichard Purdie
This avoids test failures like: INFO - ====================================================================== INFO - FAIL [1.755s]: test_devtool_layer_plugins (devtool.DevtoolTests) INFO - ---------------------------------------------------------------------- INFO - Traceback (most recent call last): File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f return func(*args, **kwargs) File "/media/build1/poky/meta/lib/oeqa/selftest/cases/devtool.py", line 1354, in test_devtool_layer_plugins self.assertEqual(result.output, s[::-1]) AssertionError: "NOTE: Starting bitbake server...\noY senu[36 chars]rciM" != "oY senuZ s'enoynA morF tiforP oN edaM tfosorciM" - NOTE: Starting bitbake server... oY senuZ s'enoynA morF tiforP oN edaM tfosorciM INFO - ---------------------------------------------------------------------- since there is corruption in the output. Setting the logging up before calling tinfoil.prepare() resolves this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21oe-pkgdata-util: Setup logging before calling prepareRichard Purdie
This avoids test failures like: INFO - ====================================================================== INFO - FAIL [1.046s]: test_find_path (pkgdata.OePkgdataUtilTests) INFO - ---------------------------------------------------------------------- INFO - Traceback (most recent call last): File "/media/build1/poky/meta/lib/oeqa/core/decorator/__init__.py", line 32, in wrapped_f return func(*args, **kwargs) File "/media/build1/poky/meta/lib/oeqa/selftest/cases/pkgdata.py", line 50, in test_find_path self.assertEqual(result.output, 'zlib: /lib/libz.so.1') AssertionError: 'NOTE: Starting bitbake server...\nzlib: /lib/libz.so.1' != 'zlib: /lib/libz.so.1' - NOTE: Starting bitbake server... zlib: /lib/libz.so.1 INFO - ---------------------------------------------------------------------- since there is corruption in the output. Setting the logging up before calling tinfoil.prepare() resolves this. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21recipetool: create: refactor code for ensuring npm is availablePaul Eggleton
Across devtool and recipetool we had an ugly set of code for ensuring that we can call an npm binary, and much of that ugliness was a result of not being able to run build tasks when tinfoil was active - if recipetool found that npm was required and we didn't know beforehand (e.g. we're fetching from a plain git repository as opposed to an npm:// URL where it's obvious) then it had to exit and return a special result code, so that devtool knew it needed to build nodejs-native and then call recipetool again. Now that we are using real build tasks to fetch and unpack, we can drop most of this and move the code to the one place where it's still needed (i.e. create_npm where we potentially have to deal with node.js code in a plain source repository). Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21recipetool: create: reimplement fetching with normal fetch/unpack tasksPaul Eggleton
Now that we have the ability to run the tasks in a more standard context through tinfoil, change recipetool's fetching code to use that to fetch files using it. This has the major advantage that any dependencies of do_fetch and do_unpack (e.g. for subversion or npm) will be handled automatically. This also has the beneficial side-effect of fixing a recent regression that prevented this fetch operation from working with memory resident bitbake. Also fix devtool's usage of fetch_uri() at the same time so that we can completely replace it. Fixes [YOCTO #11710]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21recipetool: create: eliminate second fetch for packagesPaul Eggleton
When dealing with package files (.rpm, .ipk etc.) we need to unpack them ourselves to get the metadata, which is thrown away when the fetcher unpacks them. However, since we've already fetched the file once, I'm not sure as to why I thought I needed to fetch it again - we can just get the local path and then unpack it directly. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21recipetool: create: ensure meaningful error for malformed tarballsPaul Eggleton
If you pointed recipetool at a URL that should be a tarball e.g. https://tls.mbed.org/download/start/mbedtls-2.4.2-apache.tgz but instead it returns an HTML page, we try to unpack it, gzip complains but the operation doesn't seem to fail - instead we just get back an empty source tree. Change the checks to account for this - if the source tree is empty, check if the downloaded file in DL_DIR looks like an HTML file and error accordingly if it is. If it's not, error out anyway because no source was unpacked and it should have been (otherwise we just blindly set up EXTERNALSRC for this which is pointless). Fixes an aspect of [YOCTO #11407]. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21devtool: extract: refactor kern-tools-native handlingPaul Eggleton
When extracting linux-yocto kernel source, we don't need to dance around shutting down and starting up tinfoil anymore, we can just execute the tasks as needed when needed using tinfoil's new build_targets() function. This allows us to tidy up the code structure a bit. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-21oe-init-build-env-memres: Drop itRichard Purdie
With the new server structure we no longer need this separate environment init script. Just set BB_SERVER_TIMEOUT to be greater than zero and bitbake will remain in memory and the UI will auto-reconnect to it. Also clean out the old shutdown code from oe-init-build-env which also doesn't make sense now. Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2017-07-17recipetool: git reformat URI mangling & parameter strippedStanley Cheong Kwan, Phoong
recipetool seems to be mangling and stripping out the parameters for git URI. This will fix this issue as well as resolve the conflict of protocol parameter added by user. If a user adds their own protocol as an argument, it'll be honored. [YOCTO #11390] [YOCTO #11391] Signed-off-by: Stanley Cheong Kwan, Phoong <stanley.cheong.kwan.phoong@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: isoimage-isohybrid: use grub-efi from deploy dirEd Bartosh
isoimage-isohybrid plugin tries to build grub-efi in its working directory if it can't find efi binary. Wic should avoid doing anything in working directories of other recipes. It should use artifacts from the image deployment directory instead. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: isoimage-isohybrid: check result of glob()Ed Bartosh
isoimage-isohybrid plugin uses result of glob call to get path to initrd image. When glob returns empty list the plugin crashes with IndexError. Checking if result of glob call is not empty should fix the breakage. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: build wic-tools only if wic is run manuallyEd Bartosh
When wic can't find native sysroot it tries to build wic-tools However, it's not possible when wic is run from bitbake. Moreover, it's not even feasible anymore as wic-tools should be used only when wic is run manually. Checked if wic is run manually before building wic-tools. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: isoimage: do not remove temp directoryEd Bartosh
Removed isodir subrdirectory instead of removing temporary working directory as working directory can contain copy of rootfs partition and shouldn't be removed by any plugin. Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17wic: get rid of using wic-toolsEd Bartosh
At the moment, when building images with IMAGE_FSTYPES=wic one ends up depending on wic-tools and thus syslinux and grub-efi even when not using those at all. Ideally, building an image with wic should only build the tools and components really needed. The problem is that "wic-tools" is needed also for the manual invocations of wic, in which case everything that might be needed has to be built in advance. Replaced dependency on wic-tools with dependency to a much shorter set of tools that wic uses almost for any image: 'parted', 'gptfdisk', 'dosfstools' and 'mtools'. [YOCTO #11552] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17runqemu: check exit code of 'ls -t'Ed Bartosh
Used check_output instead of Popen as it raises CalledProcessError exception when command exits with non-zero exit code. Catched the exception to produce user-friendly output. [YOCTO #11719] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-17runqemu: reworked exception handlingEd Bartosh
Introduced custom RunQemuException that script raises on known errors. This exception is handled in one place and prints error output without printing Python traceback. This shoud make error output less scary for the end user. Handling of unknown errors has not been changed - both error and traceback will be printed. Reimplemented OEPathError exception code to handle it similarly to RunQemuException. Moved exception handling code into main() to keep it in one place. [YOCTO #11719] Signed-off-by: Ed Bartosh <ed.bartosh@linux.intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06oe-pkgdata-util: package-info: Allow extra variables to be displayedPeter Kjellerstedt
By specifying the -e <var> option one or multiple times, extra variables available in the pkgdata can be displayed, e.,g, `oe-pkgdata-util package-info -e SUMMARY -e LICENSE ...`. The extra variables displayed are quoted since some of them may contain whitespace. Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06yocto-compat-layer.py: make signature check code reusablePatrick Ohly
This moves the main content of test_signature into a helper function. It can be reused by arbitrary tests that need to do a before/after signature comparison. Long-term this might even be useful in oeqa itself. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06yocto-compat-layer.py: allow README with suffixPatrick Ohly
It may be useful to append a suffix denoting the file format. For example, README.rst is rendered differently when viewed on Github, and also helps editors to switch to a mode more suitable for the format. The tests uses a file pattern to find the README file(s) and treats the one with the shortest name as the main one which must not be empty. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06yocto-compat-layer.py: add test_worldPatrick Ohly
"test_signatures" ignores wold build breakage for the sake of reporting differences also when a world build is broken. Therefore we need a dedicated test that a world build at least theoretically can proceed without obvious parse time problems (dependencies, parse errors, dangling .bbappends, etc.). This is similar to the BSP test_machine_world. The difference is that test_world doesn't change the MACHINE. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06yocto-compat-layer.py: apply test_signatures to all layersPatrick Ohly
Software layers were previously allowed to change signatures, but that's not desired for those layers either. The rule that a layer which is "Yocto Compatible 2.0" must not change signatures unless explicitly requested holds for all kinds of layers. However, as this is something that software layers might not be able to do right away, testing for signature changes in software layers can be disabled. It's on by default, as that was Richard's recommendation. Whether that should change needs further discussion as part of finalizing "Yocto Compatible 2.0". As it might still change, the tool now has both a with/without parameter so that users of the tool can choose the desired behavior without being affected by future changes to the default. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
2017-07-06yocto-compat-layer.py: tolerate broken world builds during signature diffPatrick Ohly
The "test_signatures" test ignored a broken world build when getting signatures, but the code which then tried to analyze a difference found by the test didn't, which prevented printing the difference. Signed-off-by: Patrick Ohly <patrick.ohly@intel.com> Signed-off-by: Ross Burton <ross.burton@intel.com>