提交 8b60ae24 编写于 作者: L Lucas Meneghel Rodrigues

Merge pull request #775 from clebergnu/selftests_run_for_setuptools_test

Use standard unittest (and setuptools) for execution of selftests 
......@@ -27,6 +27,4 @@ script:
- inspekt style
- ./selftests/cyclical_deps avocado
- ./selftests/modules_boundaries
- ./selftests/run -v selftests/all/doc
- ./selftests/run -v selftests/all/functional
- ./selftests/run -v selftests/all/unit
- ./selftests/run
......@@ -8,7 +8,7 @@ URL: http://avocado-framework.github.io/
Source: avocado-%{version}.tar.gz
BuildArch: noarch
Requires: python, python-requests, fabric, pyliblzma, libvirt-python, pystache, gdb, gdb-gdbserver
BuildRequires: python2-devel, python-docutils, python-nose, python-mock
BuildRequires: python2-devel, python-docutils, python-mock
%if 0%{?el6}
Requires: PyYAML
......
# Avocado test requirements
# Setuptools
setuptools>=18.0.0
# nose (selftests)
nose>=1.3.0
# sphinx (doc build test)
Sphinx>=1.3b1
# flexmock (some unittests use it)
......
# All pip installable requirements pinned for Travis CI
fabric==1.10.0
nose==1.3.4
pystache==0.5.4
Sphinx==1.3b1
flexmock==0.9.7
......
[nosetests]
verbosity=2
cover-erase=1
cover-package=avocado
with-xunit=1
xunit-file=xunit.xml
with-xcoverage=1
xcoverage-file=coverage.xml
"""
Build documentation and report whether we had warning/error messages.
This is geared towards documentation build regression testing.
"""
import os
import sys
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
class DocBuildError(Exception):
pass
def test_build_docs():
"""
Build avocado HTML docs, reporting failures
"""
ignore_list = []
failure_lines = []
doc_dir = os.path.join(basedir, 'docs')
process.run('make -C %s clean' % doc_dir)
result = process.run('make -C %s html' % doc_dir)
stdout = result.stdout.splitlines()
stderr = result.stderr.splitlines()
output_lines = stdout + stderr
for line in output_lines:
ignore_msg = False
for ignore in ignore_list:
if ignore in line:
print('Expected warning ignored: %s' % line)
ignore_msg = True
if ignore_msg:
continue
if 'ERROR' in line:
failure_lines.append(line)
if 'WARNING' in line:
failure_lines.append(line)
if failure_lines:
e_msg = ('%s ERRORS and/or WARNINGS detected while building the html docs:\n' %
len(failure_lines))
for (index, failure_line) in enumerate(failure_lines):
e_msg += "%s) %s\n" % (index + 1, failure_line)
e_msg += ('Full output: %s\n' % '\n'.join(output_lines))
e_msg += 'Please check the output and fix your docstrings/.rst docs'
raise DocBuildError(e_msg)
if __name__ == '__main__':
test_build_docs()
......@@ -15,5 +15,5 @@ run_rc 'inspekt style'
echo ""
run_rc 'selftests/modules_boundaries'
echo ""
run_rc 'selftests/run selftests/all'
run_rc 'selftests/run'
exit ${GR}
#!/bin/bash
echo "Cleaning up coverage and running 'selftests/all'"
./selftests/run --with-coverage --cover-package=avocado --cover-erase selftests/all
exit $?
"""
Build documentation and report whether we had warning/error messages.
This is geared towards documentation build regression testing.
"""
import os
import sys
import unittest
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class DocBuildError(Exception):
pass
class DocBuildTest(unittest.TestCase):
def test_build_docs(self):
"""
Build avocado HTML docs, reporting failures
"""
ignore_list = []
failure_lines = []
doc_dir = os.path.join(basedir, 'docs')
process.run('make -C %s clean' % doc_dir)
result = process.run('make -C %s html' % doc_dir)
stdout = result.stdout.splitlines()
stderr = result.stderr.splitlines()
output_lines = stdout + stderr
for line in output_lines:
ignore_msg = False
for ignore in ignore_list:
if ignore in line:
print('Expected warning ignored: %s' % line)
ignore_msg = True
if ignore_msg:
continue
if 'ERROR' in line:
failure_lines.append(line)
if 'WARNING' in line:
failure_lines.append(line)
if failure_lines:
e_msg = ('%s ERRORS and/or WARNINGS detected while building the html docs:\n' %
len(failure_lines))
for (index, failure_line) in enumerate(failure_lines):
e_msg += "%s) %s\n" % (index + 1, failure_line)
e_msg += ('Full output: %s\n' % '\n'.join(output_lines))
e_msg += 'Please check the output and fix your docstrings/.rst docs'
raise DocBuildError(e_msg)
......@@ -7,17 +7,15 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import data_dir
from avocado.core import job_id
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class ArgumentParsingTest(unittest.TestCase):
def test_unknown_command(self):
......
......@@ -11,15 +11,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
from avocado.utils import script
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
PASS_SCRIPT_CONTENTS = """#!/bin/sh
true
"""
......
......@@ -4,16 +4,15 @@ import unittest
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado import VERSION
from avocado.utils import process
from avocado.utils import script
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
SCRIPT_CONTENT = """#!/bin/sh
echo "Avocado Version: $AVOCADO_VERSION"
echo "Avocado Test basedir: $AVOCADO_TEST_BASEDIR"
......
......@@ -4,15 +4,13 @@ import unittest
import shutil
import tempfile
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class GDBPluginTest(unittest.TestCase):
def setUp(self):
......
......@@ -2,7 +2,6 @@ import os
import sys
import tempfile
import time
import logging
import shutil
import aexpect
......@@ -13,18 +12,16 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
'..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import wait
from avocado.utils import process
from avocado.utils import script
from avocado.utils import data_factory
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
BAD_TEST = """#!/usr/bin/env python
import signal
import time
......@@ -73,8 +70,7 @@ class InterruptTest(unittest.TestCase):
bad_test.path,
bad_test.path,
bad_test.path))
proc = aexpect.Expect(command=cmd_line, linesep='',
output_func=logging.critical)
proc = aexpect.Expect(command=cmd_line, linesep='')
proc.read_until_last_line_matches(os.path.basename(bad_test.path))
proc.sendline('\x03')
proc.read_until_last_line_matches('Interrupt requested. Waiting 2 '
......@@ -114,8 +110,7 @@ class InterruptTest(unittest.TestCase):
good_test.path,
good_test.path,
good_test.path))
proc = aexpect.Expect(command=cmd_line, linesep='',
output_func=logging.critical)
proc = aexpect.Expect(command=cmd_line, linesep='')
proc.read_until_last_line_matches(os.path.basename(good_test.path))
proc.sendline('\x03')
proc.read_until_last_line_matches('TIME : %d s')
......
......@@ -9,16 +9,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
'..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
from avocado.utils import script
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
SCRIPT_CONTENT = """#!/bin/bash
sleep 2
"""
......
......@@ -6,15 +6,13 @@ import sqlite3
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class JournalPluginTests(unittest.TestCase):
def setUp(self):
......
......@@ -8,15 +8,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import script
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
AVOCADO_TEST_OK = """#!/usr/bin/python
from avocado import Test
from avocado import main
......
......@@ -10,14 +10,12 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
'..', '..')
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
DEBUG_OUT = """Variant 16: amd@examples/mux-environment.yaml, virtio@examples/mux-environment.yaml, mint@examples/mux-environment.yaml, debug@examples/mux-environment.yaml
/distro/mint:init => systemv@examples/mux-environment.yaml:/distro/mint
......
......@@ -11,16 +11,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
from avocado.core.output import TermSupport
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class OutputTest(unittest.TestCase):
def setUp(self):
......
......@@ -8,15 +8,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
from avocado.utils import script
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
OUTPUT_SCRIPT_CONTENTS = """#!/bin/sh
echo "Hello, avocado!"
"""
......
......@@ -6,15 +6,13 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class StandaloneTests(unittest.TestCase):
def setUp(self):
......
......@@ -8,15 +8,13 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
class SysInfoTest(unittest.TestCase):
def setUp(self):
......
......@@ -6,16 +6,14 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(
os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import script
from avocado.utils import process
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
UNITTEST_GOOD = """from avocado import Test
from unittest import main
class AvocadoPassTest(Test):
......
......@@ -9,12 +9,6 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..', '..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
FAKE_VMSTAT_CONTENTS = """#!/usr/bin/python
......
......@@ -4,16 +4,14 @@ import unittest
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
'..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import process
from avocado.utils import script
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..')
basedir = os.path.abspath(basedir)
SCRIPT_CONTENT = """#!/bin/bash
touch %s
exec -- $@
......
......@@ -3,75 +3,29 @@
__author__ = 'Lucas Meneghel Rodrigues <lmr@redhat.com>'
import logging
import os
import sys
import logging
from nose.selector import Selector
from nose.plugins import Plugin
from nose.plugins.attrib import AttributeSelector
import nose
if sys.version_info[:2] == (2, 6):
import unittest2 as unittest
else:
import unittest
logger = logging.getLogger(__name__)
class AvocadoTestSelector(Selector):
def wantDirectory(self, dirname):
return True
def wantModule(self, module):
return True
def wantFile(self, filename):
if not filename.endswith('.py'):
return False
skip_tests = []
if self.config.options.skip_tests:
skip_tests = self.config.options.skip_tests.split()
if os.path.basename(filename)[:-3] in skip_tests:
logger.debug('Skipping test: %s' % filename)
return False
if self.config.options.debug:
logger.debug('Adding %s as a valid test' % filename)
return True
class AvocadoTestRunner(Plugin):
enabled = True
name = 'avocado_test_runner'
def configure(self, options, config):
self.result_stream = sys.stdout
config.logStream = self.result_stream
self.testrunner = nose.core.TextTestRunner(stream=self.result_stream,
descriptions=True,
verbosity=2,
config=config)
def options(self, parser, env):
parser.add_option("--avocado-skip-tests",
dest="skip_tests",
default=[],
help='A space separated list of tests to skip')
def prepareTestLoader(self, loader):
loader.selector = AvocadoTestSelector(loader.config)
def test_suite():
suite = unittest.TestSuite()
loader = unittest.TestLoader()
selftests_dir = os.path.dirname(os.path.abspath(__file__))
basedir = os.path.dirname(selftests_dir)
for section in ('unit', 'functional', 'doc'):
suite.addTests(loader.discover(start_dir=os.path.join(selftests_dir, section),
top_level_dir=basedir))
return suite
if __name__ == '__main__':
if 'addplugins' in nose.main.__init__.func_code.co_varnames:
nose.main(addplugins=[AvocadoTestRunner(),
AttributeSelector()])
elif 'plugins' in nose.main.__init__.func_code.co_varnames:
nose.main(plugins=[AvocadoTestRunner(),
AttributeSelector()])
else:
print("Unsupported nose API, can't proceed with testing...")
sys.exit(1)
runner = unittest.TextTestRunner()
runner.run(test_suite())
......@@ -5,12 +5,6 @@ import sys
import shutil
import random
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import archive
from avocado.utils import crypto
from avocado.utils import data_factory
......
......@@ -2,12 +2,6 @@ import unittest
import os
import sys
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import astring
......
......@@ -6,13 +6,6 @@ import tempfile
from flexmock import flexmock
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import settings
......
......@@ -5,14 +5,6 @@ import unittest
from flexmock import flexmock
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import distro
......
......@@ -2,13 +2,6 @@ import os
import sys
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import gdb
......
......@@ -6,12 +6,6 @@ import argparse
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado import Test
from avocado.core.plugins import jsonresult
from avocado.core import job
......
......@@ -5,13 +5,6 @@ import multiprocessing
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..', '..',
'..', '..')
basedir = os.path.abspath(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import test
from avocado.core import exceptions
from avocado.core import loader
......
......@@ -2,12 +2,6 @@ import sys
import os
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core.plugins import plugin
......
......@@ -2,12 +2,6 @@ import os
import sys
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core.restclient import response
......
......@@ -7,12 +7,6 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import settings
example_1 = """[foo]
......
......@@ -8,12 +8,6 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import sysinfo
......
......@@ -8,12 +8,6 @@ if sys.version_info[:2] == (2, 6):
else:
import unittest
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.core import test
from avocado.utils import script
......
......@@ -2,12 +2,6 @@ import unittest
import os
import sys
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import linux_modules
......
......@@ -2,12 +2,6 @@ import unittest
import os
import sys
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado.utils import output
......
......@@ -6,12 +6,6 @@ from xml.dom import minidom
import tempfile
import shutil
# simple magic for using scripts within a source tree
basedir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
basedir = os.path.dirname(basedir)
if os.path.isdir(os.path.join(basedir, 'avocado')):
sys.path.insert(0, basedir)
from avocado import Test
from avocado.core.plugins import xunit
from avocado.core import job
......
......@@ -17,7 +17,7 @@ import glob
import os
# pylint: disable=E0611
from distutils.core import setup
from setuptools import setup
from avocado import VERSION
......@@ -123,4 +123,5 @@ if __name__ == '__main__':
'avocado/core/plugins/resources')},
data_files=get_data_files(),
scripts=['scripts/avocado',
'scripts/avocado-rest-client'])
'scripts/avocado-rest-client'],
test_suite='selftests')
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册