[PATCH] Copy .py files to remote host

Yao Qi yao@codesourcery.com
Wed Aug 13 00:56:00 GMT 2014


On 08/13/2014 01:15 AM, Doug Evans wrote:
> I still have an outstanding question on this topic,
> and before this gets checked in I'd like to get it resolved.
> Do we delete other files downloaded to the remote target?

Yes, at least shared libs downloaded to target are cleaned up.
In lib/gdb.exp, there is a list cleanfiles, to record the files
downloaded to target, and in gdb_finish, remove files in this list.

> 
> At one point I tried to find a place there the testsuite code was
> taking care to delete other downloaded files, but couldn't.
> Since we've gotten by this long without doing so
> [and this is *still* just a hypothesis - I haven't worked with
> remote hosts in awhile ...]
> I would rather just punt on deleting python files as well,
> and document that that is the convention (since for every other
> file it already is :-)).
> [Why treat python files differently?]

Where can we document this convention? gdb/testsuite/README?  I can't
find a proper one.  Existing test cases are good documentation to me,
and people usually follow the existing tests when they create new ones.

> 
> If we really did want to fully clean up after each test,
> and we should first establish that that is indeed what we want to do,
> instead of filling every test exit point with explicit code to delete
> only one kind of downloaded file, how about instead keep a list of all
> downloaded files and call a routine to delete the files in that list
> from some central cleanup point?

Yeah, I also dislike writing "remote_file host delete $FOO" at the each
test exit point explicitly.  Not sure what do you want in "fully clean
up", but at least, we can clean up python files as you said.

-- 
Yao (齐尧)



More information about the Gdb-patches mailing list