client.shared.base_utils: Add log_last_traceback function

This function can be used to log the last traceback.

Signed-off-by: Lukáš Doktor <ldoktor@redhat.com>
server.autotest_remote: Fix obsolete docstring

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server.autotest_remote: Fix autotest remote for distro package installs

As an attempt to fix problems found on our distro packages
for Fedora and RHEL, define that when autotest is running
using distro packages, it won't rsync any of the client code
to the client machines, instead, it will rely on the distro
packages themselves.

This of course reduces the usefulness of the autotest server,
since it can't test any client distro that does not have the
autotest client packaged, but this is an acceptable compromise
given the situation (frequently people using the distro
packages will be testing clients using that very same distro).

Simplify the code by ruling out rsyncs, and install/remove
autotest fom the clients using the distro supplied tools
(for now it works only for Fedora and RHEL).

Also add some more logging to the job log collector, so
we know which directories are being synced back to the
autotest server.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.base_job: Select tests dir correctly

If running on a system wide install, the usual client/tests
directories won't be available. But there is a setting that
stores the path for this dir, so use it if available.

This avoids having to artificially create a client/tests
dir in the autotest tarball for packaging.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/setup.py: Fix removed module from install

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.version: Get same version name with new tagging convention

Github won't host our arbitrarily uploaded tarballs
anymore, so in order to have our upstream tarballs
to have a nicer name, we'll have to start calling
our tags differently, such as:

autotest-0.15.0

In order to tell the version name the same way as
before, strip the prepended 'autotest-'.

This commit also fixes a bug when executing the script
from an arbitrary directory outside of the git tree
dir.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
apache conf: moved statements to -web config file

Because these will fail when the web client is not present, such
as when only the -server package is installed.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
contrib/install-autotest-server.sh: check for apache modules before linking

Newer versions of apache2 packages on Ubuntu (as of 12.10) do not ship
with mod_version.c as a separate shared object, but back again built into
the apache2 binary.

So, check before we link to a possibly non-existing file.

This is a fix for github issue #601.

Signed-off-by: Cleber Rosa <crosa@redhat.com>
install-autotest-server.sh: Update tested systems help text

We have resolved the issues found on Ubuntu 12.10, and
now Fedora 18 also works well, assuming it is clean and
up to date. So update the help text to reflect the current
state of support.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
allow autotest frontend to run from non standard browsers (like IE)

some browsers (notably IE up to version 8) don't support
standard addEventLister so we need to adjust the way event
for spreadsheet is wired in job detail view page

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
server/autotest_remote_unittest.py: Fix unittest

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup.py: some adjustments to properly ship and install the right files

It was noticed that some files were not being installed / shipped
by the setuptool script. It turned out that we were using the
package data feature but providing the module directory twice.

Also, this patch removes some directories that should no longer be
shipped/installed as part of core autotest, and some that should
(installation_support).

Signed-off-by: Cleber Rosa <crosa@redhat.com>
do not attempt to use install server when profile is not available

In cases when SUT does not have valid profile or is not on
install server we properly mark available profile as N/A, but in
that case we should not attempt to install with N/A.

Signed-off-by: Julius Gawlas <julius.gawlas@hp.com>
utils/check_patch.py: Remove Makefile from checks

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend/tko/rpc_interface.py: Remove duplicate function

On commit c2cf6683, the method get_test_labels was
added, when there was already such a method with the
exact same implementation. Let's get rid of the newest.

CC: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
installation_support/setup.py: Get rid of package_data

This function is not really necessary, besides, it
depends on other functions that don't exist (bug).

CC: Cleber Rosa <crosa@redhat.com>
Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.net.net_utils: Fix some problems found by pylint

1) Fix undefined client_utils reference.
2) Use a less generic ImportError catchall.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server/hosts/factory.py: Disabling undefined variable pylint error

In this particular case, the missing variables are being
injected in the code namespace. So, in order to silence
pylint (and the Pydev code analyzer), add the appropriate
comments and tags.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
database_legacy/autotest-upgrade-db: Fixing another rename mistake

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
frontend.shared.resource_lib: Ignore false negatives from pylint

Here entry_class is callable by the time it is used, due
to some hackery that is probably too hard to fix right
now. So make pylint ignore the error, so we have more
useful pylint reports.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>