Some checks failed
Update Nix Packages with nix-update / nix-update (push) Failing after 3h23m59s
32 lines
1.5 KiB
Nix
32 lines
1.5 KiB
Nix
# Smoke tests for lib/agents.nix
|
|
# Verifies the library imports correctly and exports expected functions.
|
|
# Actual renderer derivations are verified by flake check building packages.
|
|
{
|
|
lib,
|
|
pkgs,
|
|
}: let
|
|
agentsLib = (import ../../lib {inherit lib;}).agents;
|
|
in
|
|
pkgs.runCommand "lib-agents-tests" {} ''
|
|
echo "Running lib agents smoke tests..."
|
|
|
|
# Verify all expected functions exist
|
|
${lib.optionalString (agentsLib ? loadCanonical) ''echo "1. pass: loadCanonical exists"''}
|
|
${lib.optionalString (!(agentsLib ? loadCanonical)) ''echo "1. FAIL: loadCanonical missing" && exit 1''}
|
|
|
|
${lib.optionalString (agentsLib ? renderForTool) ''echo "2. pass: renderForTool exists"''}
|
|
${lib.optionalString (!(agentsLib ? renderForTool)) ''echo "2. FAIL: renderForTool missing" && exit 1''}
|
|
|
|
${lib.optionalString (agentsLib ? renderForOpencode) ''echo "3. pass: renderForOpencode exists"''}
|
|
${lib.optionalString (!(agentsLib ? renderForOpencode)) ''echo "3. FAIL: renderForOpencode missing" && exit 1''}
|
|
|
|
${lib.optionalString (agentsLib ? renderForPi) ''echo "4. pass: renderForPi exists"''}
|
|
${lib.optionalString (!(agentsLib ? renderForPi)) ''echo "4. FAIL: renderForPi missing" && exit 1''}
|
|
|
|
${lib.optionalString (agentsLib ? shellHookForTool) ''echo "5. pass: shellHookForTool exists"''}
|
|
${lib.optionalString (!(agentsLib ? shellHookForTool)) ''echo "5. FAIL: shellHookForTool missing" && exit 1''}
|
|
|
|
echo "All smoke tests passed"
|
|
touch $out
|
|
''
|