1
0
mirror of https://github.com/ARM-software/devlib.git synced 2024-10-05 18:30:50 +01:00
Commit Graph

4 Commits

Author SHA1 Message Date
Metin Kaya
233f76d03a test_target.py: Allow specifying connection timeout for Android targets
Default connection timeout (30 secs) may be insufficient for some test
setups or in some conditions. Thus, support specifying timeout parameter
in target configuration file.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-04-01 14:02:38 -05:00
Metin Kaya
ac4f581f4b target: tests: Add support for testing ChromeOS targets
We can mimic ChromeOS target by combining a QEMU guest (for Linux
bindings of ``ChromeOsTarget`` class) with a Android virtual desktop
(for Android bits of ``ChromeOsTarget``).

Note that Android bindings of ``ChromeOsTarget`` class also requires
existence of ``/opt/google/containers/android`` folder on the Linux
guest.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-04-01 14:02:38 -05:00
Metin Kaya
228baeb317 target: Implement target runner classes
Add support for launching emulated targets on QEMU. The base class
``TargetRunner`` has groundwork for target runners like
``QEMUTargetRunner``.

``TargetRunner`` is a contextmanager which starts runner process (e.g.,
QEMU), makes sure the target is accessible over SSH (if
``connect=True``), and terminates the runner process once it's done.

The other newly introduced ``QEMUTargetRunner`` class:
- performs sanity checks to ensure QEMU executable, kernel, and initrd
  images exist,
- builds QEMU parameters properly,
- creates ``Target`` object,
- and lets ``TargetRunner`` manage the QEMU instance.

Also add a new test case in ``tests/test_target.py`` to ensure devlib
can run a QEMU target and execute some basic commands on it.

While we are in neighborhood, fix a typo in ``Target.setup()``.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-03-20 12:16:12 +00:00
Metin Kaya
dd84dc7e38 tests/test_target: Test more targets
Test Android and Linux targets as well in addition to LocalLinux target.
In order to keep basic verification easy, list complete list of test
targets in tests/target_configs.yaml.example and keep the default
configuration file for targets simple.

Also:
- Create a test folder on target's working directory.
- Remove all devlib artefacts after execution of the test.
- Add logs to show progress of operations.

Signed-off-by: Metin Kaya <metin.kaya@arm.com>
2024-03-20 12:16:12 +00:00