prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  Proper simple tests examples
  Even though simple tests are, well, simple, let's have a couple of them in the examples directory.
  
  A big reason for that is that we currently use wrappers as the simple tests examples in the Getting Started guide (`avocado list examples/wrappers`) which can be confusing to new users.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `setup.py`
  Content:
  ```
  1 #!/bin/env python
  2 # This program is free software; you can redistribute it and/or modify
  3 # it under the terms of the GNU General Public License as published by
  4 # the Free Software Foundation; either version 2 of the License, or
  5 # (at your option) any later version.
  6 #
  7 # This program is distributed in the hope that it will be useful,
  8 # but WITHOUT ANY WARRANTY; without even the implied warranty of
  9 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10 #
  11 # See LICENSE for more details.
  12 #
  13 # Copyright: Red Hat Inc. 2013-2014
  14 # Author: Lucas Meneghel Rodrigues <lmr@redhat.com>
  15 
  16 import glob
  17 import os
  18 # pylint: disable=E0611
  19 
  20 from distutils.core import setup
  21 
  22 from avocado import VERSION
  23 
  24 
  25 VIRTUAL_ENV = 'VIRTUAL_ENV' in os.environ
  26 
  27 
  28 def get_dir(system_path=None, virtual_path=None):
  29     """
  30     Retrieve VIRTUAL_ENV friendly path
  31     :param system_path: Relative system path
  32     :param virtual_path: Overrides system_path for virtual_env only
  33     :return: VIRTUAL_ENV friendly path
  34     """
  35     if virtual_path is None:
  36         virtual_path = system_path
  37     if VIRTUAL_ENV:
  38         if virtual_path is None:
  39             virtual_path = []
  40         return os.path.join(*virtual_path)
  41     else:
  42         if system_path is None:
  43             system_path = []
  44         return os.path.join(*(['/'] + system_path))
  45 
  46 
  47 def get_tests_dir():
  48     return get_dir(['usr', 'share', 'avocado', 'tests'], ['tests'])
  49 
  50 
  51 def get_avocado_libexec_dir():
  52     if VIRTUAL_ENV:
  53         return get_dir(['libexec'])
  54     elif os.path.exists('/usr/libexec'):    # RHEL-like distro
  55         return get_dir(['usr', 'libexec', 'avocado'])
  56     else:                                   # Debian-like distro
  57         return get_dir(['usr', 'lib', 'avocado'])
  58 
  59 
  60 def get_data_files():
  61     data_files = [(get_dir(['etc', 'avocado']), ['etc/avocado/avocado.conf'])]
  62     data_files += [(get_dir(['etc', 'avocado', 'conf.d']),
  63                     ['etc/avocado/conf.d/README', 'etc/avocado/conf.d/gdb.conf'])]
  64     data_files += [(get_dir(['etc', 'avocado', 'sysinfo']),
  65                     ['etc/avocado/sysinfo/commands', 'etc/avocado/sysinfo/files',
  66                      'etc/avocado/sysinfo/profilers'])]
  67     data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))]
  68     for data_dir in glob.glob('examples/tests/*.data'):
  69         fmt_str = '%s/*' % data_dir
  70         for f in glob.glob(fmt_str):
  71             data_files += [(os.path.join(get_tests_dir(),
  72                                          os.path.basename(data_dir)), [f])]
  73     data_files.append((get_dir(['usr', 'share', 'doc', 'avocado'], ['.']),
  74                        ['man/avocado.rst', 'man/avocado-rest-client.rst']))
  75     data_files += [(get_dir(['usr', 'share', 'avocado', 'wrappers'],
  76                             ['wrappers']),
  77                     glob.glob('examples/wrappers/*.sh'))]
  78     data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*')))
  79     return data_files
  80 
  81 
  82 def _get_plugin_resource_files(path):
  83     """
  84     Given a path, return all the files in there to package
  85     """
  86     flist = []
  87     for root, _, files in sorted(os.walk(path)):
  88         for name in files:
  89             fullname = os.path.join(root, name)
  90             flist.append(fullname[len('avocado/core/plugins/'):])
  91     return flist
  92 
  93 
  94 def get_long_description():
  95     with open('README.rst', 'r') as req:
  96         req_contents = req.read()
  97     return req_contents
  98 
  99 if __name__ == '__main__':
  100     setup(name='avocado',
  101           version=VERSION,
  102           description='Avocado Test Framework',
  103           long_description=get_long_description(),
  104           author='Avocado Developers',
  105           author_email='avocado-devel@redhat.com',
  106           url='http://avocado-framework.github.io/',
  107           packages=['avocado',
  108                     'avocado.core',
  109                     'avocado.core.plugins',
  110                     'avocado.utils',
  111                     'avocado.utils.external',
  112                     'avocado.core.remote',
  113                     'avocado.core.restclient',
  114                     'avocado.core.restclient.cli',
  115                     'avocado.core.restclient.cli.args',
  116                     'avocado.core.restclient.cli.actions'],
  117           package_data={'avocado.core.plugins': _get_plugin_resource_files(
  118               'avocado/core/plugins/resources')},
  119           data_files=get_data_files(),
  120           scripts=['scripts/avocado',
  121                    'scripts/avocado-rest-client'])
  122
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/setup.py b/setup.py
  --- a/setup.py
  +++ b/setup.py
  @@ -75,6 +75,11 @@
       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
  
verification_info: {"golden_diff": "diff --git a/setup.py b/setup.py\n--- a/setup.py\n+++ b/setup.py\n@@ -75,6 +75,11 @@\n     data_files += [(get_dir(['usr', 'share', 'avocado', 'wrappers'],\n                             ['wrappers']),\n                     glob.glob('examples/wrappers/*.sh'))]\n+\n+    data_files += [(get_dir(['usr', 'share', 'avocado', 'simpletests'],\n+                            ['simpletests']),\n+                    glob.glob('examples/simpletests/*.sh'))]\n+\n     data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*')))\n     return data_files\n", "issue": "Proper simple tests examples\nEven though simple tests are, well, simple, let's have a couple of them in the examples directory.\n\nA big reason for that is that we currently use wrappers as the simple tests examples in the Getting Started guide (`avocado list examples/wrappers`) which can be confusing to new users.\n\n", "before_files": [{"content": "#!/bin/env python\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n#\n# See LICENSE for more details.\n#\n# Copyright: Red Hat Inc. 2013-2014\n# Author: Lucas Meneghel Rodrigues <lmr@redhat.com>\n\nimport glob\nimport os\n# pylint: disable=E0611\n\nfrom distutils.core import setup\n\nfrom avocado import VERSION\n\n\nVIRTUAL_ENV = 'VIRTUAL_ENV' in os.environ\n\n\ndef get_dir(system_path=None, virtual_path=None):\n    \"\"\"\n    Retrieve VIRTUAL_ENV friendly path\n    :param system_path: Relative system path\n    :param virtual_path: Overrides system_path for virtual_env only\n    :return: VIRTUAL_ENV friendly path\n    \"\"\"\n    if virtual_path is None:\n        virtual_path = system_path\n    if VIRTUAL_ENV:\n        if virtual_path is None:\n            virtual_path = []\n        return os.path.join(*virtual_path)\n    else:\n        if system_path is None:\n            system_path = []\n        return os.path.join(*(['/'] + system_path))\n\n\ndef get_tests_dir():\n    return get_dir(['usr', 'share', 'avocado', 'tests'], ['tests'])\n\n\ndef get_avocado_libexec_dir():\n    if VIRTUAL_ENV:\n        return get_dir(['libexec'])\n    elif os.path.exists('/usr/libexec'):    # RHEL-like distro\n        return get_dir(['usr', 'libexec', 'avocado'])\n    else:                                   # Debian-like distro\n        return get_dir(['usr', 'lib', 'avocado'])\n\n\ndef get_data_files():\n    data_files = [(get_dir(['etc', 'avocado']), ['etc/avocado/avocado.conf'])]\n    data_files += [(get_dir(['etc', 'avocado', 'conf.d']),\n                    ['etc/avocado/conf.d/README', 'etc/avocado/conf.d/gdb.conf'])]\n    data_files += [(get_dir(['etc', 'avocado', 'sysinfo']),\n                    ['etc/avocado/sysinfo/commands', 'etc/avocado/sysinfo/files',\n                     'etc/avocado/sysinfo/profilers'])]\n    data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))]\n    for data_dir in glob.glob('examples/tests/*.data'):\n        fmt_str = '%s/*' % data_dir\n        for f in glob.glob(fmt_str):\n            data_files += [(os.path.join(get_tests_dir(),\n                                         os.path.basename(data_dir)), [f])]\n    data_files.append((get_dir(['usr', 'share', 'doc', 'avocado'], ['.']),\n                       ['man/avocado.rst', 'man/avocado-rest-client.rst']))\n    data_files += [(get_dir(['usr', 'share', 'avocado', 'wrappers'],\n                            ['wrappers']),\n                    glob.glob('examples/wrappers/*.sh'))]\n    data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*')))\n    return data_files\n\n\ndef _get_plugin_resource_files(path):\n    \"\"\"\n    Given a path, return all the files in there to package\n    \"\"\"\n    flist = []\n    for root, _, files in sorted(os.walk(path)):\n        for name in files:\n            fullname = os.path.join(root, name)\n            flist.append(fullname[len('avocado/core/plugins/'):])\n    return flist\n\n\ndef get_long_description():\n    with open('README.rst', 'r') as req:\n        req_contents = req.read()\n    return req_contents\n\nif __name__ == '__main__':\n    setup(name='avocado',\n          version=VERSION,\n          description='Avocado Test Framework',\n          long_description=get_long_description(),\n          author='Avocado Developers',\n          author_email='avocado-devel@redhat.com',\n          url='http://avocado-framework.github.io/',\n          packages=['avocado',\n                    'avocado.core',\n                    'avocado.core.plugins',\n                    'avocado.utils',\n                    'avocado.utils.external',\n                    'avocado.core.remote',\n                    'avocado.core.restclient',\n                    'avocado.core.restclient.cli',\n                    'avocado.core.restclient.cli.args',\n                    'avocado.core.restclient.cli.actions'],\n          package_data={'avocado.core.plugins': _get_plugin_resource_files(\n              'avocado/core/plugins/resources')},\n          data_files=get_data_files(),\n          scripts=['scripts/avocado',\n                   'scripts/avocado-rest-client'])\n", "path": "setup.py"}], "after_files": [{"content": "#!/bin/env python\n# This program is free software; you can redistribute it and/or modify\n# it under the terms of the GNU General Public License as published by\n# the Free Software Foundation; either version 2 of the License, or\n# (at your option) any later version.\n#\n# This program is distributed in the hope that it will be useful,\n# but WITHOUT ANY WARRANTY; without even the implied warranty of\n# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n#\n# See LICENSE for more details.\n#\n# Copyright: Red Hat Inc. 2013-2014\n# Author: Lucas Meneghel Rodrigues <lmr@redhat.com>\n\nimport glob\nimport os\n# pylint: disable=E0611\n\nfrom distutils.core import setup\n\nfrom avocado import VERSION\n\n\nVIRTUAL_ENV = 'VIRTUAL_ENV' in os.environ\n\n\ndef get_dir(system_path=None, virtual_path=None):\n    \"\"\"\n    Retrieve VIRTUAL_ENV friendly path\n    :param system_path: Relative system path\n    :param virtual_path: Overrides system_path for virtual_env only\n    :return: VIRTUAL_ENV friendly path\n    \"\"\"\n    if virtual_path is None:\n        virtual_path = system_path\n    if VIRTUAL_ENV:\n        if virtual_path is None:\n            virtual_path = []\n        return os.path.join(*virtual_path)\n    else:\n        if system_path is None:\n            system_path = []\n        return os.path.join(*(['/'] + system_path))\n\n\ndef get_tests_dir():\n    return get_dir(['usr', 'share', 'avocado', 'tests'], ['tests'])\n\n\ndef get_avocado_libexec_dir():\n    if VIRTUAL_ENV:\n        return get_dir(['libexec'])\n    elif os.path.exists('/usr/libexec'):    # RHEL-like distro\n        return get_dir(['usr', 'libexec', 'avocado'])\n    else:                                   # Debian-like distro\n        return get_dir(['usr', 'lib', 'avocado'])\n\n\ndef get_data_files():\n    data_files = [(get_dir(['etc', 'avocado']), ['etc/avocado/avocado.conf'])]\n    data_files += [(get_dir(['etc', 'avocado', 'conf.d']),\n                    ['etc/avocado/conf.d/README', 'etc/avocado/conf.d/gdb.conf'])]\n    data_files += [(get_dir(['etc', 'avocado', 'sysinfo']),\n                    ['etc/avocado/sysinfo/commands', 'etc/avocado/sysinfo/files',\n                     'etc/avocado/sysinfo/profilers'])]\n    data_files += [(get_tests_dir(), glob.glob('examples/tests/*.py'))]\n    for data_dir in glob.glob('examples/tests/*.data'):\n        fmt_str = '%s/*' % data_dir\n        for f in glob.glob(fmt_str):\n            data_files += [(os.path.join(get_tests_dir(),\n                                         os.path.basename(data_dir)), [f])]\n    data_files.append((get_dir(['usr', 'share', 'doc', 'avocado'], ['.']),\n                       ['man/avocado.rst', 'man/avocado-rest-client.rst']))\n    data_files += [(get_dir(['usr', 'share', 'avocado', 'wrappers'],\n                            ['wrappers']),\n                    glob.glob('examples/wrappers/*.sh'))]\n\n    data_files += [(get_dir(['usr', 'share', 'avocado', 'simpletests'],\n                            ['simpletests']),\n                    glob.glob('examples/simpletests/*.sh'))]\n\n    data_files.append((get_avocado_libexec_dir(), glob.glob('libexec/*')))\n    return data_files\n\n\ndef _get_plugin_resource_files(path):\n    \"\"\"\n    Given a path, return all the files in there to package\n    \"\"\"\n    flist = []\n    for root, _, files in sorted(os.walk(path)):\n        for name in files:\n            fullname = os.path.join(root, name)\n            flist.append(fullname[len('avocado/core/plugins/'):])\n    return flist\n\n\ndef get_long_description():\n    with open('README.rst', 'r') as req:\n        req_contents = req.read()\n    return req_contents\n\nif __name__ == '__main__':\n    setup(name='avocado',\n          version=VERSION,\n          description='Avocado Test Framework',\n          long_description=get_long_description(),\n          author='Avocado Developers',\n          author_email='avocado-devel@redhat.com',\n          url='http://avocado-framework.github.io/',\n          packages=['avocado',\n                    'avocado.core',\n                    'avocado.core.plugins',\n                    'avocado.utils',\n                    'avocado.utils.external',\n                    'avocado.core.remote',\n                    'avocado.core.restclient',\n                    'avocado.core.restclient.cli',\n                    'avocado.core.restclient.cli.args',\n                    'avocado.core.restclient.cli.actions'],\n          package_data={'avocado.core.plugins': _get_plugin_resource_files(\n              'avocado/core/plugins/resources')},\n          data_files=get_data_files(),\n          scripts=['scripts/avocado',\n                   'scripts/avocado-rest-client'])\n", "path": "setup.py"}]}