avocado: Move avocado.conf.settings -> avocado.settings

Let's simplify the program namespace. No need to add
nesting for this particular lib.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.settings: Implement the Settings class

In order to read and retrieve values from the avocado
settings file, which can be in:

* Source tree: /etc/settings.ini (quick testing)
* ~/.config/avocado/settings.ini
* /etc/avocado/settings.ini

Implement a settings class, that can be used
in other avocado programs.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.core.data_dir: Use settings module

Use the settings module to find out where to locate
resources on a system-wide install.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup.py: Install test modules and config file

Another step in making avocado to run system wide
(and provide distro packages).

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
settings: Put logs directory in user directory

Instead of writing to a location we can't write to
when running as a regular user, refer to a user
specific path, and use os.path.expanduser to handle
the references to ~.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
setup.py: Also install synctest

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.job: Handle setup errors

If we have an error at test setup stage, avocado will
completely crash. This happens because the setup()
method is not properly wrapped inside the avocado
execution loop.

So, trust exception handling to the job level,
putting all test executions under a single try/except
block with appropriate status and test attribute handling.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #9 from ruda/master

sysinfo: Include /var/log/system.log (Mac compatibility)
Merge pull request #10 from lmr/fix-setup-errors

Fix setup errors
Merge pull request #8 from lmr/settings

Settings
avocado.test: Remove unused imports

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado/version.py: Turn it into an executable

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Add support to debian package generation

Add debian package rules and Makefile that allows
people to build debian packages from it.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
Merge pull request #11 from lmr/debian-pkg

Debian pkg
Add Spec file to build RPM package.

Signed-off-by: Ruda Moura <rmoura@redhat.com>
Merge pull request #12 from ruda/spec_file

Add Spec file to build RPM package.
avocado.settings: Remove method we're not going to use now

I thought it'd be useful right away, but turns out we
can wait to add it, should the need arise.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.settings: Reorganize variables

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.settings: Introduce a config_path param to Settings constructor

So that we can more easily unittest Settings.

Signed-off-by: Lucas Meneghel Rodrigues <lmr@redhat.com>
avocado.settings: Eliminate another unneeded method

Another method I thought it'd be useful, but on retrospect,
it's unnecessary for the time being.

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