Skip to content

Commit 525aa5a

Browse files
committed
deqp: Fix invoking gdb
1 parent 4733c9c commit 525aa5a

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

src/deqp/driver.volt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55
*/
66
module deqp.driver;
77

8+
import core.exception;
9+
810
import watt = [
911
watt.path,
1012
watt.io.streams,
1113
watt.io.monotonic,
14+
watt.process.spawn,
1215
watt.algorithm,
1316
watt.xdg.basedir,
1417
watt.text.getopt,
@@ -36,6 +39,7 @@ public:
3639
noRerunTests: bool = false;
3740
noPassedResults: bool = false;
3841
invokeWithGDB: bool = false;
42+
gdbCommand: string;
3943
printOpts: PrintOptions;
4044

4145
batchSize: u32;
@@ -114,6 +118,12 @@ public:
114118
return ret;
115119
}
116120

121+
if (settings.invokeWithGDB) try {
122+
settings.gdbCommand = watt.getCommandFromName("gdb");
123+
} catch (Exception e) {
124+
abort(e.msg);
125+
}
126+
117127
// Tell the user what is going on.
118128
printConfig(settings);
119129

src/deqp/tests/runner.volt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public:
147147
"-ex", "stop",
148148
"-ex", "q",
149149
"--args", cmd] ~ args;
150-
cmd = "gdb";
150+
cmd = s.gdbCommand;
151151
}
152152

153153
console := new watt.OutputFileStream(fileConsole);
@@ -160,7 +160,7 @@ public:
160160

161161
timeStart = watt.ticks();
162162

163-
launcher.run(suite.command, args, ss.toString(), console, done);
163+
launcher.run(cmd, args, ss.toString(), console, done);
164164
console.close();
165165
}
166166

0 commit comments

Comments
 (0)