Skip to content

Commit

Permalink
Merge remote-tracking branch 'lmr/add-simpletest-examples'
Browse files Browse the repository at this point in the history
  • Loading branch information
clebergnu committed Jul 7, 2015
2 parents ced499c + 8b1ae41 commit fe3e5c1
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 7 deletions.
1 change: 1 addition & 0 deletions avocado.spec
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ examples of how to write tests on your own.

%files examples
%{_datadir}/avocado/tests
%{_datadir}/avocado/simpletests
%{_datadir}/avocado/wrappers

%changelog
Expand Down
10 changes: 3 additions & 7 deletions docs/source/GetStartedGuide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -130,13 +130,9 @@ tests.
Let's now list a directory with a bunch of executable shell
scripts::

$ avocado list /usr/share/avocado/examples/wrappers
SIMPLE examples/wrappers/dummy.sh
SIMPLE examples/wrappers/ltrace.sh
SIMPLE examples/wrappers/perf.sh
SIMPLE examples/wrappers/strace.sh
SIMPLE examples/wrappers/time.sh
SIMPLE examples/wrappers/valgrind.sh
$ avocado list /usr/share/avocado/simpletests/
SIMPLE /usr/share/avocado/simpletests/failtest.sh
SIMPLE /usr/share/avocado/simpletests/passtest.sh

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
Expand Down
3 changes: 3 additions & 0 deletions examples/simpletests/failtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
false

3 changes: 3 additions & 0 deletions examples/simpletests/passtest.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/sh
true

5 changes: 5 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ def get_data_files():
data_files += [(get_dir(['usr', 'share', 'avocado', 'wrappers'],
['wrappers']),
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/*')))
return data_files

Expand Down

0 comments on commit fe3e5c1

Please sign in to comment.