diff --git a/scripts/buck-argv-roundtrip-check.nu b/scripts/buck-argv-roundtrip-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-bridge-generality-check.nu b/scripts/buck-bridge-generality-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-coverage.nu b/scripts/buck-coverage.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-darwin-rust-run.nu b/scripts/buck-darwin-rust-run.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-env-names-check.nu b/scripts/buck-env-names-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-env.nu b/scripts/buck-env.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-escape-check.nu b/scripts/buck-escape-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-escape-roots-check.nu b/scripts/buck-escape-roots-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-first-party-paths-check.nu b/scripts/buck-first-party-paths-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-hosttools-parity.nu b/scripts/buck-hosttools-parity.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-include-closure-check.nu b/scripts/buck-include-closure-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-labels-check.nu b/scripts/buck-labels-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-pin-patches-check.nu b/scripts/buck-pin-patches-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-pin-paths-check.nu b/scripts/buck-pin-paths-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-pin-rev-check.nu b/scripts/buck-pin-rev-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-prefix-consistency.nu b/scripts/buck-prefix-consistency.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-script-refs-check.nu b/scripts/buck-script-refs-check.nu index 409977581..cc9e22cc4 100755 --- a/scripts/buck-script-refs-check.nu +++ b/scripts/buck-script-refs-check.nu @@ -103,10 +103,23 @@ def main [--scan: string = ""] { say $" plus ($named | length) check\(s) named by ($driver)" } - if ($bad | is-empty) and ($missing_checks | is-empty) { - say "PASS: every scripts/ written down still exists" + # AND IT HAS TO BE RUNNABLE, not merely present. buck-test.nu invokes several checks as + # ./scripts/.nu, and a file without the executable bit fails there with + # "Command not found ... refers to a file that is not executable", which reads like a + # missing script rather than a missing mode. EIGHTEEN of them were in that state after the + # python ports, and the suite died on the first one it reached. + let not_exec = (^find scripts -name "*.nu" ! -perm -u+x | complete | get stdout | lines + | where {|l| $l != "" } | sort) + + if ($bad | is-empty) and ($missing_checks | is-empty) and ($not_exec | is-empty) { + say "PASS: every scripts/ written down still exists and is executable" exit 0 } + if ($not_exec | is-not-empty) { + say $"FAIL: ($not_exec | length) nushell script\(s) are not executable, so a caller that" + say " runs them by path gets a confusing not-found error:" + for f in $not_exec { say $" ($f)" } + } for m in $missing_checks { say $"FAIL: ($driver) runs ($m), and neither scripts/($m).nu nor .sh is there" } diff --git a/scripts/buck-src-normalise-check.nu b/scripts/buck-src-normalise-check.nu old mode 100644 new mode 100755 diff --git a/scripts/buck-upstream-names-check.nu b/scripts/buck-upstream-names-check.nu old mode 100644 new mode 100755