aboutsummaryrefslogtreecommitdiff
path: root/gdb
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-07-16 18:49:32 +0000
committerTom Tromey <tromey@redhat.com>2013-07-16 18:49:32 +0000
commit5ee657d5a2633520d05da7b4e29924c29d945840 (patch)
tree8eb4fdea7989629f20cbf0d8c845637315ecb66c /gdb
parent20e3d738feac37983dda0f0b680768315e62d29c (diff)
downloadgdb-5ee657d5a2633520d05da7b4e29924c29d945840.zip
gdb-5ee657d5a2633520d05da7b4e29924c29d945840.tar.gz
gdb-5ee657d5a2633520d05da7b4e29924c29d945840.tar.bz2
simple test suite fix in gdb.mi
This is another simple test suite change for the parallelization project. This changes mi-basics.exp to avoid the use of subdir and objdir and instead use standard_output_file. There are still some uses of objdir, but as noted in a new comment in the patch, these uses are parallel-safe. * gdb.mi/mi-basics.exp: Use standard_output_file. (test_dir_specification, test_cwd_specification) (test_path_specification): Use testsubdir, not subdir and objdir.
Diffstat (limited to 'gdb')
-rw-r--r--gdb/testsuite/ChangeLog6
-rw-r--r--gdb/testsuite/gdb.mi/mi-basics.exp17
2 files changed, 15 insertions, 8 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 749864d..f1ce47e 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,11 @@
2013-07-16 Tom Tromey <tromey@redhat.com>
+ * gdb.mi/mi-basics.exp: Use standard_output_file.
+ (test_dir_specification, test_cwd_specification)
+ (test_path_specification): Use testsubdir, not subdir and objdir.
+
+2013-07-16 Tom Tromey <tromey@redhat.com>
+
* gdb.trace/mi-traceframe-changed.exp: Don't use objdir.
2013-07-09 Joel Brobecker <brobecker@adacore.com>
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp
index 8ec9388..c8bb3f7 100644
--- a/gdb/testsuite/gdb.mi/mi-basics.exp
+++ b/gdb/testsuite/gdb.mi/mi-basics.exp
@@ -34,8 +34,12 @@ if [mi_gdb_start separate-inferior-tty] {
}
standard_testfile basics.c
+# This file was audited to ensure that the explicit references to
+# objdir in it are safe for parallel testing. Please be sure to
+# maintain this property in any additions.
set escapedobjdir [string_to_regexp ${objdir}]
-set envirodir [string_to_regexp ${objdir}/${subdir}]
+set testsubdir [standard_output_file ""]
+set envirodir [string_to_regexp $testsubdir]
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
untested mi-basics.exp
@@ -127,9 +131,8 @@ proc test_breakpoints_deletion {} {
proc test_dir_specification {} {
global mi_gdb_prompt
- global objdir
- global subdir
global envirodir
+ global testsubdir
# Add to the search directories, display, then reset back to default
# Tests:
@@ -137,7 +140,7 @@ proc test_dir_specification {} {
# -environment-directory
# -environment-directory -r
- mi_gdb_test "202-environment-directory ${objdir}/${subdir}" \
+ mi_gdb_test "202-environment-directory ${testsubdir}" \
"202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \
"environment-directory arg operation"
@@ -154,7 +157,6 @@ proc test_cwd_specification {} {
global mi_gdb_prompt
global objdir
global escapedobjdir
- global subdir
# Change the working directory, then print the current working directory
# Tests:
@@ -178,8 +180,8 @@ proc test_path_specification {} {
global mi_gdb_prompt
global orig_path
global objdir
- global subdir
global escapedobjdir
+ global testsubdir
global envirodir
global expect_out
@@ -194,13 +196,12 @@ proc test_path_specification {} {
set orig_path $expect_out(3,string)
set orig_path [string_to_regexp ${orig_path}]
- set pathdir [string_to_regexp ${objdir}/${subdir}]
mi_gdb_test "207-environment-path" \
"207\\\^done,path=\"$orig_path\"" \
"environment-path no-args operation"
- mi_gdb_test "208-environment-path $objdir ${objdir}/${subdir}" \
+ mi_gdb_test "208-environment-path $objdir ${testsubdir}" \
"208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \
"environment-path dir1 dir2 operation"