This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
[PATCH 2/3] simple test suite fix in gdb.mi
- From: Tom Tromey <tromey at redhat dot com>
- To: gdb-patches at sourceware dot org
- Cc: Tom Tromey <tromey at redhat dot com>
- Date: Fri, 28 Jun 2013 11:12:54 -0600
- Subject: [PATCH 2/3] simple test suite fix in gdb.mi
- References: <1372439575-32347-1-git-send-email-tromey at redhat dot com>
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.
---
gdb/testsuite/gdb.mi/mi-basics.exp | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
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"
--
1.8.1.4