Skip to content

Commit

Permalink
Virt Test Compatibility layer: Initial import
Browse files Browse the repository at this point in the history
This is the base code for the virt test compatibility
layer. We arrived at this initial version of the code
after significant work and previous reviews.

Basically the compatibility layer aims to let people
run virt-test tests inside avocado, giving them
avocado specific features, and letting them to get
used to the new avocado world.

Changes from v3 (v13):
* Fixed Ruda's comment about imp import;
* Made the entire test source/runner plugin code
  to fit into 80 columns.

Changes from v1 (v11):
* The LICENSE file was fixed to state that the files
  inside the plugin are GPLv2+ licensed (GPLv2 or later),
  per adereis's comments.

Signed-off-by: Lucas Meneghel Rodrigues <[email protected]>
  • Loading branch information
lmr committed Jun 5, 2015
1 parent 77ea6b2 commit 7d698b4
Show file tree
Hide file tree
Showing 30 changed files with 2,289 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
.project
.pydevproject
.settings
.coverage
.idea/*
coverage.xml
xunit.xml
tmp/*
logs/*
*.pyc
*~
tags
cscope.*
build
sysinfo-*
MANIFEST
dist
11 changes: 11 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
language: python
python:
- "2.7"
- "2.6"

install:
- pip install -r requirements-travis.txt
- if [ $TRAVIS_PYTHON_VERSION == '2.6' ]; then pip install -r requirements-travis-python26.txt; fi

script:
- make check
344 changes: 344 additions & 0 deletions LICENSE

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
include README.md
include LICENSE
51 changes: 51 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
PYTHON=`which python`
DESTDIR=/
BUILDIR=$(CURDIR)/debian/avocado-virt
PROJECT=avocado
VERSION="0.24.0"

all:
@echo "make source - Create source package"
@echo "make install - Install on local system"
@echo "make build-deb-src - Generate a source debian package"
@echo "make build-deb-bin - Generate a binary debian package"
@echo "make build-deb-all - Generate both source and binary debian packages"
@echo "make build-rpm-all - Generate both source and binary RPMs"
@echo "make check - Runs static checks in the source code"
@echo "make clean - Get rid of scratch and byte files"

source:
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=SOURCES --prune

install:
$(PYTHON) setup.py install --root $(DESTDIR) $(COMPILE)

prepare-source:
# build the source package in the parent directory
# then rename it to project_version.orig.tar.gz
dch -D "trusty" -M -v "$(VERSION)" "Automated (make builddeb) build."
$(PYTHON) setup.py sdist $(COMPILE) --dist-dir=../ --prune
rename -f 's/$(PROJECT)-(.*)\.tar\.gz/$(PROJECT)_$$1\.orig\.tar\.gz/' ../*

build-deb-src: prepare-source
# build the source package
dpkg-buildpackage -S [email protected] -rfakeroot

build-deb-bin: prepare-source
# build binary package
dpkg-buildpackage -b -rfakeroot

build-deb-all: prepare-source
# build both source and binary packages
dpkg-buildpackage -i -I -rfakeroot

build-rpm-all: source
rpmbuild --define '_topdir %{getenv:PWD}' \
-ba avocado-plugins-vt.spec
check:
selftests/checkall
clean:
$(PYTHON) setup.py clean
$(MAKE) -f $(CURDIR)/debian/rules clean || true
rm -rf build/ MANIFEST BUILD BUILDROOT SPECS RPMS SRPMS SOURCES
find . -name '*.pyc' -delete
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# avocado-vt
Avocado Virt Test Compatibility Layer Plugin

Avocado Virt Test Compatibility is a plugin that lets you
execute tests from the virt test suite
(http://virt-test.readthedocs.org/en/latest/), with all
the avocado convenience features, such as HTML report,
Xunit output, among others.
39 changes: 39 additions & 0 deletions avocado-plugins-vt.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
Summary: Avocado Virt Test Compatibility Plugin
Name: avocado-plugins-vt
Version: 0.24.0
Release: 2%{?dist}
License: GPLv2
Group: Development/Tools
URL: http://avocado-framework.readthedocs.org/
Source: avocado-plugins-vt-%{version}.tar.gz
BuildRequires: python2-devel
BuildArch: noarch
Requires: python, avocado

%description
Avocado Virt Test Compatibility is a plugin that lets you
execute tests from the virt test suite
(http://virt-test.readthedocs.org/en/latest/), with all
the avocado convenience features, such as HTML report,
Xunit output, among others.

%prep
%setup -q

%build
%{__python} setup.py build

%install
%{__python} setup.py install --root %{buildroot} --skip-build

%files
%defattr(-,root,root,-)
%dir /etc/avocado
%dir /etc/avocado/conf.d
%config(noreplace)/etc/avocado/conf.d/virt-test.conf
%doc README.md LICENSE
%{python_sitelib}/avocado*

%changelog
* Wed Jun 3 2015 Lucas Meneghel Rodrigues <[email protected]> - 0.24.0-2
- First version of the compatibility layer plugin
Loading

0 comments on commit 7d698b4

Please sign in to comment.