diff --git a/home/jashton.nix b/home/jashton.nix index 2d9937c..cc1c228 100644 --- a/home/jashton.nix +++ b/home/jashton.nix @@ -138,9 +138,8 @@ in '') (pkgs.writeShellScriptBin "jtest" '' - set -euo pipefail - if [ "$#" -lt 1 ]; then - echo "usage: jtest [args...]" + if [ "$#" -neq 1 ]; then + echo "usage: jtest " 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" ''