File: TESTING

package info (click to toggle)
arename 4.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,112 kB
  • sloc: perl: 640; sh: 585; makefile: 147
file content (100 lines) | stat: -rw-r--r-- 3,357 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
arename's test suite


 PRELIMINARIES

  To use this test suite, you will (in addition to the modules arename
  needs anyway) need the Perl modules Test::More, Test::Exception and
  Test::Harness.

  In addition to that, you will need a few audio related tools (because the
  testsuite generates audio data to do tests with):
      + oggenc           - encode to ogg vorbis
      + flac             - encode to flac
      + lame             - encode to mp3
      + vorbiscomment    - manipulate tags in ogg vorbis files
      + metaflac         - manipulate tags in flac files
      + id3v2            - manipulate tags in mp3 files
      + prove            - from Test::Harness to run the ./tests/*.t tests
      + podchecker       - check the syntax of the plain old documentation
                           in arename.in

      + fakeroot (opt)   - fake root previleges
      + perlcritic (opt) - check code style using ./perlcriticrc.
      + Devel::Cover     - for generating test coverage statistics
                           (optional)


  This test suite should run without failing tests on all systems. If
  you see any failures, report them. Include arename's version,
  Perl's version, your system's version information (e.g. the output
  of 'uname -a') and anything else you consider important. Plus the
  output of the failing test, of course.


 RUNNING THE SUITE

  To prepare needed data files to play with:
    % make prepare-test-data

  That step needed *once* (or after you cleaned the working directory).

  You can run the complete test suite by simply doing:
    % make test-all

  This takes some time, as this tests absolutely every test available.

  The following is a short hand for 'make test-doc test-suite':
    % make test

  'test' should always run successfully, even for the smallest changes.

  If you want to check if the pod syntax of the documentation is okay,
  run:
    % make test-doc

  To just run the perlcritic test for coding style, run:
    % make test-code

  Checking the installation process is done via:
    % make test-install

  If you'd like to check whether the output system behaves:
    % make test-output

  To run the Perl test suite from ./tests/*.t, do:
    % make test-suite

  If you want to run tests by hand, you can use the 'prove' utility,
  from Test::Harness (if you want to look at a problem in detail, for
  example):
    % prove -Imodules -v tests/data.t


 TESTING THE INSTALLATION PROCESS

  As mentioned above, the 'test-install' target checks the installation
  procedure. This test case needs the 'fakeroot' utility to be installed
  on the system. By default, the test suite looks for '/usr/bin/fakeroot'.
  If you installed it in another location do:

    % make test-install fakeroot=/usr/local/bin/fakeroot

  If the test suite cannot find fakeroot at all, the installation test
  will be skipped. Thus, fakeroot is optional for the testsuite.

  To run the installation tests by hand, do (from the source's root):

    % fakeroot /bin/sh ./tests/inst_t.sh


 TEST COVERAGE

  In order to have some sort of measurement about which parts of the code
  is currently covered by the test-suite, you may call the following:

    % make coverage
    % $BROWSER cover_db/coverage.html

  This function depends on the availability of the Devel::Cover module,
  available from CPAN.