nixos/tests/photonvision: init

This commit is contained in:
Max Niederman 2024-02-05 23:51:17 -08:00
parent 3609e216a4
commit ea7101783c
No known key found for this signature in database
GPG Key ID: C2EB24390E0AC0FF
3 changed files with 27 additions and 0 deletions

View File

@ -679,6 +679,7 @@ in {
pgjwt = handleTest ./pgjwt.nix {};
pgmanage = handleTest ./pgmanage.nix {};
phosh = handleTest ./phosh.nix {};
photonvision = handleTest ./photonvision.nix {};
photoprism = handleTest ./photoprism.nix {};
php = handleTest ./php {};
php81 = handleTest ./php { php = pkgs.php81; };

View File

@ -0,0 +1,21 @@
import ./make-test-python.nix ({ pkgs, lib, ... }:
{
name = "photonvision";
nodes = {
machine = { pkgs, ... }: {
services.photonvision = {
enable = true;
};
};
};
testScript = ''
start_all()
machine.wait_for_unit("photonvision.service")
machine.wait_for_open_port(5800)
'';
meta.maintainers = with lib.maintainers; [ max-niederman ];
})

View File

@ -5,6 +5,7 @@
, temurin-jre-bin-11
, bash
, suitesparse
, nixosTests
}:
stdenv.mkDerivation rec {
@ -39,6 +40,10 @@ stdenv.mkDerivation rec {
runHook postInstall
'';
passthru.tests = {
starts-web-server = nixosTests.photonvision;
};
meta = with lib; {
description = "The free, fast, and easy-to-use computer vision solution for the FIRST Robotics Competition";
homepage = "https://photonvision.org/";