Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e-test: Add build directive to libvirt code #1702

Conversation

mkulke
Copy link
Contributor

@mkulke mkulke commented Feb 20, 2024

fixes #1701

The libvirt go modules require a local installation of libvirt, without it will fail to run:

go test -c -tags=notlibvirt ./test/e2e
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lvirt-lxc
/usr/bin/ld: cannot find -lvirt-lxc
/usr/bin/ld: cannot find -lvirt-qemu
/usr/bin/ld: cannot find -lvirt-qemu
/usr/bin/ld: cannot find -lvirt
collect2: error: ld returned 1 exit status

We shouldn't require libvirt to be present on a machine running kubernetes tests, hence the added directive to fix the test build:

go test -c -tags=notlibvirt ./test/e2e

fixes confidential-containers#1701

The libvirt go modules require a local installation of libvirt, without
it will fail to run:

```bash
go test -c -tags=notlibvirt ./test/e2e
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: cannot find -lvirt-lxc
/usr/bin/ld: cannot find -lvirt-lxc
/usr/bin/ld: cannot find -lvirt-qemu
/usr/bin/ld: cannot find -lvirt-qemu
/usr/bin/ld: cannot find -lvirt
collect2: error: ld returned 1 exit status
```

We shouldn't require libvirt to be present on a machine running
kubernetes tests, hence the added directive to fix the test build:

```
go test -c -tags=notlibvirt ./test/e2e
```

Signed-off-by: Magnus Kulke <magnuskulke@microsoft.com>
Copy link
Member

@stevenhorsman stevenhorsman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for the improvement!

@mkulke mkulke added e2e-test test_e2e_libvirt Run Libvirt e2e tests and removed e2e-test labels Feb 20, 2024
@mkulke mkulke merged commit 46d7a3d into confidential-containers:main Feb 20, 2024
31 checks passed
@mkulke mkulke deleted the mkulke/add-build-directive-for-libvirt-code-in-test branch February 20, 2024 22:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test_e2e_libvirt Run Libvirt e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI: Azure e2e tests fail to run
3 participants