@@ -725,7 +725,7 @@ func (t *test) run() {
725
725
// Fail if wantError is true and compilation was successful and vice versa.
726
726
// Match errors produced by gc against errors in comments.
727
727
// TODO(gri) remove need for -C (disable printing of columns in error messages)
728
- cmdline := []string {goTool (), "tool" , "compile" , "-C" , "-e" , "-o" , "a.o" }
728
+ cmdline := []string {goTool (), "tool" , "compile" , "-d=panic" , "- C" , "-e" , "-o" , "a.o" }
729
729
// No need to add -dynlink even if linkshared if we're just checking for errors...
730
730
cmdline = append (cmdline , flags ... )
731
731
cmdline = append (cmdline , long )
@@ -830,6 +830,7 @@ func (t *test) run() {
830
830
}
831
831
832
832
case "errorcheckdir" , "errorcheckandrundir" :
833
+ flags = append (flags , "-d=panic" )
833
834
// Compile and errorCheck all files in the directory as packages in lexicographic order.
834
835
// If errorcheckdir and wantError, compilation of the last package must fail.
835
836
// If errorcheckandrundir and wantError, compilation of the package prior the last must fail.
@@ -1179,7 +1180,7 @@ func (t *test) run() {
1179
1180
t .err = fmt .Errorf ("write tempfile:%s" , err )
1180
1181
return
1181
1182
}
1182
- cmdline := []string {goTool (), "tool" , "compile" , "-e" , "-o" , "a.o" }
1183
+ cmdline := []string {goTool (), "tool" , "compile" , "-d=panic" , "- e" , "-o" , "a.o" }
1183
1184
cmdline = append (cmdline , flags ... )
1184
1185
cmdline = append (cmdline , tfile )
1185
1186
out , err = runcmd (cmdline ... )
0 commit comments