poky/meta
Mikko Rapeli 8af6f66bb4 testimage.bbclass: detect slirp from TEST_RUNQEMUPARAMS
Also set target and server IP addresses correctly to 127.0.0.1
so that TEST_TARGET_IP and TEST_SERVER_IP don't
need to be set manually with slirp.

Users run qemu images with slirp networking like this:

$ bitbake core-image-minimal
$ ../poky/scripts/runqemu slirp

slirp networking means that only one TCP port is forwarded from host
system to the qemu machine so that ssh into the machine works. ping
and other low level networking from host to target machine do not work,
but networking from target via host does work. This is much more easy to
setup than the bridge networking used by default, which I've never
managed to get running on various host machines.

To use slirp networking wita qemu and core-image-minimal to run testimage.bbclass tests, add
these to local.conf:

IMAGE_CLASSES += "testimage"
IMAGE_FEATURES += "ssh-server-dropbear"
TEST_RUNQEMUPARAMS += "slirp"

Then image can be compiled and tested with:

$ bitbake core-image-minimal
$ bitbake -c testimage core-image-minimal

Note that only few of the current oeqa runtime tests work against
core-image-minimal, but test results look like:

RESULTS:
RESULTS - date.DateTest.test_date: PASSED (3.64s)
RESULTS - df.DfTest.test_df: PASSED (0.55s)
RESULTS - oe_syslog.SyslogTest.test_syslog_running: PASSED (0.56s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_logger: PASSED (1.88s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_restart: PASSED (0.93s)
RESULTS - pam.PamBasicTest.test_pam: PASSED (2.20s)
RESULTS - parselogs.ParseLogsTest.test_parselogs: PASSED (4.98s)
RESULTS - ping.PingTest.test_ping: PASSED (0.05s)
RESULTS - ssh.SSHTest.test_ssh: PASSED (1.28s)
RESULTS - systemd.SystemdBasicTests.test_systemd_basic: PASSED (0.56s)
RESULTS - systemd.SystemdBasicTests.test_systemd_failed: PASSED (1.10s)
RESULTS - systemd.SystemdBasicTests.test_systemd_list: PASSED (0.92s)
RESULTS - systemd.SystemdJournalTests.test_systemd_boot_time: PASSED (0.56s)
RESULTS - systemd.SystemdJournalTests.test_systemd_journal: PASSED (0.54s)
RESULTS - apt.AptRepoTest.test_apt_install_from_repo: SKIPPED (0.00s)
RESULTS - buildcpio.BuildCpioTest.test_cpio: SKIPPED (0.00s)
RESULTS - buildgalculator.GalculatorTest.test_galculator: SKIPPED (0.00s)
RESULTS - buildlzip.BuildLzipTest.test_lzip: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_help: SKIPPED (0.00s)
RESULTS - connman.ConnmanTest.test_connmand_running: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_help: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_history: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_info: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_search: SKIPPED (0.00s)
RESULTS - dnf.DnfBasicTest.test_dnf_version: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_exclude: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_dependency: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_disk: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_install_from_http: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_installroot_usrmerge: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_makecache: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_reinstall: SKIPPED (0.00s)
RESULTS - dnf.DnfRepoTest.test_dnf_repoinfo: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gcc_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp2_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_gpp_compile: SKIPPED (0.00s)
RESULTS - gcc.GccCompileTest.test_make: SKIPPED (0.00s)
RESULTS - gi.GObjectIntrospectionTest.test_python: SKIPPED (0.00s)
RESULTS - go.GoHelloworldTest.test_gohelloworld: SKIPPED (0.00s)
RESULTS - kernelmodule.KernelModuleTest.test_kernel_module: SKIPPED (0.00s)
RESULTS - ldd.LddTest.test_ldd: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_newlog: SKIPPED (0.00s)
RESULTS - logrotate.LogrotateTest.test_logrotate_wtmp: SKIPPED (0.00s)
RESULTS - oe_syslog.SyslogTestConfig.test_syslog_startup_config: SKIPPED (0.00s)
RESULTS - opkg.OpkgRepoTest.test_opkg_install_from_repo: SKIPPED (0.00s)
RESULTS - perl.PerlTest.test_perl_works: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectfail: SKIPPED (0.00s)
RESULTS - ptest.PtestRunnerTest.test_ptestrunner_expectsuccess: SKIPPED (0.00s)
RESULTS - python.PythonTest.test_python3: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_help: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query: SKIPPED (0.00s)
RESULTS - rpm.RpmBasicTest.test_rpm_query_nonroot: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_check_rpm_install_removal_log_file_size: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_install: SKIPPED (0.00s)
RESULTS - rpm.RpmInstallRemoveTest.test_rpm_remove: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_cargo_compile: SKIPPED (0.00s)
RESULTS - rust.RustCompileTest.test_rust_compile: SKIPPED (0.00s)
RESULTS - scp.ScpTest.test_scp_file: SKIPPED (0.00s)
RESULTS - stap.StapTest.test_stap: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_disable_enable_ro: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_status: SKIPPED (0.00s)
RESULTS - systemd.SystemdServiceTests.test_systemd_stop_start: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_wayland_info: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_can_initialize_new_wayland_compositor: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_running: SKIPPED (0.00s)
RESULTS - weston.WestonTest.test_weston_supports_xwayland: SKIPPED (0.00s)
RESULTS - xorg.XorgTest.test_xorg_running: SKIPPED (0.00s)
SUMMARY:
core-image-minimal () - Ran 70 tests in 22.173s
core-image-minimal - OK - All required tests passed (successes=14, skipped=56, failures=0, errors=0)
NOTE: recipe core-image-minimal-1.0-r0: task do_testimage: Succeeded
NOTE: Tasks Summary: Attempted 1305 tasks of which 1304 didn't need to be rerun and all succeeded.

(From OE-Core rev: f4e865062cec06586d8c38c05d86a5b0d727625c)

Signed-off-by: Mikko Rapeli <mikko.rapeli@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2023-09-12 12:23:09 +01:00
..
classes classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables 2023-09-09 22:14:41 +01:00
classes-global base: add newline before LICENSE_FLAGS_DETAILS 2023-09-11 16:04:35 +01:00
classes-recipe testimage.bbclass: detect slirp from TEST_RUNQEMUPARAMS 2023-09-12 12:23:09 +01:00
conf defaultsetup: Inherit create-spdx by default 2023-09-12 07:46:52 +01:00
files build-sysroots: target or native sysroot population need to be selected explicitly 2023-09-09 12:04:55 +01:00
lib classes: Drop ';' delimiter from ROOTFS/IMAGE*COMMAND variables 2023-09-09 22:14:41 +01:00
recipes-bsp recipes/classes/scripts: Drop SRCPV usage in OE-Core 2023-08-24 16:50:24 +01:00
recipes-connectivity openssh: improve banner ptest failure logging 2023-09-12 07:45:52 +01:00
recipes-core libxcrypt-compat: Remove libcrypt.so to fix conflict with libcrypt 2023-09-12 07:45:52 +01:00
recipes-devtools cargo-c-native: fix version check 2023-09-12 07:45:52 +01:00
recipes-extended groff: update 1.22.4 -> 1.23.0 2023-09-07 14:36:30 +01:00
recipes-gnome libgudev: explicitly disable tests and vapi 2023-09-07 14:42:38 +01:00
recipes-graphics packagegroup-core-x11-xserver: add modesetting driver to default XSERVER 2023-09-12 07:45:52 +01:00
recipes-kernel linux: update CVE exclusions 2023-09-07 16:38:51 +01:00
recipes-multimedia ffmpeg: avoid neon on unsupported machines 2023-09-04 20:14:14 +01:00
recipes-rt recipes: Default to https git protocol where possible 2023-05-05 11:07:25 +01:00
recipes-sato webkitgtk: explicitly disable JIT for armv7* with softfp 2023-09-07 14:36:30 +01:00
recipes-support vim: Upgrade 9.0.1664 -> 9.0.1894 2023-09-12 07:45:52 +01:00
site site: remove at-spi2-core values 2023-09-02 07:45:29 +01:00
COPYING.MIT
recipes.txt Remove LSB support 2019-08-29 14:05:12 +01:00