move simpletests to examples/tests directory

There's no reason for having a separated simpletests directory, let's move
them to the tests directory.

Reference: https://trello.com/c/VFcxxwIpSigned-off-by: NAmador Pahim <apahim@redhat.com>
上级 6138ea81
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
Summary: Avocado Test Framework Summary: Avocado Test Framework
Name: avocado Name: avocado
Version: 35.0 Version: 35.0
Release: 0%{?dist} Release: 1%{?dist}
License: GPLv2 License: GPLv2
Group: Development/Tools Group: Development/Tools
URL: http://avocado-framework.github.io/ URL: http://avocado-framework.github.io/
...@@ -110,10 +110,12 @@ examples of how to write tests on your own. ...@@ -110,10 +110,12 @@ examples of how to write tests on your own.
%files examples %files examples
%{_datadir}/avocado/tests %{_datadir}/avocado/tests
%{_datadir}/avocado/simpletests
%{_datadir}/avocado/wrappers %{_datadir}/avocado/wrappers
%changelog %changelog
* Thu May 05 2016 Amador Pahim <apahim@redhat.com> - 35.0-1
- Removed simpletests directory
* Wed Apr 27 2016 Cleber Rosa <cleber@redhat.com> - 35.0-0 * Wed Apr 27 2016 Cleber Rosa <cleber@redhat.com> - 35.0-0
- New upstream release 35.0 (new versioning scheme) - New upstream release 35.0 (new versioning scheme)
......
...@@ -127,16 +127,19 @@ The output might look like this:: ...@@ -127,16 +127,19 @@ The output might look like this::
INSTRUMENTED /usr/share/avocado/tests/trinity.py INSTRUMENTED /usr/share/avocado/tests/trinity.py
INSTRUMENTED /usr/share/avocado/tests/warntest.py INSTRUMENTED /usr/share/avocado/tests/warntest.py
INSTRUMENTED /usr/share/avocado/tests/whiteboard.py INSTRUMENTED /usr/share/avocado/tests/whiteboard.py
...
These Python files are considered by Avocado to contain ``INSTRUMENTED`` These Python files are considered by Avocado to contain ``INSTRUMENTED``
tests. tests.
Let's now list a directory with a bunch of executable shell Let's now list only the executable shell scripts::
scripts::
$ avocado list /usr/share/avocado/simpletests/ $ avocado list | grep ^SIMPLE
SIMPLE /usr/share/avocado/simpletests/failtest.sh SIMPLE /usr/share/avocado/tests/env_variables.sh
SIMPLE /usr/share/avocado/simpletests/passtest.sh SIMPLE /usr/share/avocado/tests/output_check.sh
SIMPLE /usr/share/avocado/tests/simplewarning.sh
SIMPLE /usr/share/avocado/tests/failtest.sh
SIMPLE /usr/share/avocado/tests/passtest.sh
Here, as mentioned before, ``SIMPLE`` means that those files are executables Here, as mentioned before, ``SIMPLE`` means that those files are executables
treated as simple tests. You can also give the ``--verbose`` or ``-V`` flag to treated as simple tests. You can also give the ``--verbose`` or ``-V`` flag to
......
...@@ -69,6 +69,7 @@ def get_data_files(): ...@@ -69,6 +69,7 @@ def get_data_files():
data_files += [(get_dir(['etc', 'avocado', 'scripts', 'job', 'post.d']), data_files += [(get_dir(['etc', 'avocado', 'scripts', 'job', 'post.d']),
['etc/avocado/scripts/job/post.d/README'])] ['etc/avocado/scripts/job/post.d/README'])]
data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))] data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))]
data_files += [(get_tests_dir(), glob.glob('examples/tests/*.sh'))]
for data_dir in glob.glob('examples/tests/*.data'): for data_dir in glob.glob('examples/tests/*.data'):
fmt_str = '%s/*' % data_dir fmt_str = '%s/*' % data_dir
for f in glob.glob(fmt_str): for f in glob.glob(fmt_str):
...@@ -80,10 +81,6 @@ def get_data_files(): ...@@ -80,10 +81,6 @@ def get_data_files():
['wrappers']), ['wrappers']),
glob.glob('examples/wrappers/*.sh'))] glob.glob('examples/wrappers/*.sh'))]
data_files += [(get_dir(['usr', 'share', 'avocado', 'simpletests'],
['simpletests']),
glob.glob('examples/simpletests/*.sh'))]
data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*'))) data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*')))
return data_files return data_files
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册