[OE-core] [PATCH v3 5/5] crosstap: replace script with new python based implementation
Burton, Ross
ross.burton at intel.com
Mon May 14 08:10:46 UTC 2018
On 5 April 2018 at 19:25, Victor Kamensky <kamensky at cisco.com> wrote:
> New crosstap python implementation is total replacement for
> crosstap shell script, that has superseding capabilities.
> New script support cross compiling of SystemTap scripts
> for user-land, by using supplied image rootfs. Whereas old
> script could only deal with scripts against kernel. New script
> has more complex logic and additional capabilities.
...
> + benv_kernel = BitbakeEnv("virtual/kernel")
> + (self.staging_bindir_toolchain,
> + self.target_prefix,
> + self.target_arch,
> + self.target_kernel_builddir
> + ) = benv_kernel.get_vars(
> + ("STAGING_BINDIR_TOOLCHAIN",
> + "TARGET_PREFIX",
> + "TRANSLATED_TARGET_ARCH",
> + "B"
> + ))
> + if not os.path.isdir(self.target_kernel_builddir):
> + print("ERROR: Cannot find '" + self.target_kernel_builddir +
> + "' directory. Was 'kernel/virtual' built?")
> + ret = False
You can't assume that B exists and is useful, as if virtual/kernel was
installed from sstate then all the installed pieces will be present
but $B will be empty.
For example, I re-ran oe-selftest on the autobuilder, the kernel was
extracted from sstate as the previous run built it, and the test
failed:
2018-05-13 22:36:08,905 - oe-selftest - INFO - FAIL:
test_crosstap_can_use_systemtap_on_qemu (crosstap.CrossTapTest)
2018-05-13 22:36:08,906 - oe-selftest - INFO -
----------------------------------------------------------------------
2018-05-13 22:36:08,906 - oe-selftest - INFO - Traceback (most recent
call last):
File "/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/meta/lib/oeqa/selftest/cases/crosstap.py",
line 25, in test_crosstap_can_use_systemtap_on_qemu
self.assertIn('hello world', result.output, 'Crosstap failed.')
AssertionError: 'hello world' not found in 'ERROR: Cannot find
\'/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-oe-selftest/build/build/tmp/work/qemux86_64-poky-linux/linux-yocto/4.14.30+gitAUTOINC+ea9330894e_74f6cd2b69-r0/linux-qemux86_64-standard-build\'
directory. Was \'kernel/virtual\' built?
Ross
More information about the Openembedded-core
mailing list