Fix more cases of improper test names
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.mi / mi-logging.exp
index d62bfe6bc1f5a8c8ed17c14570b57a581ede7cc8..8e2ffd7f8129777f1baeaac157092372491e6775 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012-2016 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,22 +21,19 @@ if [mi_gdb_start] {
     continue
 }
 
-set testfile basics
-set srcfile "$testfile.c"
-set executable ${testfile}
-set binfile $objdir/$subdir/$testfile
+standard_testfile basics.c
 set opts {debug}
 
-if [build_executable $testfile.exp $executable $srcfile $opts] {
-    untested mi-logging.exp
-    return -1;
+if [build_executable $testfile.exp $testfile $srcfile $opts] {
+    untested "failed to compile"
+    return -1
 }
 
 if {[mi_run_to_main] < 0} {
     return -1
 }
 
-set milogfile "milog.txt"
+set milogfile [standard_output_file "milog.txt"]
 
 mi_gdb_test "-gdb-set logging file $milogfile" ".*"
 
@@ -57,9 +54,9 @@ close $chan
 set mi_log_prompt "\[(\]gdb\[)\] \[\r\n\]+"
 
 if [regexp "\\^done\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-    pass "Log file contents"
+    pass "log file contents"
 } else {
-    fail "Log file contents"
+    fail "log file contents"
 }
 
 # Now try the redirect, which writes into the file only.
@@ -80,9 +77,9 @@ set logcontent [read $chan]
 close $chan
 
 if [regexp "1001\\^done\[\r\n\]+$mi_log_prompt.*1002\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt.*1003\\^running\[\r\n\]+\\*running,thread-id=\"all\"\[\r\n\]+$mi_log_prompt\\*stopped,reason=\"end-stepping-range\",.*\[\r\n\]+$mi_log_prompt" $logcontent] {
-    pass "Redirect log file contents"
+    pass "redirect log file contents"
 } else {
-    fail "Redirect log file contents"
+    fail "redirect log file contents"
 }
 
 mi_gdb_exit
This page took 0.026351 seconds and 4 git commands to generate.