Skip to content
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/itf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name: Install qemu
run: |
sudo apt-get update
sudo apt-get install -y qemu-system-arm
sudo apt-get install -y qemu-system-arm qemu-system-x86 cloud-image-utils
- name: Enable KVM group perms
run: |
sudo chmod 666 /dev/kvm
Expand Down
13 changes: 6 additions & 7 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -223,14 +223,13 @@ use_repo(imagefs, "score_qnx_x86_64_ifs_toolchain")

###############################################################################
#
# EBclfsa fastdev archive repository for Linux QEMU integration tests
# Linux QEMU images from the dedicated os_images repository
#
###############################################################################
http_file = use_repo_rule("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
bazel_dep(name = "os_images", version = "0.0.0", dev_dependency = True)

http_file(
name = "eb_corbos_toolkit_fastdev_archive",
downloaded_file_path = "fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz",
sha256 = "9ca3891b27e4b7bbf6c519d8924283e89c03b62513a988f751a3ee3d10c293e4",
urls = ["https://github.com/elektrobit/eb_corbos_toolkit/releases/download/v2.0.0-beta1/fastdev-ubuntu-ebclfsa-ebcl-qemuarm64.tar.gz"],
git_override(
module_name = "os_images",
commit = "b58e764aded6f5afeb13e612913ce8753eae2aac",
Comment thread
lurtz marked this conversation as resolved.
Outdated
remote = "https://github.com/eclipse-score/os_images.git",
)
45 changes: 43 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,47 @@ QEMU targets are configured using a JSON configuration file that specifies netwo
}
```

#### Linux QEMU images

Running tests with Linux is supported:

Ubuntu:

```starlark
py_itf_test(
name = "test_qemu_ubuntu",
srcs = ["test_qemu_ubuntu.py"],
args = [
"--qemu-rootfs=$(location @os_images//ubuntu_x86_64:image)",
"--qemu-config=$(location @os_images//ubuntu_x86_64:qemu_config)",
],
data = [
"@os_images//ubuntu_x86_64:image",
"@os_images//ubuntu_x86_64:qemu_config",
],
plugins = ["@score_itf//score/itf/plugins:qemu_plugin"],
)
```

Ebclfsa:

```starlark
py_itf_test(
name = "test_qemu_ebclfsa",
srcs = ["test_qemu_ebclfsa.py"],
args = [
"--qemu-rootfs=$(location @os_images//ebclfsa_aarch64:image)",
"--qemu-kernel=$(location @os_images//ebclfsa_aarch64:kernel)",
"--qemu-config=$(location @os_images//ebclfsa_aarch64:qemu_config)",
],
data = [
"@os_images//ebclfsa_aarch64:image",
"@os_images//ebclfsa_aarch64:kernel",
"@os_images//ebclfsa_aarch64:qemu_config",
],
plugins = ["@score_itf//score/itf/plugins:qemu_plugin"],
)
```

### Capability-Based Tests

Expand Down Expand Up @@ -442,9 +483,9 @@ bazel test //test:test_docker \
### QEMU Tests

```bash
# With pre-built QEMU image
# With a pre-built QEMU root filesystem image
bazel test //test:test_qemu \
--test_arg="--qemu-image=/path/to/kernel.img"
--test_arg="--qemu-rootfs=/path/to/rootfs.img"
Comment thread
lurtz marked this conversation as resolved.
```

## QEMU Setup (Linux)
Expand Down
36 changes: 29 additions & 7 deletions test/integration/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -213,17 +213,38 @@ py_itf_test(
py_itf_test(
name = "test_ebclfsa_ping",
srcs = [
"test_ebclfsa_ping.py",
"test_ping.py",
],
args = [
"--qemu-config=$(location //test/resources/ebclfsa_aarch64:qemu_config)",
"--qemu-kernel=$(location //test/resources/ebclfsa_aarch64:kernel)",
"--qemu-rootfs=$(location //test/resources/ebclfsa_aarch64:image)",
"--qemu-config=$(location @os_images//ebclfsa_aarch64:qemu_config)",
"--qemu-kernel=$(location @os_images//ebclfsa_aarch64:kernel)",
"--qemu-rootfs=$(location @os_images//ebclfsa_aarch64:image)",
],
data = [
"//test/resources/ebclfsa_aarch64:image",
"//test/resources/ebclfsa_aarch64:kernel",
"//test/resources/ebclfsa_aarch64:qemu_config",
"@os_images//ebclfsa_aarch64:image",
"@os_images//ebclfsa_aarch64:kernel",
"@os_images//ebclfsa_aarch64:qemu_config",
],
plugins = [
"//score/itf/plugins:qemu_plugin",
],
tags = [
"manual",
],
)

py_itf_test(
name = "test_ubuntu_ping",
srcs = [
"test_ping.py",
],
args = [
"--qemu-config=$(location @os_images//ubuntu_x86_64:qemu_config)",
"--qemu-rootfs=$(location @os_images//ubuntu_x86_64:image)",
],
data = [
"@os_images//ubuntu_x86_64:image",
"@os_images//ubuntu_x86_64:qemu_config",
],
plugins = [
"//score/itf/plugins:qemu_plugin",
Expand All @@ -240,6 +261,7 @@ test_suite(
],
tests = [
":test_ebclfsa_ping",
":test_ubuntu_ping",
],
)

Expand Down
File renamed without changes.
85 changes: 0 additions & 85 deletions test/resources/ebclfsa_aarch64/BUILD

This file was deleted.

105 changes: 0 additions & 105 deletions test/resources/ebclfsa_aarch64/build_image.sh

This file was deleted.

This file was deleted.

14 changes: 0 additions & 14 deletions test/resources/ebclfsa_aarch64/qemu_config.json

This file was deleted.

Loading