-# Copyright (C) 2010-2014 Free Software Foundation, Inc.
+# Copyright (C) 2010-2016 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
if { [skip_python_tests] } { continue }
# We use "." here instead of ":" so that this works on win32 too.
-gdb_test "python print (gdb.parameter ('directories'))" "$srcdir/$subdir.\\\$cdir.\\\$cwd"
+if { [is_remote host] } {
+ # Don't match $srcdir/$subdir because proc gdb_reinitialize_dir
+ # doesn't set search directories on remote host.
+ set directories ".*\\\$cdir.\\\$cwd"
+} else {
+ set escaped_directory [string_to_regexp "$srcdir/$subdir"]
+ set directories "$escaped_directory.\\\$cdir.\\\$cwd"
+}
+gdb_test "python print (gdb.parameter ('directories'))" $directories
# Test a simple boolean parameter.
gdb_py_test_multiple "Simple gdb booleanparameter" \