On Fri, 2012-07-06 at 12:05 -0400, Don Zickus wrote: > This small change allows autotest to add directories to organize tests better > instead of the current behaviour which is a flat directory level. > > The change revolves around converting '/' into '_' to handle the directory > parsing the install_pkg requires. > > The other change is to handle the non-existant parent_test directory when > creating a job report in html. > > There is still some fallout from this change, but light testing has > grabbed most of this. > > Tested with my git changes from previous patches.
LGTM. > Signed-off-by: Don Zickus <[email protected]> > --- > client/shared/base_packages.py | 6 +++--- > client/tools/html_report.py | 3 +++ > 2 files changed, 6 insertions(+), 3 deletions(-) > > diff --git a/client/shared/base_packages.py b/client/shared/base_packages.py > index 478bc77..77a6c93 100644 > --- a/client/shared/base_packages.py > +++ b/client/shared/base_packages.py > @@ -122,7 +122,7 @@ class RepositoryFetcher(object): > """ > if install: > pkg_name = self.pkgmgr.get_tarball_name(name, pkg_type) > - fetch_path = os.path.join(fetch_dir, pkg_name) > + fetch_path = os.path.join(fetch_dir, re.sub("/","_",pkg_name)) > else: > pkg_name = name > fetch_path = fetch_dir > @@ -155,7 +155,7 @@ class RepositoryFetcher(object): > except (error.CmdError, error.AutoservRunError): > pass > > - fetch_path = os.path.join(fetch_dir, filename) > + fetch_path = os.path.join(fetch_dir, re.sub("/","_",filename)) > if (install_dir_exists and > not self.pkgmgr.untar_required(fetch_path, install_dir)): > return > @@ -479,7 +479,7 @@ class BasePackageManager(object): > # onto the client in which case fcntl stuff wont work as the code > # will run on the server in that case.. > if self.do_locking: > - lockfile_name = '.%s-%s-lock' % (name, pkg_type) > + lockfile_name = '.%s-%s-lock' % (re.sub("/","_",name), pkg_type) > lockfile = open(os.path.join(self.pkgmgr_dir, lockfile_name), > 'w') > > try: > diff --git a/client/tools/html_report.py b/client/tools/html_report.py > index 8e1bdc7..5539ab1 100755 > --- a/client/tools/html_report.py > +++ b/client/tools/html_report.py > @@ -1544,6 +1544,9 @@ def parse_result(dirname, line, results_data): > results_data[parts[1]] = [stime, [], None] > try: > parent_test = re.findall(r".*/", parts[1])[0][:-1] > + if not parent_test in results_data: > + #create place holder > + results_data[parent_test] = [0, [], None] > results_data[parent_test][1].append(parts[1]) > except IndexError: > results_data[""][1].append(parts[1]) _______________________________________________ Autotest mailing list [email protected] http://test.kernel.org/cgi-bin/mailman/listinfo/autotest
