Files
podman/pkg/machine/e2e
openshift-merge-bot[bot] dad2d17e1c Merge pull request #23223 from baude/libkrundoc
add libkrun test docs
2024-07-09 14:45:51 +00:00
..
2024-02-19 15:23:56 -05:00
2023-02-11 18:23:24 +01:00
2024-02-15 21:05:17 -06:00
2024-04-26 12:31:42 -04:00
2024-07-01 14:23:11 +02:00
2024-02-15 21:05:17 -06:00
2024-07-09 08:54:09 -05:00
2024-07-01 14:23:11 +02:00

Running the machine tests

This document is a quick how-to run machine tests. Not all dependencies, like gvproxy are documented. You must install gvproxy in all cases described below.

General notes

Environment must be clean

You must not have any machines defined before running tests. Consider running podman machine reset prior to running tests.

Scoping tests

You can scope tests in the machine suite by adding various incantations of FOCUS=. For example, add FOCUS_FILE=basic_test.go to only run basic test. Or add FOCUS="simple init with start" to only run one test case. For windows, the syntax differs slightly. In windows, executing something like following achieves the same result:

./winmake localmachine "basic_test.go start_test.go"

Linux

QEMU

  1. make localmachine

Microsoft Windows

Hyper-V

  1. Open a powershell as admin
  2. $env:CONTAINERS_MACHINE_PROVIDER="hyperv"
  3. ./winmake localmachine

WSL

  1. Open a powershell as a regular user
  2. Build and copy win-sshproxy into bin/
  3. ./winmake localmachine

MacOS

Macs now support two different machine providers: applehv and libkrun. The applehv provider is the default.

Note: On macOS, an error will occur if the path length of $TMPDIR is longer than 22 characters. Please set the appropriate path to $TMPDIR. Also, if $TMPDIR is empty, /private/tmp will be set.

Apple Hypervisor

  1. brew install vfkit
  2. make podman-remote
  3. make localmachine

Libkrun

  1. brew install krunkit
  2. make podman-remote
  3. export CONTAINERS_MACHINE_PROVIDER="libkrun"
  4. make localmachine