Skip to content

Commit

Permalink
use full target name in testDebugHandler
Browse files Browse the repository at this point in the history
this is required when targets exist twice,
e.g. due to subprojects

Signed-off-by: Jannik Glückert <[email protected]>
  • Loading branch information
Jannik2099 committed Sep 22, 2024
1 parent b5f8f3e commit b94ce5d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/tests.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import * as os from "os";
import * as vscode from "vscode";
import { ExecResult, exec, extensionConfiguration } from "./utils";
import { ExecResult, exec, extensionConfiguration, getTargetName } from "./utils";
import { Targets, Test, Tests, DebugEnvironmentConfiguration } from "./types";
import { getMesonTests, getMesonTargets } from "./introspection";
import { workspaceState } from "./extension";
Expand Down Expand Up @@ -156,9 +156,9 @@ export async function testDebugHandler(
relevantTests.some((test) => test.depends.some((dep) => dep == target.id)),
);

var args = ["compile", "-C", buildDir];
requiredTargets.forEach((target) => {
args.push(target.name);
let args = ["compile", "-C", buildDir];
requiredTargets.forEach(async (target) => {
args.push(await getTargetName(target));
});

try {
Expand Down

0 comments on commit b94ce5d

Please sign in to comment.