[RFC] Autotest API Fixes
by Lucas Meneghel Rodrigues
IMPORTANT: The results of this thread will affect 3rd parties developing
on top of autotest in the near future.
Hi guys,
Due to the packaging requirements that we've been working during the
past several months, I decided to finally tackle the challenge of doing
some major cleanup on the autotest API structure. I have a patchset
here:
https://github.com/autotest/autotest/pull/294
It's a massive patchset, that was for the most of it auto generated,
plus a bunch of fixes that I've been working on over the past week. With
this, everyone developing code on top of autotest will have to perform
changes on their code, so consider this as a heads up.
I've tested the patches over the few weeks, and I'm up to the point I
see no more (at least obvious) problems on it. Bottom line, the patches
change the autotest structure in the following way
-> No more autotest/client/bin dir
-> API: autotest_lib -> autotest
-> API: autotest.client.common_lib -> autotest.client.shared
As an example, here's how the imports on client/bin/job.py looks in
master:
from autotest_lib.client.bin import client_logging_config
from autotest_lib.client.bin import utils, parallel, kernel, xen
from autotest_lib.client.bin import profilers, boottool, harness
from autotest_lib.client.bin import config, sysinfo, test, local_host
from autotest_lib.client.bin import partition as partition_lib
from autotest_lib.client.common_lib import base_job
from autotest_lib.client.common_lib import error, barrier, log,
logging_manager
from autotest_lib.client.common_lib import base_packages, packages
from autotest_lib.client.common_lib import global_config
from autotest_lib.client.tools import html_report
And how they're going to look after the patchset is applied:
from autotest.client import client_logging_config
from autotest.client import utils, parallel, kernel, xen
from autotest.client import profilers, boottool, harness
from autotest.client import config, sysinfo, test, local_host
from autotest.client import partition as partition_lib
from autotest.client.shared import base_job
from autotest.client.shared import error, barrier, log, logging_manager
from autotest.client.shared import base_packages, packages
from autotest.client.shared import global_config
from autotest.client.tools import html_report
I know this will cause inconveniences, but I believe it'll be well worth
the effort. Please feel free to review the changes and give us your
opinion.
Thanks!