prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  shell test kcov suggestion does not work
  ### Steps to reproduce the issue
  
  ```console
  $ ./share/spack/qa/run-shell-tests 
  ERROR: kcov is required to run this script.
  
  To install with Spack, run:
      $ spack install kcov
  Then add the bin directory to your PATH.
  $ spack load kcov
  $ ./share/spack/qa/run-shell-tests 
  ERROR: kcov is required to run this script.
  
  To install with Spack, run:
      $ spack install kcov
  Then add the bin directory to your PATH.
  ```
  
  Seems like there is no kcov binary:
  
  ```
  $ kcov
  
  Command 'kcov' not found, but can be installed with:
  
  sudo apt install kcov
  ```
  
  * **Spack:** 0.16.0-1501-e8eb76c198
  * **Python:** 3.8.7
  * **Platform:** linux-ubuntu20.04-zen2
  * **Concretizer:** clingo
  
  ### Additional information
  
  - [x] I have run `spack debug report` and reported the version of Spack/Python/Platform
  - [x] I have searched the issues of this repo and believe this is not a duplicate
  - [x] I have run the failing commands in debug mode and reported the output
  
  
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `var/spack/repos/builtin/packages/kcov/package.py`
  Content:
  ```
  1 # Copyright 2013-2021 Lawrence Livermore National Security, LLC and other
  2 # Spack Project Developers. See the top-level COPYRIGHT file for details.
  3 #
  4 # SPDX-License-Identifier: (Apache-2.0 OR MIT)
  5 
  6 from spack import *
  7 
  8 
  9 class Kcov(CMakePackage):
  10     """Code coverage tool for compiled programs, Python and Bash which uses
  11     debugging information to collect and report data without special
  12     compilation options"""
  13 
  14     homepage = "http://simonkagstrom.github.io/kcov/index.html"
  15     url      = "https://github.com/SimonKagstrom/kcov/archive/38.tar.gz"
  16 
  17     version('38', sha256='b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4')
  18 
  19     depends_on('cmake@2.8.4:', type='build')
  20     depends_on('zlib')
  21     depends_on('curl')
  22 
  23     def cmake_args(self):
  24         # Necessary at least on macOS, fixes linking error to LLDB
  25         # https://github.com/Homebrew/homebrew-core/blob/master/Formula/kcov.rb
  26         return ['-DSPECIFY_RPATH=ON']
  27 
  28     @run_after('install')
  29     @on_package_attributes(run_tests=True)
  30     def test_install(self):
  31         # The help message exits with an exit code of 1
  32         kcov = Executable(self.prefix.bin.kcov)
  33         kcov('-h', ignore_errors=1)
  34
  ```
  --- 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/var/spack/repos/builtin/packages/kcov/package.py b/var/spack/repos/builtin/packages/kcov/package.py
  --- a/var/spack/repos/builtin/packages/kcov/package.py
  +++ b/var/spack/repos/builtin/packages/kcov/package.py
  @@ -19,6 +19,8 @@
       depends_on('cmake@2.8.4:', type='build')
       depends_on('zlib')
       depends_on('curl')
  +    depends_on('elfutils')
  +    depends_on('binutils +libiberty', type='link')
   
       def cmake_args(self):
           # Necessary at least on macOS, fixes linking error to LLDB
  
