@@ -4,7 +4,6 @@ use std::io::{BufRead, BufReader};
4
4
use std:: path:: { Path , PathBuf } ;
5
5
6
6
use crate :: common:: Config ;
7
- use crate :: header:: line_directive;
8
7
use crate :: runtest:: ProcRes ;
9
8
10
9
/// Representation of information to invoke a debugger and check its output
@@ -24,7 +23,6 @@ impl DebuggerCommands {
24
23
file : & Path ,
25
24
config : & Config ,
26
25
debugger_prefixes : & [ & str ] ,
27
- rev : Option < & str > ,
28
26
) -> Result < Self , String > {
29
27
let directives = debugger_prefixes
30
28
. iter ( )
@@ -39,18 +37,17 @@ impl DebuggerCommands {
39
37
for ( line_no, line) in reader. lines ( ) . enumerate ( ) {
40
38
counter += 1 ;
41
39
let line = line. map_err ( |e| format ! ( "Error while parsing debugger commands: {}" , e) ) ?;
42
- let ( lnrev, line) = line_directive ( "//" , & line) . unwrap_or ( ( None , & line) ) ;
43
-
44
- // Skip any revision specific directive that doesn't match the current
45
- // revision being tested
46
- if lnrev. is_some ( ) && lnrev != rev {
47
- continue ;
48
- }
49
40
41
+ // Breakpoints appear on lines with actual code, typically at the end of the line.
50
42
if line. contains ( "#break" ) {
51
43
breakpoint_lines. push ( counter) ;
44
+ continue ;
52
45
}
53
46
47
+ let Some ( line) = line. trim_start ( ) . strip_prefix ( "//" ) . map ( str:: trim_start) else {
48
+ continue ;
49
+ } ;
50
+
54
51
for & ( ref command_directive, ref check_directive) in & directives {
55
52
config
56
53
. parse_name_value_directive ( & line, command_directive)
0 commit comments