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