verification_info: {"golden_diff": "diff --git a/var/spack/repos/builtin/packages/kcov/package.py b/var/spack/repos/builtin/packages/kcov/package.py\n--- a/var/spack/repos/builtin/packages/kcov/package.py\n+++ b/var/spack/repos/builtin/packages/kcov/package.py\n@@ -19,6 +19,8 @@\n     depends_on('cmake@2.8.4:', type='build')\n     depends_on('zlib')\n     depends_on('curl')\n+    depends_on('elfutils')\n+    depends_on('binutils +libiberty', type='link')\n \n     def cmake_args(self):\n         # Necessary at least on macOS, fixes linking error to LLDB\n", "issue": "shell test kcov suggestion does not work\n### Steps to reproduce the issue\r\n\r\n```console\r\n$ ./share/spack/qa/run-shell-tests \r\nERROR: kcov is required to run this script.\r\n\r\nTo install with Spack, run:\r\n    $ spack install kcov\r\nThen add the bin directory to your PATH.\r\n$ spack load kcov\r\n$ ./share/spack/qa/run-shell-tests \r\nERROR: kcov is required to run this script.\r\n\r\nTo install with Spack, run:\r\n    $ spack install kcov\r\nThen add the bin directory to your PATH.\r\n```\r\n\r\nSeems like there is no kcov binary:\r\n\r\n```\r\n$ kcov\r\n\r\nCommand 'kcov' not found, but can be installed with:\r\n\r\nsudo apt install kcov\r\n```\r\n\r\n* **Spack:** 0.16.0-1501-e8eb76c198\r\n* **Python:** 3.8.7\r\n* **Platform:** linux-ubuntu20.04-zen2\r\n* **Concretizer:** clingo\r\n\r\n### Additional information\r\n\r\n- [x] I have run `spack debug report` and reported the version of Spack/Python/Platform\r\n- [x] I have searched the issues of this repo and believe this is not a duplicate\r\n- [x] I have run the failing commands in debug mode and reported the output\r\n\r\n\r\n\n", "before_files": [{"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Kcov(CMakePackage):\n    \"\"\"Code coverage tool for compiled programs, Python and Bash which uses\n    debugging information to collect and report data without special\n    compilation options\"\"\"\n\n    homepage = \"http://simonkagstrom.github.io/kcov/index.html\"\n    url      = \"https://github.com/SimonKagstrom/kcov/archive/38.tar.gz\"\n\n    version('38', sha256='b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4')\n\n    depends_on('cmake@2.8.4:', type='build')\n    depends_on('zlib')\n    depends_on('curl')\n\n    def cmake_args(self):\n        # Necessary at least on macOS, fixes linking error to LLDB\n        # https://github.com/Homebrew/homebrew-core/blob/master/Formula/kcov.rb\n        return ['-DSPECIFY_RPATH=ON']\n\n    @run_after('install')\n    @on_package_attributes(run_tests=True)\n    def test_install(self):\n        # The help message exits with an exit code of 1\n        kcov = Executable(self.prefix.bin.kcov)\n        kcov('-h', ignore_errors=1)\n", "path": "var/spack/repos/builtin/packages/kcov/package.py"}], "after_files": [{"content": "# Copyright 2013-2021 Lawrence Livermore National Security, LLC and other\n# Spack Project Developers. See the top-level COPYRIGHT file for details.\n#\n# SPDX-License-Identifier: (Apache-2.0 OR MIT)\n\nfrom spack import *\n\n\nclass Kcov(CMakePackage):\n    \"\"\"Code coverage tool for compiled programs, Python and Bash which uses\n    debugging information to collect and report data without special\n    compilation options\"\"\"\n\n    homepage = \"http://simonkagstrom.github.io/kcov/index.html\"\n    url      = \"https://github.com/SimonKagstrom/kcov/archive/38.tar.gz\"\n\n    version('38', sha256='b37af60d81a9b1e3b140f9473bdcb7975af12040feb24cc666f9bb2bb0be68b4')\n\n    depends_on('cmake@2.8.4:', type='build')\n    depends_on('zlib')\n    depends_on('curl')\n    depends_on('elfutils')\n    depends_on('binutils +libiberty', type='link')\n\n    def cmake_args(self):\n        # Necessary at least on macOS, fixes linking error to LLDB\n        # https://github.com/Homebrew/homebrew-core/blob/master/Formula/kcov.rb\n        return ['-DSPECIFY_RPATH=ON']\n\n    @run_after('install')\n    @on_package_attributes(run_tests=True)\n    def test_install(self):\n        # The help message exits with an exit code of 1\n        kcov = Executable(self.prefix.bin.kcov)\n        kcov('-h', ignore_errors=1)\n", "path": "var/spack/repos/builtin/packages/kcov/package.py"}]}