From fcd9565ad3271854e03e8f6d8cb7d7d1286b6963 Mon Sep 17 00:00:00 2001 From: Guillaume Maudoux Date: Tue, 17 Sep 2024 11:50:32 +0200 Subject: [PATCH] Add tests for add-gc-root --- src/nix/store-add-gc-root.cc | 6 ++++++ tests/functional/meson.build | 1 + 2 files changed, 7 insertions(+) diff --git a/src/nix/store-add-gc-root.cc b/src/nix/store-add-gc-root.cc index cecab256413f..102b4575709a 100644 --- a/src/nix/store-add-gc-root.cc +++ b/src/nix/store-add-gc-root.cc @@ -19,6 +19,12 @@ struct CmdAddGCRoot : StoreCommand .handler = {&links}, .completer = completePath, }); + + addFlag({ + .longName = "no-check", + .description = "Do not test the validity of created roots.", + .handler = {&checkResults, false}, + }); } std::string description() override diff --git a/tests/functional/meson.build b/tests/functional/meson.build index 5167fa814b6f..6defbf417968 100644 --- a/tests/functional/meson.build +++ b/tests/functional/meson.build @@ -184,6 +184,7 @@ suites = [ 'debugger.sh', 'extra-sandbox-profile.sh', 'help.sh', + 'store-add-gc-root.sh', ], 'workdir': meson.current_build_dir(), },