diff options
author | Yao Qi <yao@codesourcery.com> | 2014-08-14 14:16:56 +0800 |
---|---|---|
committer | Yao Qi <yao@codesourcery.com> | 2014-08-22 13:44:18 +0800 |
commit | 7c343b48b22f04616bd699779118ede2a6aac4b1 (patch) | |
tree | 2d9d7498a410999a744311e269939e12135917e8 /gdb/testsuite/gdb.python/python.exp | |
parent | baa23169d141b442cdbee3e79279793fe4fbc0f1 (diff) | |
download | gdb-7c343b48b22f04616bd699779118ede2a6aac4b1.zip gdb-7c343b48b22f04616bd699779118ede2a6aac4b1.tar.gz gdb-7c343b48b22f04616bd699779118ede2a6aac4b1.tar.bz2 |
Copy .py files to remote host
Some gdb.python/*.exp tests fail because the .py files aren't copied
to the (remote) host. This patch is to copy needed .py files to host.
Most of gdb.python/*.exp tests do this.
As it is still controversial to delete *.py files on host, we don't do
that in this patch.
gdb/testsuite:
2014-08-22 Yao Qi <yao@codesourcery.com>
* gdb.python/py-finish-breakpoint.exp: Copy .py file to host.
* gdb.python/py-finish-breakpoint2.exp: Likewise.
* gdb.python/python.exp: Likewise. Use .py file on the host
instead of the build.
Diffstat (limited to 'gdb/testsuite/gdb.python/python.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/python.exp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index c03c284..49f6e88 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -30,6 +30,9 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir +set remote_source2_py [gdb_remote_download host \ + ${srcdir}/${subdir}/source2.py] + # Do this instead of the skip_python_check. # We want to do some tests when Python is not present. gdb_test_multiple "python print (23)" "verify python support" { @@ -38,7 +41,7 @@ gdb_test_multiple "python print (23)" "verify python support" { # If Python is not supported, verify that sourcing a python script # causes an error. - gdb_test "source $srcdir/$subdir/source2.py" \ + gdb_test "source $remote_source2_py" \ "Error in sourced command file:.*" \ "source source2.py when python disabled" @@ -73,7 +76,7 @@ gdb_py_test_multiple "indented multi-line python command" \ "foo ()" "" \ "end" "hello, world!" -gdb_test "source $srcdir/$subdir/source2.py" "yes" "source source2.py" +gdb_test "source $remote_source2_py" "yes" "source source2.py" gdb_test "source -s source2.py" "yes" "source -s source2.py" |