autoserv: repair global_config import.

Signed-off-by: Jiří Župka <jzupka@redhat.com>
server.test: Fix pylint complaint

During pylint checking, we've found:

************* Module server.test
E0202:159:_sysinfo_logger.before_hook: An attribute inherited from
_sysinfo_logger hide this method
E0202:169:_sysinfo_logger.before_iteration_hook: An attribute inherited
from _sysinfo_logger hide this method
E0202:185:_sysinfo_logger.after_iteration_hook: An attribute inherited
from _sysinfo_logger hide this method
E0202:200:_sysinfo_logger.after_hook: An attribute inherited from
_sysinfo_logger hide this method

In fact, the way the class _sysinfo_logger was disabling
before/after iteration hooks was by setting attributes set
to None to hide the iteration hooks methods. We could do
the same in a cleaner way by setting an attribute that
can switch on/off the execution of the code present in
these hook methods. So implement this and fix the pylint
complaints.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/db/backends/afe/base.py: Fix pylint complaint

pylint reveals:

************* Module frontend.db.backends.afe.base
E0203: 28:DatabaseWrapper._valid_connection: Access to member
'connection' before its definition line 35
E0203: 29:DatabaseWrapper._valid_connection: Access to member
'connection' before its definition line 35
E0203: 31:DatabaseWrapper._valid_connection: Access to member
'connection' before its definition line 35
E0203: 34:DatabaseWrapper._valid_connection: Access to member
'connection' before its definition line 35

Turns out that we do reference self.connection (in fact
defined on base classes), but for pylint this attribute
is not defined (machines that run pylint checks might
not have mysql-python installed). After checking the
code of the base classes, we verify that during init
self.connection is initialized with None anyway, so with
this change we silence yet another pylint complaint
(and since it's called before the base classes init
method, they'll take care of setting it to something
useful anyway).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server.hosts.factory: Fix incorrect name from module

AutoServError is in fact AutoservError in the error
module. Fix this little bug.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
utils/run_pylint.py: Ignore E1002 on quiet runs

Turns out we have way too many false positives on
E1002 errors (Use super on an old style class). So
disable this error and have less noisy full pylint
check reports.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client: XML_utils cleanup and enhancement

+ Cleaned up many pylint/style warnings
+ Added unique extension for temp files retained due to exception
+ Unified del/exit-handling behavior
+ Added XMLTreeFile method for retrieving an XPATH to an element
+ Improved unittests

Signed-off-by: Chris Evich <cevich@redhat.com>
server: fixed path on import_site_class() usage

s/autotest_remote_lib/autotest/g for make_ssh_command and SiteHost

Signed-off-by: Chema Gonzalez <chema@google.com>
client: Reboot deadlocked node

If node is stuck w/o network we still have to have a chance to complete hardreset.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
client.tests: Update to the latest master

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib/install-autotest-server.sh: Update submodules

Now that we did separate test repos, let's bring it
in on the install script.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared: Add utils for OpenVSwitch patch

ForAllxx:
  run object method on every object in list

  ForAll[a,b,c].print()

Signed-off-by: Jiří Župka <jzupka@redhat.com>
client.shared.mail_unittest: Fix problem running under py 2.4

It's not possible to access directly email.Message.Message() on
python 2.4. One must import Message from email and then use
Message.Message(). Fix that and get the unittest working on
2.4.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/setup.py: Install frontend.wsgi

The setup script was skipping frontend.wsgi, let's add
it to the list of files installed.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client/tools: Removing koji_pkgspec tool

As this is a better suite for the virt tests, since
the main libs to interact with a koji server are there.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/setup.py: Fix frontend.wsgi rule

It was wrong, my mistake, sorry.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client: Add utility functions for uptime and cpu stats

Signed-off-by: Satheesh Rajendran <sathnaga@linux.vnet.ibm.com>
client/tools: Remove tapfd_helper script

This tapfd_helper tool is used for virt test, and
depends some virt modules, thus move it to virt-test
repo.

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
client/tools: make_clean - Ensure script works regardless of dir

This is a fix for issue #573.

The make_clean script was originally intended to be run
only from the client/ directory. So let's force the cwd
to be changed to the appropriate dir before trying to clean
the directories. This way it'll work from any directory.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Allow multiple entries for test_dir, separated by commas.

For example:
[COMMON]
...
test_dir=/usr/local/autotest-tests,/usr/local/special-tests

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
Fail if specified tests are not in relative path.

If test path is not inside base test dir, the subsequent
test load will fail so instead notify user right away.

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>