Skip to content

Commit

Permalink
Use "nqp" command in $PATH directly
Browse files Browse the repository at this point in the history
The need to go directly for a moar commandline in order to pass
debugging flags is no longer there, since we have an nqp runner
that understands them.
  • Loading branch information
timo committed Nov 6, 2024
1 parent b78d205 commit 2665b4c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions t/lib/MoarRemoteTest.rakumod
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,9 @@ use v6.d.PREVIEW;
use Test;
use MoarVM::Remote;

use nqp;

sub run_debugtarget($code, &checker, :$start-suspended, :$writable) is export {
my $prefix = nqp::backendconfig<prefix>;

my $moarbinpath = %*ENV<DEBUGGABLE_MOAR_PATH>.?IO // $prefix.IO.add("bin/moar");

my $nqplibdir = $prefix.IO.add("share/nqp/lib");
my $nqpprogpath = $nqplibdir.add("nqp.moarvm");

my @pre-command = $moarbinpath.absolute, "--libpath=" ~ $nqplibdir.absolute;
my @post-command = $nqpprogpath.absolute, "-e", $code;
my @pre-command = (my $nqppath = %*ENV<DEBUGGABLE_NQP_PATH> // "nqp");
my @post-command = "-e", $code;

my $supplier = Supplier::Preserving.new;

Expand All @@ -34,7 +25,7 @@ sub run_debugtarget($code, &checker, :$start-suspended, :$writable) is export {
die "Address already in use"
}
when / "Unknown flag --debug-port=" / {
die "MoarVM binary at $moarbinpath doesn't understand debugger flags. Please set the environment variable DEBUGGABLE_MOAR_PATH to a moar binary that does."
die "NQP command at $nqppath doesn't understand debugger flags? Please set the environment variable DEBUGGABLE_NQP_PATH to a nqp command that does."
}
when / "SORRY" / {
die "Program could not be run: $_";
Expand Down

0 comments on commit 2665b4c

Please sign in to comment.