gooderp18绿色标准版
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

40 lines
4.4KB

  1. <?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>32.4. TAP Tests</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets V1.79.1" /><link rel="prev" href="regress-variant.html" title="32.3. Variant Comparison Files" /><link rel="next" href="regress-coverage.html" title="32.5. Test Coverage Examination" /></head><body><div xmlns="http://www.w3.org/TR/xhtml1/transitional" class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">32.4. TAP Tests</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="regress-variant.html" title="32.3. Variant Comparison Files">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="regress.html" title="Chapter 32. Regression Tests">Up</a></td><th width="60%" align="center">Chapter 32. Regression Tests</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 12.4 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="regress-coverage.html" title="32.5. Test Coverage Examination">Next</a></td></tr></table><hr></hr></div><div class="sect1" id="REGRESS-TAP"><div class="titlepage"><div><div><h2 class="title" style="clear: both">32.4. TAP Tests</h2></div></div></div><p>
  3. Various tests, particularly the client program tests
  4. under <code class="filename">src/bin</code>, use the Perl TAP tools and are run
  5. using the Perl testing program <code class="command">prove</code>. You can pass
  6. command-line options to <code class="command">prove</code> by setting
  7. the <code class="command">make</code> variable <code class="varname">PROVE_FLAGS</code>, for example:
  8. </p><pre class="programlisting">
  9. make -C src/bin check PROVE_FLAGS='--timer'
  10. </pre><p>
  11. See the manual page of <code class="command">prove</code> for more information.
  12. </p><p>
  13. The <code class="command">make</code> variable <code class="varname">PROVE_TESTS</code>
  14. can be used to define a whitespace-separated list of paths relative
  15. to the <code class="filename">Makefile</code> invoking <code class="command">prove</code>
  16. to run the specified subset of tests instead of the default
  17. <code class="filename">t/*.pl</code>. For example:
  18. </p><pre class="programlisting">
  19. make check PROVE_TESTS='t/001_test1.pl t/003_test3.pl'
  20. </pre><p>
  21. </p><p>
  22. The TAP tests require the Perl module <code class="literal">IPC::Run</code>.
  23. This module is available from CPAN or an operating system package.
  24. </p><p>
  25. Generically speaking, the TAP tests will test the executables in a
  26. previously-installed installation tree if you say <code class="literal">make
  27. installcheck</code>, or will build a new local installation tree from
  28. current sources if you say <code class="literal">make check</code>. In either
  29. case they will initialize a local instance (data directory) and
  30. transiently run a server in it. Some of these tests run more than one
  31. server. Thus, these tests can be fairly resource-intensive.
  32. </p><p>
  33. It's important to realize that the TAP tests will start test server(s)
  34. even when you say <code class="literal">make installcheck</code>; this is unlike
  35. the traditional non-TAP testing infrastructure, which expects to use an
  36. already-running test server in that case. Some PostgreSQL
  37. subdirectories contain both traditional-style and TAP-style tests,
  38. meaning that <code class="literal">make installcheck</code> will produce a mix of
  39. results from temporary servers and the already-running test server.
  40. </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="regress-variant.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="regress.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="regress-coverage.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">32.3. Variant Comparison Files </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> 32.5. Test Coverage Examination</td></tr></table></div></body></html>
上海开阖软件有限公司 沪ICP备12045867号-1