I ran the testsuite and ran into ERRORs in two test-cases,
gdb.trace/save-trace.exp and gdb.threads/tls-sepdebug.exp.
Recently added test-case gdb.src/pre-commit.exp changes the working directory,
and the change stays active in following test-cases, which was not the
intention.
Fix this using with_cwd.
Tested on x86_64-linux.
return
}
-cd $repodir
+with_cwd $repodir {
-set result [remote_exec build "pre-commit --version"]
-set status [lindex $result 0]
-if {$status != 0} {
- unsupported "pre-commit missing or broken"
- return
-}
+ set result [remote_exec build "pre-commit --version"]
+ set status [lindex $result 0]
+ if {$status != 0} {
+ unsupported "pre-commit missing or broken"
+ return
+ }
-set result [remote_exec build "pre-commit run --all-files -v"]
-set status [lindex $result 0]
-gdb_assert {$status == 0} "pre-commit checks"
+ set result [remote_exec build "pre-commit run --all-files -v"]
+ set status [lindex $result 0]
+ gdb_assert {$status == 0} "pre-commit checks"
+
+}