On Tue, 2011-03-22 at 00:10 +0800, 朱晨杰 wrote:
> Hi, Lucas:
> These days I'm reading through the autotest code, however, very
> slowly. Some day ago you reply me and said:
> So as long as the autotestd_monitor problem is solved, autoserv
> will compress the contents of selftest and copy it to the client.
> But I still can't find the exact code where this "compress and
> copy" process happens. Can you give me some clue where this code is ?
Right here:
server/autotest.py:
# iterate over src_dirs until we find one that exists, then tar it
for src_dir in src_dirs:
if os.path.exists(src_dir):
try:
logging.info('Bundling %s into %s', src_dir, pkg_name)
temp_dir = autotemp.tempdir(unique_id='autoserv-packager',
dir=self.job.tmpdir)
tarball_path = self.job.pkgmgr.tar_package(
pkg_name, src_dir, temp_dir.name, " .")
self.host.send_file(tarball_path, remote_dest)
finally:
temp_dir.clean()
return
Function _send_tarball.
This will only happen if the config on global_config.ini
session "PACKAGES", value "serve_packages_from_autoserv"
is set to True. If it is set to False, autoserv will just rsync the
contents of your tests directory to your client.
So a suggestion would be to modify your ltp wrapper to skip the build
phase, pre-compile your ltp uncompressed on the src directory and go
straight to execute your tests. I feel that might be hackish, but I
think it's good enough for now.
Cheers,
Lucas
> The reason why I want to find this code is that I want autoserv to
> copy ltp tool which has been cross-compiled to board. My test board
> lacks 'gcc' and 'make' tools, so I want autotest to skip the 'setup'
> process which is defined in ltp.py and use these tools directly. But I
> can't download the executable tools to board, it will be removed from
> server side soon after I beginning the scheduler, let alone
> downloading to board.
>
> --
> Zhu Chenjie
> Zhejiang University, China
>
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest