On Fri, 2012-07-06 at 12:05 -0400, Don Zickus wrote:
> PLEASE DO NOT COMMIT
All right, don't worry, this won't be commited :) I think that some of
your ideas here can be used to resolve the problem, see below.
> These are the various hacks I had to use to handle all the read-only packaging
> problems when implementing the fetching from git patches.
>
> I do not know what the right way of doing this is, so I am just posting them
> for completeness.
>
> Please help. :-(
Ah, the joys of trying to support 2 fundamentally different filesystem
layouts (RPM packaged autotest and autotest-on-a-single-dir)...
> Cheers,
> Don
> ---
> client/job.py | 5 ++++-
> client/shared/base_job.py | 2 +-
> client/shared/test.py | 2 +-
> global_config.ini | 6 +++---
> 4 files changed, 9 insertions(+), 6 deletions(-)
>
> diff --git a/client/job.py b/client/job.py
> index 4dadd00..2df78d3 100644
> --- a/client/job.py
> +++ b/client/job.py
> @@ -296,8 +296,11 @@ class base_client_job(base_job.base_job):
> """
> Perform the packages support initialization.
> """
> + tmpdir = GLOBAL_CONFIG.get_config_value('COMMON',
> + 'test_output_dir',
> + default=self.autodir)
> self.pkgmgr = packages.PackageManager(
> - self.autodir, run_function_dargs={'timeout':3600})
> + tmpdir, run_function_dargs={'timeout':3600})
^ Ok, this might work
>
> def _init_cmdline(self, extra_copy_cmdline):
> diff --git a/client/shared/base_job.py b/client/shared/base_job.py
> index 5ef699a..840bf21 100644
> --- a/client/shared/base_job.py
> +++ b/client/shared/base_job.py
> @@ -1051,7 +1051,7 @@ class base_job(object):
>
> # Now tests are read-only modules
> self._testdir = readonly_dir(root, 'tests')
> - self._site_testdir = readonly_dir(root, 'site_tests')
> + self._site_testdir = readwrite_dir(tests_out_dir, 'site_tests')
This might be OK as well...
> # various server-specific directories
> if self.serverdir:
> diff --git a/client/shared/test.py b/client/shared/test.py
> index e5435a6..8012087 100644
> --- a/client/shared/test.py
> +++ b/client/shared/test.py
> @@ -880,7 +880,7 @@ def runtest(job, url, tag, args, dargs,
> # 'install_pkg' method will be present only if it's a client side
> job.
> if hasattr(job, 'install_pkg'):
> try:
> - bindir = os.path.join(job.testdir, testname)
> + bindir = os.path.join(job.site_testdir, testname)
Same here
> job.install_pkg(testname, 'test', bindir)
> except error.PackageInstallError:
> # continue as a fall back mechanism and see if the test code
> diff --git a/global_config.ini b/global_config.ini
> index 33f2b28..f3556c4 100644
> --- a/global_config.ini
> +++ b/global_config.ini
> @@ -48,9 +48,9 @@ sql_debug_mode: False
> # The path for the toplevel autotest directory
> autotest_top_path: /usr/local/autotest
> # The path to look for test modules
> -test_dir:
> +test_dir: /var/lib/autotest/tests
Of course these are not appropriate, but we are properly falling back to
the client/tmp directory when this doesn't matter anyway. I'll do some
testing here and see if I can come up with a solution.
Thanks for taking the time of doing this, it's really appreciated!
> # The path for tests output directory
> -test_output_dir:
> +test_output_dir: /var/lib/autotest/
>
> [AUTOSERV]
> # Autotest potential install paths
> @@ -65,7 +65,7 @@ drop_caches: False
> drop_caches_between_iterations: False
> # Specify an alternate location to store the test results
> #output_dir: /var/log/autotest/
> -output_dir:
> +output_dir: /var/lib/autotest
> # Log installed packages (recommended setting to True on server setups)
> log_installed_packages = False
> # Abort on client state mismatches post reboot (!= list of devices or CPUs)
_______________________________________________
Autotest mailing list
[email protected]
http://test.kernel.org/cgi-bin/mailman/listinfo/autotest