~ubuntu-branches/ubuntu/lucid/spamassassin/lucid-updates

« back to all changes in this revision

Viewing changes to t/spamd_prefork_stress_2.t

  • Committer: Bazaar Package Importer
  • Author(s): Noah Meyerhans
  • Date: 2010-01-26 22:53:12 UTC
  • mfrom: (1.1.13 upstream) (5.1.7 sid)
  • Revision ID: james.westby@ubuntu.com-20100126225312-wkftb10idc1kz2aq
Tags: 3.3.0-1
* New upstream version.
* Switch to dpkg-source 3.0 (quilt) format

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
use SATest; sa_t_init("spamd_prefork_stress_2");
8
8
use Test;
9
9
 
 
10
use constant TEST_ENABLED => conf_bool('run_long_tests');
10
11
our $RUN_THIS_TEST;
11
12
 
12
13
my $pgrep;
14
15
 
15
16
# require pkill and pgrep be installed to run this test
16
17
BEGIN {
17
 
  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test');
 
18
  $RUN_THIS_TEST = conf_bool('run_spamd_prefork_stress_test') && TEST_ENABLED;
18
19
  $pkill = locate_command("pkill");
19
20
  $pgrep = locate_command("pgrep");
20
21
  $RUN_THIS_TEST = 0 if !$pkill || !$pgrep;
21
 
  plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 14) 
 
22
  plan tests => ($SKIP_SPAMD_TESTS || !$RUN_THIS_TEST ? 0 : 14)
22
23
};
23
24
 
24
25
exit if $SKIP_SPAMD_TESTS;
25
26
 
26
 
print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and\n".
27
 
    "'run_spamd_prefork_stress_test' set to 'y'.\n";
 
27
print "NOTE: this test requires /usr/bin/pkill, /usr/bin/pgrep, and both\n".
 
28
    "'run_spamd_prefork_stress_test' and 'run_long_tests' set to 'y'.\n";
28
29
exit unless $RUN_THIS_TEST;
29
30
 
30
31
system($pgrep, "spamd child");