Skip to content

Commit

Permalink
Replace runCommandNoCCLocal alias with runCommandLocal
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored and nix-infra-bot committed Jan 1, 2025
1 parent bc87d91 commit d608bcc
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion modules/top-level/test.nix
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ in

build.test =
assert lib.assertMsg (cfg.runNvim -> cfg.buildNixvim) "`test.runNvim` requires `test.buildNixvim`.";
pkgs.runCommandNoCCLocal cfg.name
pkgs.runCommandLocal cfg.name
{
nativeBuildInputs = lib.optionals cfg.buildNixvim [
config.build.packageUnchecked
Expand Down
4 changes: 2 additions & 2 deletions tests/enable-except-in-tests.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
pkgs,
linkFarm,
runCommandNoCCLocal,
runCommandLocal,
mkTestDerivationFromNixvimModule,
makeNixvimWithModule,
}:
Expand All @@ -21,7 +21,7 @@ let
let
nvim = makeNixvimWithModule { inherit pkgs module; };
in
runCommandNoCCLocal "enable-except-in-tests-not-in-test"
runCommandLocal "enable-except-in-tests-not-in-test"
{ printConfig = "${nvim}/bin/nixvim-print-init"; }
''
if ! "$printConfig" | grep 'require("image").setup'; then
Expand Down
4 changes: 2 additions & 2 deletions tests/extend.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
makeNixvimWithModule,
runCommandNoCCLocal,
runCommandLocal,
}:
let
firstStage = makeNixvimWithModule {
Expand All @@ -13,7 +13,7 @@ let

generated = secondStage.extend { extraConfigLua = "-- third stage"; };
in
runCommandNoCCLocal "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
runCommandLocal "extend-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
config=$($printConfig)
for stage in "first" "second" "third"; do
if ! "$printConfig" | grep -q -- "-- $stage stage"; then
Expand Down
4 changes: 2 additions & 2 deletions tests/extra-args.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
makeNixvimWithModule,
runCommandNoCCLocal,
runCommandLocal,
}:
let
defaultModule =
Expand Down Expand Up @@ -31,7 +31,7 @@ let
};
};
in
runCommandNoCCLocal "special-arg-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
runCommandLocal "special-arg-test" { printConfig = "${generated}/bin/nixvim-print-init"; } ''
config=$($printConfig)
if ! "$printConfig" | grep -- '-- regularArg=regularValue'; then
echo "Missing regularArg in config"
Expand Down
4 changes: 2 additions & 2 deletions tests/extra-files.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
makeNixvimWithModule,
runCommandNoCCLocal,
runCommandLocal,
}:
let
extraFiles = {
Expand All @@ -15,7 +15,7 @@ let
};
};
in
runCommandNoCCLocal "extra-files-test"
runCommandLocal "extra-files-test"
{
root = build.config.build.extraFiles;
files = builtins.attrNames extraFiles;
Expand Down
8 changes: 4 additions & 4 deletions tests/failing-tests.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
pkgs,
linkFarmFromDrvs,
runCommandNoCCLocal,
runCommandLocal,
mkTestDerivationFromNixvimModule,
}:
let
Expand All @@ -10,7 +10,7 @@ let
args: pkgs.testers.testBuildFailure (mkTestDerivationFromNixvimModule ({ inherit pkgs; } // args));
in
linkFarmFromDrvs "failing-tests" [
(runCommandNoCCLocal "fail-running-nvim"
(runCommandLocal "fail-running-nvim"
{
failed = mkFailingNixvimTest {
name = "prints-hello-world";
Expand All @@ -27,7 +27,7 @@ linkFarmFromDrvs "failing-tests" [
touch $out
''
)
(runCommandNoCCLocal "fail-on-warnings"
(runCommandLocal "fail-on-warnings"
{
failed = mkFailingNixvimTest {
name = "warns-hello-world";
Expand All @@ -45,7 +45,7 @@ linkFarmFromDrvs "failing-tests" [
touch $out
''
)
(runCommandNoCCLocal "fail-on-assertions"
(runCommandLocal "fail-on-assertions"
{
failed = mkFailingNixvimTest {
name = "asserts-hello-world";
Expand Down
4 changes: 2 additions & 2 deletions tests/generated.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
lib,
runCommandNoCCLocal,
runCommandLocal,
pkgs,
}:
let
Expand Down Expand Up @@ -100,7 +100,7 @@ let
)
);
in
runCommandNoCCLocal "generated-sources-test"
runCommandLocal "generated-sources-test"
{
__structuredAttrs = true;
inherit errors;
Expand Down
6 changes: 3 additions & 3 deletions tests/lib-tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
helpers,
lib,
runCommandNoCCLocal,
runCommandLocal,
writeText,
}:
let
Expand Down Expand Up @@ -493,9 +493,9 @@ let
};
in
if results == [ ] then
runCommandNoCCLocal "lib-tests-success" { } "touch $out"
runCommandLocal "lib-tests-success" { } "touch $out"
else
runCommandNoCCLocal "lib-tests-failure"
runCommandLocal "lib-tests-failure"
{
results = lib.concatStringsSep "\n" (
builtins.map (result: ''
Expand Down
4 changes: 2 additions & 2 deletions tests/lsp-servers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
nixvimConfiguration,
stdenv,
runCommandNoCCLocal,
runCommandLocal,
name ? "lsp-all-servers",
}:
let
Expand Down Expand Up @@ -101,7 +101,7 @@ in
# This fails on darwin
# See https://github.com/NixOS/nix/issues/4119
if stdenv.isDarwin then
runCommandNoCCLocal name { } ''
runCommandLocal name { } ''
touch $out
''
else
Expand Down
4 changes: 2 additions & 2 deletions tests/maintainers.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
lib,
nixpkgsLib,
runCommandNoCCLocal,
runCommandLocal,
}:
let
inherit (lib) attrNames filter length;
Expand All @@ -10,7 +10,7 @@ let
duplicates = filter (name: nixpkgsList ? ${name}) (attrNames nixvimList);
count = length duplicates;
in
runCommandNoCCLocal "maintainers-test" { inherit count duplicates; } ''
runCommandLocal "maintainers-test" { inherit count duplicates; } ''
if [ $count -gt 0 ]; then
echo "$count nixvim maintainers are also nixpkgs maintainers:"
for name in $duplicates; do
Expand Down
4 changes: 2 additions & 2 deletions tests/package-options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
{
nixvimConfiguration,
lib,
runCommandNoCCLocal,
runCommandLocal,
}:
let
inherit (builtins)
Expand Down Expand Up @@ -47,7 +47,7 @@ let
|| match ''pkgs[.].*'' (opt.defaultText.text or "") == null
) drvOptions;
in
runCommandNoCCLocal "validate-package-options"
runCommandLocal "validate-package-options"
{
# Use structuredAttrs to avoid "Argument List Too Long" errors
# and get proper bash array support.
Expand Down
10 changes: 5 additions & 5 deletions tests/plugins-by-name.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
nixvimConfiguration,
linkFarmFromDrvs,
runCommandNoCCLocal,
runCommandLocal,
}:
let
by-name = ../plugins/by-name;
Expand Down Expand Up @@ -54,7 +54,7 @@ let
in
linkFarmFromDrvs "plugins-by-name" [
# Ensures all files matching `plugins/by-name/*` are directories
(runCommandNoCCLocal "file-types"
(runCommandLocal "file-types"
{
__structuredAttrs = true;
inherit (children) regular symlink unknown;
Expand Down Expand Up @@ -88,7 +88,7 @@ linkFarmFromDrvs "plugins-by-name" [
)

# Check default.nix files exist for each directory
(runCommandNoCCLocal "default-nix-exists"
(runCommandLocal "default-nix-exists"
{
__structuredAttrs = true;
missingPlugins = builtins.filter (
Expand Down Expand Up @@ -127,7 +127,7 @@ linkFarmFromDrvs "plugins-by-name" [
)

# Ensures all plugin enable options are declared in a directory matching the plugin name
(runCommandNoCCLocal "mismatched-plugin-names"
(runCommandLocal "mismatched-plugin-names"
{
__structuredAttrs = true;

Expand All @@ -153,7 +153,7 @@ linkFarmFromDrvs "plugins-by-name" [
)

# Ensure all plugin enable option are declared under an expected namespace
(runCommandNoCCLocal "unknown-plugin-namespaces"
(runCommandLocal "unknown-plugin-namespaces"
{
__structuredAttrs = true;

Expand Down

0 comments on commit d608bcc

Please sign in to comment.