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

tests: Add basic e2e test #61

Merged
merged 7 commits into from
Feb 6, 2024
Merged

tests: Add basic e2e test #61

merged 7 commits into from
Feb 6, 2024

Commits on Jan 29, 2024

  1. tests: Add basic e2e test

    This reuses the puipui linux work from Code-Hex/vz.
    The OS is abstracted with a OSProvider interface which will hopefully
    be implementable with Fedora CoreOS or other distros.
    
    Tests which are currently implemented:
    - start a VM, and make sure it's possible to connect through ssh (both
      over a regular network interface, and over vsock)
    - for most devices, run lspci to make sure it's present in the VM
    - vsock-listen and vsock-connect
    - file sharing
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    357bf48 View commit details
    Browse the repository at this point in the history
  2. test: Add '-v' to test runs

    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    03a3499 View commit details
    Browse the repository at this point in the history
  3. tests: Reuse macOSAvailable code from Code-Hex/vz

    In the next commits, we want to avoid running the macOS13-specific tests
    on older macOS versions.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    a092c71 View commit details
    Browse the repository at this point in the history
  4. tests: Don't test macOS13-only devices on older macOS

    This will solve some test failures on macOS 12. There are likely more
    issues to fix on macOS 11.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    eb81164 View commit details
    Browse the repository at this point in the history
  5. ghactions: Don't run tests on macos 11

    The newly added e2e tests will fail on macos 11.
    it's 3 major releases behind (macos 14 was released a few months ago),
    I prefer not to spend too much time on it for now.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    c7a7e1f View commit details
    Browse the repository at this point in the history
  6. build: use codesign -f

    Running 'make' twice currently results in an error:
    
    ```
    % make
    CGO_ENABLED=1 CGO_CFLAGS=-mmacosx-version-min=11.0 GOOS=darwin GOARCH=amd64 go build -o out/vfkit-amd64 ./cmd/vfkit
    codesign --entitlements vf.entitlements -s - out/vfkit-amd64
    out/vfkit-amd64: is already signed
    make: *** [out/vfkit-amd64] Error 1
    ```
    
    This commit makes use of "codesign -f" to force the re-generation of a
    signature even if the binarie did not change. This works around the
    previous error.
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    d6ac775 View commit details
    Browse the repository at this point in the history
  7. ghactions: Only upload macos 13 artifacts

    We don't really need the other ones..
    
    Signed-off-by: Christophe Fergeau <[email protected]>
    cfergeau committed Jan 29, 2024
    Configuration menu
    Copy the full SHA
    8fbd4dc View commit details
    Browse the repository at this point in the history