nixos: gen 81 @ lilac — 2026-10-08 13:48 26.05.20260918.cf9d2fb (Yarara) -----
This commit is contained in:
+3
-22
@@ -138,9 +138,8 @@ in
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "jtest" ''
|
||||
set -euo pipefail
|
||||
if [ "$#" -lt 1 ]; then
|
||||
echo "usage: jtest <package.MainClass> [args...]"
|
||||
if [ "$#" -neq 1 ]; then
|
||||
echo "usage: jtest <package>"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@@ -151,27 +150,9 @@ in
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# --debug suspends the test JVM on start and waits for nvim-dap to attach
|
||||
# on :5005 (see the "Attach to jtest" config in nvim.nix), so breakpoints
|
||||
# set before running jtest --debug are hit from the very first test.
|
||||
DEBUG_ARGS=()
|
||||
if [[ "$1" = "debug" ]]; then
|
||||
DEBUG_ARGS=(-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=*:5005)
|
||||
shift
|
||||
echo "jtest: waiting for debugger to attach on 127.0.0.1:5005..." >&2
|
||||
fi
|
||||
|
||||
ROOT="$(jroot)"
|
||||
cd "$ROOT"
|
||||
jbuild "$1"
|
||||
if [ $# -eq 0 ]; then
|
||||
exec java "''${DEBUG_ARGS[@]}" -jar "$JUNIT" execute --class-path "bin:lib/*" --scan-class-path --details=tree
|
||||
fi
|
||||
ARGS=""
|
||||
for pkg in "$@"; do
|
||||
ARGS="$ARGS --select-package $pkg"
|
||||
done
|
||||
exec java "''${DEBUG_ARGS[@]}" -jar "$JUNIT" execute --class-path "bin:lib/*" $ARGS --details=tree
|
||||
exec java -jar "$JUNIT" execute --class-path "bin:lib/*" --select-package "$1"
|
||||
'')
|
||||
|
||||
(pkgs.writeShellScriptBin "fkill" ''
|
||||
|
||||
Reference in New Issue
Block a user