housekeeping: shellcheck for tests/functional/flakes/inputs.sh

This commit is contained in:
Cameron Dart 2024-06-04 13:33:24 -07:00 committed by John Ericson
parent d95adb531e
commit c7b3468968

View File

@ -8,12 +8,12 @@ requireGit
test_subdir_self_path() { test_subdir_self_path() {
baseDir=$TEST_ROOT/$RANDOM baseDir=$TEST_ROOT/$RANDOM
flakeDir=$baseDir/b-low flakeDir=$baseDir/b-low
mkdir -p $flakeDir mkdir -p "$flakeDir"
writeSimpleFlake $baseDir writeSimpleFlake "$baseDir"
writeSimpleFlake $flakeDir writeSimpleFlake "$flakeDir"
echo all good > $flakeDir/message echo all good > "$flakeDir/message"
cat > $flakeDir/flake.nix <<EOF cat > "$flakeDir"/flake.nix <<EOF
{ {
outputs = inputs: rec { outputs = inputs: rec {
packages.$system = rec { packages.$system = rec {
@ -26,7 +26,7 @@ test_subdir_self_path() {
} }
EOF EOF
( (
nix build $baseDir?dir=b-low --no-link nix build "$baseDir"?dir=b-low --no-link
) )
} }
test_subdir_self_path test_subdir_self_path
@ -34,14 +34,14 @@ test_subdir_self_path
test_git_subdir_self_path() { test_git_subdir_self_path() {
repoDir=$TEST_ROOT/repo-$RANDOM repoDir=$TEST_ROOT/repo-$RANDOM
createGitRepo $repoDir createGitRepo "$repoDir"
flakeDir=$repoDir/b-low flakeDir=$repoDir/b-low
mkdir -p $flakeDir mkdir -p "$flakeDir"
writeSimpleFlake $repoDir writeSimpleFlake "$repoDir"
writeSimpleFlake $flakeDir writeSimpleFlake "$flakeDir"
echo all good > $flakeDir/message echo all good > "$flakeDir/message"
cat > $flakeDir/flake.nix <<EOF cat > "$flakeDir"/flake.nix <<EOF
{ {
outputs = inputs: rec { outputs = inputs: rec {
packages.$system = rec { packages.$system = rec {
@ -55,15 +55,15 @@ test_git_subdir_self_path() {
} }
EOF EOF
( (
cd $flakeDir cd "$flakeDir"
git add . git add .
git commit -m init git commit -m init
# nix build # nix build
) )
clientDir=$TEST_ROOT/client-$RANDOM clientDir=$TEST_ROOT/client-$RANDOM
mkdir -p $clientDir mkdir -p "$clientDir"
cat > $clientDir/flake.nix <<EOF cat > "$clientDir"/flake.nix <<EOF
{ {
inputs.inp = { inputs.inp = {
type = "git"; type = "git";
@ -76,7 +76,7 @@ EOF
}; };
} }
EOF EOF
nix build $clientDir --no-link nix build "$clientDir" --no-link
} }
test_git_subdir_self_path test_git_subdir_self_path