]> git.donarmstrong.com Git - debhelper.git/blob - dh_auto_test
cmake: Pass CPPFLAGS in CFLAGS. Closes: #668813 Thanks, Simon Ruderich for the patch...
[debhelper.git] / dh_auto_test
1 #!/usr/bin/perl -w
2
3 =head1 NAME
4
5 dh_auto_test - automatically runs a package's test suites
6
7 =cut
8
9 use strict;
10 use Debian::Debhelper::Dh_Lib;
11 use Debian::Debhelper::Dh_Buildsystems;
12
13 =head1 SYNOPSIS
14
15 B<dh_auto_test> [S<I<build system options>>] [S<I<debhelper options>>] [S<B<--> I<params>>]
16
17 =head1 DESCRIPTION
18
19 B<dh_auto_test> is a debhelper program that tries to automatically run a
20 package's test suite. It does so by running the appropriate command for the
21 build system it detects the package uses. For example, if there's a
22 Makefile and it contains a B<test> or B<check> target, then this is done by
23 running B<make> (or B<MAKE>, if the environment variable is set). If the test
24 suite fails, the command will exit nonzero. If there's no test suite, it
25 will exit zero without doing anything.
26
27 This is intended to work for about 90% of packages with a test suite. If it
28 doesn't work, you're encouraged to skip using B<dh_auto_test> at all, and
29 just run the test suite manually.
30
31 =head1 OPTIONS
32
33 See L<debhelper(7)/B<BUILD SYSTEM OPTIONS>> for a list of common build
34 system selection and control options.
35
36 =over 4
37
38 =item B<--> I<params>
39
40 Pass I<params> to the program that is run, after the parameters that
41 B<dh_auto_test> usually passes.
42
43 =back
44
45 =head1 NOTES
46
47 If the B<DEB_BUILD_OPTIONS> environment variable contains B<nocheck>, no
48 tests will be performed.
49
50 =cut
51
52 if (get_buildoption("nocheck")) {
53         exit 0;
54 }
55
56 buildsystems_init();
57 buildsystems_do();
58
59 =head1 SEE ALSO
60
61 L<debhelper(7)>
62
63 This program is a part of debhelper.
64
65 =head1 AUTHOR
66
67 Joey Hess <joeyh@debian.org>
68
69 =cut