Better detect build times
[Config-Perl-V.git] / t / 26_plv518.t
blob330fe342958b2957c8662f4b7a0ed9496573165a
1 #!/pro/bin/perl
3 use strict;
4 use warnings;
6 BEGIN {
7 use Test::More;
8 my $tests = 35;
9 unless ($ENV{PERL_CORE}) {
10 require Test::NoWarnings;
11 Test::NoWarnings->import ();
12 $tests++;
15 plan tests => $tests;
18 use Config::Perl::V;
20 ok (my $conf = Config::Perl::V::plv2hash (<DATA>), "Read perl -v block");
21 ok (exists $conf->{$_}, "Has $_ entry") for qw( build environment config inc );
23 is ($conf->{build}{osname}, $conf->{config}{osname}, "osname");
24 is ($conf->{build}{stamp}, "May 18 2013 17:34:20", "Build time");
25 is ($conf->{config}{version}, "5.18.0", "reconstructed \$Config{version}");
27 # Some random checks
28 is ($conf->{build}{options}{$_}, 0, "Runtime option $_") for qw(
29 DEBUG_LEAKING_SCALARS NO_HASH_SEED PERL_MEM_LOG_STDERR PERL_MEM_LOG_ENV
30 PERL_MEM_LOG_TIMESTAMP PERL_MICRO USE_ATTRIBUTES_FOR_PERLIO VMS_DO_SOCKETS );
32 my %check = (
33 alignbytes => 4,
34 api_version => 18,
35 bincompat5005 => "undef",
36 byteorder => 12345678,
37 cc => "cc",
38 cccdlflags => "-fPIC",
39 ccdlflags => "-Wl,-E",
40 config_args => "-Duse64bitint -Duselongdouble -des",
41 gccversion => "4.7.2 20130108 [gcc-4_7-branch revision 195012]",
42 gnulibc_version => "2.17",
43 ivsize => 8,
44 ivtype => "long long",
45 ld => "cc",
46 lddlflags => "-shared -O3 -L/pro/local/lib -fstack-protector",
47 ldflags => "-L/pro/local/lib -fstack-protector",
48 libc => "/lib/libc-2.17.so",
49 lseektype => "off_t",
50 osvers => "3.7.10-1.4-desktop",
51 use64bitint => "define",
53 is ($conf->{config}{$_}, $check{$_}, "reconstructed \$Config{$_}") for sort keys %check;
55 __END__
56 Summary of my perl5 (revision 5 version 18 subversion 0) configuration:
58 Platform:
59 osname=linux, osvers=3.7.10-1.4-desktop, archname=i686-linux-64int-ld
60 uname='linux test 3.7.10-1.4-desktop #1 smp preempt fri apr 19 12:06:34 utc 2013 (8ef74f8) i686 i686 i386 gnulinux '
61 config_args='-Duse64bitint -Duselongdouble -des'
62 hint=recommended, useposix=true, d_sigaction=define
63 useithreads=undef, usemultiplicity=undef
64 useperlio=define, d_sfio=undef, uselargefiles=define, usesocks=undef
65 use64bitint=define, use64bitall=undef, uselongdouble=define
66 usemymalloc=n, bincompat5005=undef
67 Compiler:
68 cc='cc', ccflags ='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
69 optimize='-O3',
70 cppflags='-fno-strict-aliasing -pipe -fstack-protector -I/pro/local/include'
71 ccversion='', gccversion='4.7.2 20130108 [gcc-4_7-branch revision 195012]', gccosandvers=''
72 intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=12345678
73 d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
74 ivtype='long long', ivsize=8, nvtype='long double', nvsize=12, Off_t='off_t', lseeksize=8
75 alignbytes=4, prototype=define
76 Linker and Libraries:
77 ld='cc', ldflags ='-L/pro/local/lib -fstack-protector'
78 libpth=/pro/local/lib /lib /usr/lib /usr/local/lib
79 libs=-lnsl -lgdbm -ldb -ldl -lm -lcrypt -lutil -lc -lgdbm_compat
80 perllibs=-lnsl -ldl -lm -lcrypt -lutil -lc
81 libc=/lib/libc-2.17.so, so=so, useshrplib=false, libperl=libperl.a
82 gnulibc_version='2.17'
83 Dynamic Linking:
84 dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
85 cccdlflags='-fPIC', lddlflags='-shared -O3 -L/pro/local/lib -fstack-protector'
88 Characteristics of this binary (from libperl):
89 Compile-time options: HAS_TIMES PERLIO_LAYERS PERL_DONT_CREATE_GVSV
90 PERL_HASH_FUNC_ONE_AT_A_TIME_HARD PERL_MALLOC_WRAP
91 PERL_PRESERVE_IVUV PERL_SAWAMPERSAND USE_64_BIT_INT
92 USE_LARGE_FILES USE_LOCALE USE_LOCALE_COLLATE
93 USE_LOCALE_CTYPE USE_LOCALE_NUMERIC USE_LONG_DOUBLE
94 USE_PERLIO USE_PERL_ATOF
95 Built under linux
96 Compiled at May 18 2013 17:34:20
97 @INC:
98 /pro/lib/perl5/site_perl/5.18.0/i686-linux-64int-ld
99 /pro/lib/perl5/site_perl/5.18.0
100 /pro/lib/perl5/5.18.0/i686-linux-64int-ld
101 /pro/lib/perl5/5.18.0