File tree Expand file tree Collapse file tree 3 files changed +57
-1
lines changed
Expand file tree Collapse file tree 3 files changed +57
-1
lines changed Original file line number Diff line number Diff line change 111111 } ;
112112 } ;
113113
114+ apps . config-precedence-integration-tests = {
115+ type = "app" ;
116+ program = toString (
117+ pkgs . writeShellScript "sce-config-precedence-integration-tests" ''
118+ exec ${ rustToolchain } /bin/cargo test --manifest-path cli/Cargo.toml --test config_precedence_integration "$@"
119+ ''
120+ ) ;
121+ meta = {
122+ description = "Run config-precedence integration tests for the sce CLI crate" ;
123+ } ;
124+ } ;
125+
114126 checks . cli-setup-command-surface = mkCheck "sce-cli-setup-command-surface-check" ''
115127 runHook preCheck
116128
Original file line number Diff line number Diff line change 142142 '' ;
143143 } ;
144144
145+ cliConfigPrecedenceIntegrationTestsApp = pkgs . writeShellApplication {
146+ name = "cli-config-precedence-integration-tests" ;
147+ runtimeInputs = [
148+ pkgs . git
149+ pkgs . nix
150+ ] ;
151+ text = ''
152+ set -euo pipefail
153+
154+ usage() {
155+ cat <<'EOF'
156+ Usage: nix run .#cli-config-precedence-integration-tests [-- --help]
157+
158+ Deterministic flake entrypoint for opt-in config-precedence integration tests.
159+ Runs the compiled-binary config precedence suite from cli/tests/config_precedence_integration.rs.
160+ This test slice is intentionally excluded from default nix flake check.
161+ EOF
162+ }
163+
164+ case "'' ${1:-}" in
165+ -h|--help)
166+ usage
167+ exit 0
168+ ;;
169+ esac
170+
171+ repo_root="$(git rev-parse --show-toplevel 2>/dev/null || true)"
172+ if [ -z "'' ${repo_root}" ]; then
173+ repo_root="$(pwd)"
174+ fi
175+
176+ exec nix develop "'' ${repo_root}" -c cargo test --manifest-path cli/Cargo.toml --test config_precedence_integration -- --nocapture
177+ '' ;
178+ } ;
179+
145180 agnixLspShim = pkgs . writeShellScriptBin "agnix-lsp" ''
146181 set -euo pipefail
147182
205240 } ;
206241 } ;
207242
243+ apps . cli-config-precedence-integration-tests = {
244+ type = "app" ;
245+ program = "${ cliConfigPrecedenceIntegrationTestsApp } /bin/cli-config-precedence-integration-tests" ;
246+ meta = {
247+ description = "Run opt-in config-precedence integration tests via Rust harness" ;
248+ } ;
249+ } ;
250+
208251 devShells . default = pkgs . mkShell {
209252 packages =
210253 with pkgs ;
240283 echo "- sync-opencode-config help: nix run .#sync-opencode-config -- --help"
241284 echo "- pkl-check-generated: nix run .#pkl-check-generated"
242285 echo "- cli-integration-tests: nix run .#cli-integration-tests"
286+ echo "- cli-config-precedence-integration-tests: nix run .#cli-config-precedence-integration-tests"
243287 '' ;
244288 } ;
245289 }
You can’t perform that action at this time.
0 commit comments