1Test::Smoke::Util(3)  User Contributed Perl Documentation Test::Smoke::Util(3)
2
3
4

NAME

6       Test::Smoke::Util - Take out some of the functions of the smoke suite.
7

FUNCTIONS

9       I've taken out some of the general stuff and put it here.  Now I can
10       write some tests!
11
12   Configure_win32( $command[, $win32_maker[, @args]] )
13       "Configure_win32()" alters the settings of the makefile for MSWin32.
14
15       $command is in the form of './Configure -des -Dusedevel ...'
16
17       $win32_maker should either be "nmake" or "dmake", the default is
18       "nmake".
19
20       @args is a list of "option=value" pairs that will (eventually) be
21       passed to Config.pm.
22
23       PLEASE read README.win32 and study the comments in the makefile.
24
25       It supports these options:
26
27       ·   -Duseperlio
28
29           set USE_PERLIO = define (default) [should be depricated]
30
31       ·   -Dusethreads
32
33           set USE_ITHREADS = define (also sets USE_MULTI and USE_IMP_SYS)
34
35       ·   -Duseithreads
36
37           set USE_ITHREADS = define (also sets USE_MULTI and USE_IMP_SYS)
38
39       ·   -Dusemultiplicity
40
41           sets USE_MULTI = define (also sets USE_ITHREADS and USE_IMP_SYS)
42
43       ·   -Duseimpsys
44
45           sets USE_IMP_SYS = define (also sets USE_ITHREADS and USE_MULTI)
46
47       ·   -Dusemymalloc
48
49           set PERL_MALLOC = define
50
51       ·   -Duselargefiles
52
53           set USE_LARGE_FILES = define
54
55       ·   -Dbccold
56
57           set BCCOLD = define (this is for bcc32 <= 5.4)
58
59       ·   -Dgcc_v3_2
60
61           set USE_GCC_V3_2 = define (this is for gcc >= 3.2)
62
63       ·   -DDEBUGGING
64
65           sets CFG = Debug
66
67       ·   -DINST_DRV=...
68
69           sets INST_DRV to a new value (default is "c:")
70
71       ·   -DINST_TOP=...
72
73           sets INST_DRV to a new value (default is "$(INST_DRV)\perl"), this
74           is where perl will be installed when "[nd]make install" is run.
75
76       ·   -DINST_VER=...
77
78           sets INST_VER to a new value (default is forced not set), this is
79           also used as part of the installation path to get a more unixy
80           installation.  Without "INST_VER" and "INST_ARCH" you get an
81           ActiveState like installation.
82
83       ·   -DINST_ARCH=...
84
85           sets INST_ARCH to a new value (default is forced not set), this is
86           also used as part of the installation path to get a more unixy
87           installation.  Without "INST_VER" and "INST_ARCH" you get an
88           ActiveState like installation.
89
90       ·   -DCCHOME=...
91
92           Set the base directory for the C compiler.  $(CCHOME)\bin still
93           needs to be in the path!
94
95       ·   -DIS_WIN95
96
97           sets IS_WIN95 to 'define' to indicate this is Win9[58]
98
99       ·   -DCRYPT_SRC=...
100
101           The file to use as source for des_fcrypt()
102
103       ·   -DCRYPT_LIB=...
104
105           The library to use for des_fcrypt()
106
107       ·   -Dcf_email=...
108
109           Set the cf_email option (Config.pm)
110
111       ·   -Accflags=...
112
113           Adds the option to BUILDOPT. This is implemented differently for
114           nmake and dmake.  Returns the name of the outputfile.
115
116   set_vms_rooted_logical( $logical, $dir )
117       This will set a VMS rooted logical like:
118
119           define/translation=concealed $logical $dir
120
121   get_cfg_filename( )
122       "get_cfg_filename()" tries to find a cfg file and returns it.
123
124   read_logfile( )
125       Read the logfile. If an argument is passed, force to (re)read the log
126       If no argument is passed, return the stored log if available otherwise
127       read the logfile
128
129   grepccmsg( $cc, $logfile, $verbose )
130       This is a port of Jarkko Hietaniemi's grepccerr script.
131
132   grepnonfatal( $cc, $logfile, $verbose )
133       This is a way to find known failures that do not cause the tests to
134       fail but are important enough to report, like being unable to install
135       manual pages.
136
137   get_local_patches( $ddir )
138       "get_local_patches()" reads patchlevel.h to scan for the locally
139       applied patches array.
140
141   set_local_patch( $ddir, @descr )
142       Copy the code from patchlevel.h. Older (pre 5.8.1) perls do not have it
143       and it doesn't work on MSWin32.
144
145   get_config( $filename )
146       Read and parse the configuration from file, or return the default
147       config.
148
149   get_patch( [$ddir] )
150       Try to find the patchlevel, look for .patch or try to get it from
151       patchlevel.h as a fallback.
152
153   version_from_patchlevel_h( $ddir )
154       "version_from_patchlevel_h()" returns a "dotted" version as derived
155       from the patchlevel.h file in the distribution.
156
157   get_ncpu( $osname )
158       "get_ncpu()" returns the number of available (online/active/enabled)
159       CPUs.
160
161       It does this by using some operating system specific trick (usually by
162       running some external command and parsing the output).
163
164       If it cannot recognize your operating system an empty string is
165       returned.  If it can recognize it but the external command failed, "?
166       cpus" is returned.
167
168       In the first case (where we really have no idea how to proceed), also a
169       warning ("get_ncpu: unknown operating system") is sent to STDERR.
170
171       WARNINGS
172           If you get the warning "get_ncpu: unknown operating system", you
173           will need to help us-- how does one tell the number of available
174           CPUs in your operating system?  Sometimes there are several
175           different ways: please try to find the fastest one, and a one that
176           does not require superuser (administrator) rights.
177
178           Thanks to Jarkko Hietaniemi for donating this!
179
180   get_smoked_Config( $dir, @keys )
181       "get_smoked_Config()" returns a hash (a listified hash) with the
182       specified keys. It will try to find lib/Config.pm to get those values,
183       if that cannot be found (make error?) we can try config.sh which is
184       used to build lib/Config.pm.  If config.sh is not there (./Configure
185       error?) we try to get some fallback information from "POSIX::uname()"
186       and patchlevel.h.
187
188   parse_report_Config( $report )
189       "parse_report_Config()" returns a list attributes from a smoke report.
190
191           my( $version, $plevel, $os, $osvers, $archname, $summary, $branch ) =
192               parse_report_Config( $rpt );
193
194   get_regen_headers( $ddir )
195       "get_regen_headers()" looks in $ddir to find either regen_headers.pl or
196       regen.pl (change 18851).
197
198       Returns undef if not found or a string like "$^X "$regen_headers_pl""
199
200   run_regen_headers( $ddir, $verbose );
201       "run_regen_headers()" gets its executable from "get_regen_headers()"
202       and opens a pipe from it. warn()s on error.
203
204   whereis( $prog )
205       Try to find an executable instance of $prog in $ENV{PATH}.
206
207       Rreturns a full file-path (with extension) to it.
208
209   vms_whereis( $prog )
210       First look in the SYMBOLS to see if $prog is there.  Next look in the
211       KFE-table "INSTALL LIST" if it is there.  As a last resort we can scan
212       "DCL$PATH" like we do on *nix/Win32
213
214   clean_filename( $fname )
215       "clean_filename()" basically returns a vmsify() type of filename for
216       VMS, and returns an upcase filename for case-ignorant filesystems.
217
218   calc_timeout( $killtime[, $from] )
219       "calc_timeout()" calculates the timeout in seconds.  $killtime can be
220       one of two formats:
221
222       +hh:mm  This format represents a duration and is the easy format as we
223               only need to translate that to seconds.
224
225       hh:mm   This format represents a clock time (localtime).  Calculate
226               minutes from midnight for both $killtime and
227               "localtime($from)", and get the difference. If $from is
228               omitted, "time()" is used.
229
230               If $killtime is the actual time, the timeout will be 24 hours!
231
232   time_in_hhmm( $diff )
233       Create a string telling elapsed time in days, hours, minutes, seconds
234       from the number of seconds.
235
236   do_pod2usage( %pod2usage_options )
237       If Pod::Usage is there then call its "pod2usage()".  In the other case,
238       print the general message passed with the "myusage" key.
239
240   skip_config( $config )
241       Returns true if this config should be skipped.  $config should be a
242       Test::Smoke::BuildCFG::Config object.
243
244   skip_filter( $line )
245       "skip_filter()" returns true if the filter rules apply to $line.
246
248       (c) 2001-2014, All rights reserved.
249
250         * H. Merijn Brand <h.m.brand@hccnet.nl>
251         * Nicholas Clark <nick@unfortu.net>
252         * Jarkko Hietaniemi <jhi@iki.fi>
253         * Abe Timmerman <abeltje@cpan.org>
254
255       This library is free software; you can redistribute it and/or modify it
256       under the same terms as Perl itself.
257
258       See:
259
260         * <http://www.perl.com/perl/misc/Artistic.html>,
261         * <http://www.gnu.org/copyleft/gpl.html>
262
263       This program is distributed in the hope that it will be useful, but
264       WITHOUT ANY WARRANTY; without even the implied warranty of
265       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
266
267
268
269perl v5.32.0                      2020-07-28              Test::Smoke::Util(3)
Impressum