diff options
author | Nick Roberts <nickrob@snap.net.nz> | 2007-01-12 21:31:35 +0000 |
---|---|---|
committer | Nick Roberts <nickrob@snap.net.nz> | 2007-01-12 21:31:35 +0000 |
commit | 18ef391a79907c2146c9f0d92f312b0fe42ccd05 (patch) | |
tree | 2854100e5d1109dbf0491ca6260fea8eb6f810da /gdb/testsuite | |
parent | 6c3c41f32933b997ad322176b5ac2213a04eb4f0 (diff) | |
download | gdb-18ef391a79907c2146c9f0d92f312b0fe42ccd05.zip gdb-18ef391a79907c2146c9f0d92f312b0fe42ccd05.tar.gz gdb-18ef391a79907c2146c9f0d92f312b0fe42ccd05.tar.bz2 |
* gdb.mi/mi-basics.exp, gdb.mi/mi2-basics.exp (test_dir_specification)
(test_path_specification): Use objdir instead of srcdir to always
get an absolute filename.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/gdb.mi/mi-basics.exp | 18 | ||||
-rw-r--r-- | gdb/testsuite/gdb.mi/mi2-basics.exp | 18 |
2 files changed, 18 insertions, 18 deletions
diff --git a/gdb/testsuite/gdb.mi/mi-basics.exp b/gdb/testsuite/gdb.mi/mi-basics.exp index 9cdc0c9..d8d4b17 100644 --- a/gdb/testsuite/gdb.mi/mi-basics.exp +++ b/gdb/testsuite/gdb.mi/mi-basics.exp @@ -42,7 +42,7 @@ set testfile "basics" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} set escapedobjdir [string_to_regexp ${objdir}] -set escapedsrcdir [string_to_regexp ${srcdir}] +set envirodir [string_to_regexp ${objdir}/${subdir}] if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { untested mi-basics.exp @@ -150,8 +150,9 @@ proc test_breakpoints_deletion {} { proc test_dir_specification {} { global mi_gdb_prompt - global srcdir + global objdir global subdir + global envirodir # Add to the search directories, display, then reset back to default # Tests: @@ -159,9 +160,7 @@ proc test_dir_specification {} { # -environment-directory # -environment-directory -r - set envirodir [string_to_regexp ${srcdir}/${subdir}] - - mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \ + mi_gdb_test "202-environment-directory ${objdir}/${subdir}" \ "202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ "environment-directory arg operation" @@ -198,9 +197,9 @@ proc test_path_specification {} { global mi_gdb_prompt global orig_path global objdir - global srcdir + global subdir global escapedobjdir - global escapedsrcdir + global envirodir # Add to the path, display, then reset # Tests: @@ -221,13 +220,14 @@ proc test_path_specification {} { } 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 $srcdir $objdir" \ - "208\\\^done,path=\"$escapedsrcdir.$escapedobjdir.$orig_path\"" \ + mi_gdb_test "208-environment-path $objdir ${objdir}/${subdir}" \ + "208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \ "environment-path dir1 dir2 operation" mi_gdb_test "209-environment-path -r $objdir" \ diff --git a/gdb/testsuite/gdb.mi/mi2-basics.exp b/gdb/testsuite/gdb.mi/mi2-basics.exp index 824ee42..9075029 100644 --- a/gdb/testsuite/gdb.mi/mi2-basics.exp +++ b/gdb/testsuite/gdb.mi/mi2-basics.exp @@ -42,7 +42,7 @@ set testfile "basics" set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} set escapedobjdir [string_to_regexp ${objdir}] -set escapedsrcdir [string_to_regexp ${srcdir}] +set envirodir [string_to_regexp ${objdir}/${subdir}] if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug additional_flags=-DFAKEARGV}] != "" } { untested mi2-basics.exp @@ -150,8 +150,9 @@ proc test_breakpoints_deletion {} { proc test_dir_specification {} { global mi_gdb_prompt - global srcdir + global objdir global subdir + global envirodir # Add to the search directories, display, then reset back to default # Tests: @@ -159,9 +160,7 @@ proc test_dir_specification {} { # -environment-directory # -environment-directory -r - set envirodir [string_to_regexp ${srcdir}/${subdir}] - - mi_gdb_test "202-environment-directory ${srcdir}/${subdir}" \ + mi_gdb_test "202-environment-directory ${objdir}/${subdir}" \ "202\\\^done,source-path=\"${envirodir}.\\\$cdir.\\\$cwd\"" \ "environment-directory arg operation" @@ -200,9 +199,9 @@ proc test_path_specification {} { global mi_gdb_prompt global orig_path global objdir - global srcdir + global subdir global escapedobjdir - global escapedsrcdir + global envirodir # Add to the path, display, then reset # Tests: @@ -223,13 +222,14 @@ proc test_path_specification {} { } 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 $srcdir $objdir" \ - "208\\\^done,path=\"$escapedsrcdir.$escapedobjdir.$orig_path\"" \ + mi_gdb_test "208-environment-path $objdir ${objdir}/${subdir}" \ + "208\\\^done,path=\"$escapedobjdir.${envirodir}.$orig_path\"" \ "environment-path dir1 dir2 operation" mi_gdb_test "209-environment-path -r $objdir" \ |