abouttestsuites.xml 4.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
  3. "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
  4. <!ENTITY % general-entities SYSTEM "../general.ent">
  5. %general-entities;
  6. ]>
  7. <sect1 id="prepare-abouttestsuites">
  8. <?dbhtml filename="abouttestsuites.html"?>
  9. <title>关于测试套件</title>
  10. <!--para>Most packages provide a test suite. Running the test suite for a
  11. newly built package is a good idea because it can provide a <quote>sanity
  12. check</quote> indicating that everything compiled correctly. A test suite
  13. that passes its set of checks usually proves that the package is
  14. functioning as the developer intended. It does not, however, guarantee
  15. that the package is totally bug free.</para-->
  16. <para>多数软件包提供测试套件,
  17. 一般来说,为新构建的软件包运行测试套件是个好主意,
  18. 这可以进行一次 <quote>完整性检查</quote> ,从而确认所有东西编译正确。
  19. 如果测试套件中的所有检验项目都能通过,
  20. 一般就可以证明这个软件包像开发者期望的那样运行。
  21. 然而,这并不保证软件包完全没有错误。</para>
  22. <!--para>Some test suites are more important than others. For example,
  23. the test suites for the core toolchain packages&mdash;GCC, Binutils, and
  24. Glibc&mdash;are of the utmost importance due to their central role in a
  25. properly functioning system. The test suites for GCC and Glibc can
  26. take a very long time to complete, especially on slower hardware, but
  27. are strongly recommended.</para-->
  28. <para>某些软件包的测试套件比其他的更为重要。
  29. 例如,组成核心工具链的几个软件包 &mdash; GCC、Binutils 和 Glibc
  30. 的测试套件就最为重要,因为这些软件包在系统的正常工作中发挥中心作用。
  31. GCC 和 Glibc 的测试套件需要运行很长时间,特别是在较慢的硬件上,
  32. 但我们仍然强烈推荐运行它们。</para>
  33. <note>
  34. <!--para>Experience has shown that there is little to be gained from running
  35. the test suites in <xref linkend="chapter-temporary-tools"/>. There can be
  36. no escaping the fact that the host system always exerts some influence on
  37. the tests in that chapter, often causing inexplicable failures. Because
  38. the tools built in <xref linkend="chapter-temporary-tools"/> are temporary
  39. and eventually discarded, we do not recommend running the test suites in
  40. <xref linkend="chapter-temporary-tools"/> for the average reader. The
  41. instructions for running those test suites are provided for the benefit of
  42. testers and developers, but they are strictly optional.</para-->
  43. <para>经验表明,在 <xref linkend="chapter-temporary-tools"/>
  44. 中运行测试套件几乎没有意义。在这一章中,
  45. 我们无法绝对避免宿主系统对测试过程的影响,
  46. 这往往导致不可避免的失败结果。再加上由于
  47. <xref linkend="chapter-temporary-tools"/> 中的工具是临时的,
  48. 最终会被丢弃,我们不建议一般读者在
  49. <xref linkend="chapter-temporary-tools"/> 中运行测试套件。
  50. 尽管我们为测试人员和开发人员考虑,提供了运行这些测试套件的方法,
  51. 但它们绝对不是必须运行的。</para>
  52. </note>
  53. <!--para>A common issue with running the test suites for Binutils and GCC
  54. is running out of pseudo terminals (PTYs). This can result in a high
  55. number of failing tests. This may happen for several reasons, but the
  56. most likely cause is that the host system does not have the
  57. <systemitem class="filesystem">devpts</systemitem> file system set up
  58. correctly. This issue is discussed in greater detail at
  59. <ulink url="&lfs-root;lfs/faq.html#no-ptys"/>.</para-->
  60. <para>在运行 Binutils 和 GCC 的测试套件时,最普遍发生的问题是虚拟终端
  61. (PTY) 被耗尽,这会导致大量测试出现失败结果。
  62. 这种现象有多种可能原因,但最常见的原因是宿主系统没有正确设置
  63. <systemitem class="filesystem">devpts</systemitem> 文件系统。
  64. 关于这个问题的更多细节在
  65. <ulink url="&lfs-root;lfs/faq.html#no-ptys"/> 中进行了讨论。</para>
  66. <!--para>Sometimes package test suites will fail, but for reasons which the
  67. developers are aware of and have deemed non-critical. Consult the logs located
  68. at <ulink url="&test-results;"/> to verify whether or not these failures are
  69. expected. This site is valid for all tests throughout this book.</para-->
  70. <para>一些软件包的测试套件总是失败,但开发者已经知道失败原因,
  71. 并判定这些失败并不重要。参照 <ulink url="&test-results;"/>
  72. 中的构建日志,来检查这些失败是否符合预期。
  73. 本书中的所有测试都可以在该网址查询。</para>
  74. </sect1>