client: Don't create tests/download directory unless needed

job.run_test() may take a url parameter, that usually
is the test name, however it can take an actual url
with a .tar.bz2 test. However, if we're not going to
use this feature, this directory is not needed, and if
needed, the directory will be created by the install
from url code.

Therefore, remove this to better comply with packaging
requirements (people might feel uneasy about autotest
creating directories on python site-packages dir in a
compulsory way). Update the job unittest accordingly.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client job: Make packages dir configurable

This patch adds pkg_dir option in COMMON section in
global_config.ini that, when set, would be assign to
pkgdir attribute of the base_job class.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client job: Make state file directory configurable

On a system wide install, it is undesirable that the
control file state files are located in the same directory
as the control files, since that location will be read
only for non root users, for example:

/usr/lib/python2.7/site-packages/autotest/client/tests/sleeptest/control.state

So make this directory configurable, hence allowing autotest
to write job state files there on a system wide install
yet leaving non root users able to run jobs.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Fixing a couple of wrong unittest imports

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Fix the wrong import usage in the unittest code

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib/install-autotest-server.sh: Fix typo and help string

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.tests.selftest: Use keyword arguments on test methods

As the use of positional arguments in job.run_test is not
supported anymore.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.shared.base_barrier: Remove useless error logging

As it was going to print the string representation of
the error module, not very useful for anyone.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
client.self-test: Remove old, bitrot functional test suite

The client functional test suite is long bitrot, due to
a number of changes made in autotest output. I did try
to try to filter outputs to adjust things, but turns out
it's too quirky and it doesn't work always. Let's remove
this and continue to focus on unittest development.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
server.self-test: Remove old, bitrot test suite

All the unittests in here are better implemented
in the base autoserv directory, and others are very
outdated. So let's get rid of it and continue to
focus on unittests.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
contrib/install-autotest-server.sh: Fix locale and help msg

1) Set en.US locale
2) Fix slightly misleading help message
3) Set the autotest user $HOME to be /usr/local/autotest

Signed-off-by: Matěj Cepl <mcepl@redhat.com>
virt: Add ubuntu 12.04 to guest os list

Signed-off-by: Qingtang Zhou <qzhou@redhat.com>
Support for multiple luns, scsiid and bus'

* add support for lun, scsi-id and card definition
* fixes minor issues in scsi-* devices addition

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
kvm test: Parametrisation of multi_disk test

This patch makes multi_disk test more flexible. You can use
stg_params variable to set all kinds of setups. As example
I added few tests for virtio_scsi disks and all_drive_format test.

stg_params is a space separated set of parameters of newly added
disks. Every parameter have to have a name and after ':'
it can be ',' separated list of words or 'range(...)'.

range() is similar to python range(), but it supports 4th argument,
which multiplies occurrence of each value:
range(0,2,1,2) => [0,0,1,1]
Also range() supports 'n' which is substituted later to fit the
number of disks. See the code for details.

Signed-off-by: Lukas Doktor <ldoktor@redhat.com>
virt.virt_env_process: verify if screenshot term event is a thread

Before trying to verify if it is set. This bug was
spotted while working on the multi_disk test.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
virt_utils.py: add get_ip_address_by_interface()

* returns IP Address by network interface (e.g. virbr0)
  accepts ifname which can be retrieved from base.cfg

* raises NetError in case of failure

Reason: gethostbyname(gethostname()): ip associated to my hostname
        was different than IP leased for my bridge (virbr0)

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
virt: guest-os.cfg.sample - added RHEL6.3beta

* currently the only GA distro which supports up2date version
  of spice (especially virt-viewer package) is RHEL6.3 beta
  (and possiblyFedora rawhide).

* Filename + checksum matches with contents from RHN

* platform prerequisity for remote-viewer (Pull #333)

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
virt: Add RHEL-6.3.ks with dependencies for SPICE testing

* @x11, @basic-desktop
* spice-vdagent, spice-xpi, remote-viewer, usbredir

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
kvm_vm.py - fixes in add_spice()

This commit fixes an issue when qemu-kvm is running with
port 3000 and remote-viewer uses port generated automatically.

Until this time rv_connect was accidentally connecting to a first
free port (3000,3001) generated in add_spice(). it also changed
order in which self.spice_options is being populated, so
I'm sure it will always be done before add_spice

Also, I've removed passing of spice_options to add_spice() and
processing it as self.spice_options from within add_spice()

Signed-off-by: Lubos Kocman <lkocman@redhat.com>
virt.kvm_vm: Remove qemu cmdline debug print

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