clean_restart
+set host_source2_scm [gdb_remote_download host $srcdir/$subdir/source2.scm]
+
# Do this instead of the skip_guile_check.
# We want to do some tests when Guile is not present.
gdb_test_multiple "guile (display 23) (newline)" "verify guile support" {
# If Guile is not supported, verify that sourcing a guile script
# causes an error.
- gdb_test "source $srcdir/$subdir/source2.scm" \
+ gdb_test "source $host_source2_scm" \
"Error in sourced command file:.*" \
"source source2.scm when guile disabled"
"end" "" \
"show user zzq" "User command \"zzq\":.* guile.*\\(print 23\\).* end"
-gdb_test "source $srcdir/$subdir/source2.scm" "yes" "source source2.scm"
+gdb_test "source $host_source2_scm" "yes" "source source2.scm"
gdb_test "source -s source2.scm" "yes"
"verify help to uiout"
# Verify that we can source a guile script using ~ for the HOME directory.
-save_vars { env(HOME) } {
- # Create a new directory to act as a temporary HOME directory.
- set tmp_home [standard_output_file tmp_home]
- file mkdir $tmp_home
-
- # Copy the file we want to source into the new HOME directory.
- gdb_remote_download host ${srcdir}/${subdir}/source2.scm \
- ${tmp_home}/source2.scm
-
- # Arrange to use the new HOME directory.
- set env(HOME) $tmp_home
- clean_restart
-
- # Finally, source the file out of our new HOME directory.
- gdb_test "source ~/source2.scm" "yes"
+if { ![is_remote host ] } {
+ save_vars { env(HOME) } {
+ # Create a new directory to act as a temporary HOME directory.
+ set tmp_home [standard_output_file tmp_home]
+ file mkdir $tmp_home
+
+ # Copy the file we want to source into the new HOME directory.
+ gdb_remote_download host ${srcdir}/${subdir}/source2.scm \
+ ${tmp_home}/source2.scm
+
+ # Arrange to use the new HOME directory.
+ set env(HOME) $tmp_home
+ clean_restart
+
+ # Finally, source the file out of our new HOME directory.
+ gdb_test "source ~/source2.scm" "yes"
+ }
}