From: Jarkko Hietaniemi Date: Thu, 18 Jan 2001 04:29:42 +0000 (+0000) Subject: Add Schwern's 1_compile test. The compile_module script renamed X-Git-Tag: accepted/trunk/20130322.191538~33056 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7200bc44d9f5c2204bf35a8c0a192e5cc9698d27;p=platform%2Fupstream%2Fperl.git Add Schwern's 1_compile test. The compile_module script renamed to be a bit shorter for the 8.3 people. p4raw-id: //depot/perl@8471 --- diff --git a/MANIFEST b/MANIFEST index b948d38..49813e8 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1348,6 +1348,7 @@ t/io/print.t See if print commands work t/io/read.t See if read works t/io/tell.t See if file seeking works t/io/utf8.t See if file seeking works +t/lib/1_compile.t See if the various libraries and extensions compile t/lib/abbrev.t See if Text::Abbrev works t/lib/ansicolor.t See if Term::ANSIColor works t/lib/anydbm.t See if AnyDBM_File works @@ -1368,6 +1369,7 @@ t/lib/charnames.t See if character names work t/lib/checktree.t See if File::CheckTree works t/lib/class-struct.t See if Class::Struct works t/lib/complex.t See if Math::Complex works +t/lib/compmod.pl Helper for 1_compile.t t/lib/db-btree.t See if DB_File works t/lib/db-hash.t See if DB_File works t/lib/db-recno.t See if DB_File works diff --git a/t/lib/1_compile.t b/t/lib/1_compile.t new file mode 100644 index 0000000..2e7bc33 --- /dev/null +++ b/t/lib/1_compile.t @@ -0,0 +1,229 @@ +#!./perl + +BEGIN { + chdir '..' if -d '../pod' && -d '../t'; + @INC = 'lib'; +} + +use strict; +use warnings; + +my @Core_Modules = ( + 'AnyDBM_File', + 'AutoLoader', + 'AutoSplit', + 'B', # Do all these B things compile everywhere? + 'B::Asmdata', + 'B::Assembler', + 'B::Bblock', + 'B::Bytecode', + 'B::C', + 'B::CC', + 'B::Concise', + 'B::Debug', + 'B::Deparse', + 'B::Disassembler', + 'B::Lint', + 'B::Showlex', + 'B::Stackobj', + 'B::Stash', + 'B::Terse', + 'B::Xref', + 'Benchmark', + 'ByteLoader', + 'CGI', + 'CGI::Apache', + 'CGI::Carp', + 'CGI::Cookie', + # 'CGI::Fast', # won't load without FCGI + 'CGI::Pretty', + 'CGI::Push', + 'CGI::Switch', + 'CGI::Util', + 'CPAN', + 'CPAN::FirstTime', + 'CPAN::Nox', + 'Carp', + 'Carp::Heavy', + 'Class::Struct', + 'Config', + 'Cwd', + 'DB', + # DB_File # config specific + 'Data::Dumper', + # 'Devel::DProf', # needs to run as -d:DProf + 'Devel::Peek', + 'Devel::SelfStubber', + 'DirHandle', + 'Dumpvalue', + 'DynaLoader', # config specific? + 'English', + 'Encode', + 'Env', + 'Errno', + 'Exporter', + 'Exporter::Heavy', + 'ExtUtils::Command', + 'ExtUtils::Embed', + 'ExtUtils::Install', + 'ExtUtils::Installed', + 'ExtUtils::Liblist', + # ExtUtils::MM_Cygwin # ExtUtils::MakeMaker takes + # ExtUtils::MM_OS2 # care of testing these. + # ExtUtils::MM_Unix + # ExtUtils::MM_VMS + # ExtUtils::MM_Win32 + 'ExtUtils::MakeMaker', + 'ExtUtils::Manifest', + 'ExtUtils::Mkbootstrap', + 'ExtUtils::Mksymlists', + 'ExtUtils::Packlist', + 'ExtUtils::testlib', + 'Fatal', + 'Fcntl', # config specific? + 'File::Basename', + 'File::CheckTree', + 'File::Compare', + 'File::Copy', + 'File::DosGlob', + 'File::Find', + 'File::Glob', + 'File::Path', + 'File::Spec', + 'File::Spec::Functions', + # File::Spec::EPOC # File::Spec will take care of + # File::Spec::Mac # testing these compile. + # File::Spec::OS2 + # File::Spec::Unix + # File::Spec::VMS + # File::Spec::Win32 + 'File::stat', + 'FileCache', + 'FileHandle', + 'Filter::Simple', + 'Filter::Util::Call', + 'FindBin', + 'Getopt::Long', + 'Getopt::Std', + 'I18N::Collate', + 'IO', + 'IO::Dir', + 'IO::File', + 'IO::Handle', + 'IO::Pipe', + 'IO::Poll', + 'IO::Seekable', + 'IO::Select', + 'IO::Socket', + 'IO::Socket::INET', + # IO::Socket::UNIX # config specific + 'IPC::Msg', + 'IPC::Open2', + 'IPC::Open3', + 'IPC::Semaphore', # config specific? + 'IPC::SysV', # config specific? + 'Math::BigFloat', + 'Math::BigInt', + 'Math::Complex', + 'Math::Trig', + 'Net::Ping', + 'Net::hostent', + 'Net::netent', + 'Net::protoent', + 'Net::servent', + 'O', + 'Opcode', + 'POSIX', # config specific? + 'Pod::Checker', + 'Pod::Find', + 'Pod::Functions', + 'Pod::Html', + 'Pod::InputObjects', + 'Pod::Man', + 'Pod::Overstrike', + 'Pod::ParseUtils', + 'Pod::Parser', + 'Pod::Plainer', + 'Pod::Select', + 'Pod::Text', + 'Pod::Text::Color', + 'Pod::Text::Termcap', + 'Pod::Usage', + 'SDBM_File', + 'Safe', + 'Search::Dict', + 'SelectSaver', + 'SelfLoader', + 'Shell', + 'Socket', + 'Symbol', + 'Sys::Hostname', + 'Sys::Syslog', + 'Term::ANSIColor', + 'Term::Cap', + 'Term::Complete', + 'Term::ReadLine', + 'Test', + 'Test::Harness', + 'Text::Abbrev', + 'Text::ParseWords', + 'Text::Soundex', + 'Text::Tabs', + 'Text::Wrap', + 'Tie::Array', + 'Tie::Hash', + 'Tie::RefHash', + 'Tie::Scalar', + 'Tie::SubstrHash', + 'Time::Local', + 'Time::gmtime', + 'Time::localtime', + 'Time::tm', + 'UNIVERSAL', + 'User::grent', + 'User::pwent', + 'XSLoader', + 'attributes', + 'attrs', + 'autouse', + 'blib', + 'bytes', + 'charnames', + 'constant', + 'diagnostics', + 'filetest', + 'integer', + 'less', + 'lib', + 'locale', + 'open', + 'ops', + 'overload', + 're', + 'sigtrap', + 'strict', + 'subs', + 'unicode::distinct', + 'utf8', + 'vars', + 'warnings', + 'warnings::register', + ); + +print "1..".@Core_Modules."\n"; + +my $test_num = 1; +foreach my $module (@Core_Modules) { + print "not " unless compile_module($module); + print "ok $test_num\n"; + $test_num++; +} + + +# We do this as a seperate process else we'll blow the hell out of our +# namespace. +sub compile_module { + my($module) = @_; + + return scalar `./perl -Ilib t/lib/compmod.pl $module` =~ /^ok/; +} diff --git a/t/lib/compmod.pl b/t/lib/compmod.pl new file mode 100644 index 0000000..68a9665 --- /dev/null +++ b/t/lib/compmod.pl @@ -0,0 +1,18 @@ +#!./perl + +BEGIN { + chdir '..' if -d '../pod' && -d '../t'; + @INC = 'lib'; +} + +my $module = shift; + +# 'require open' confuses Perl, so we use instead. +eval "use $module ();"; +if( $@ ) { + print "not "; + warn "require failed with '$@'\n"; +} +print "ok - $module\n"; + +