| 1 | #!/usr/local/bin/perl | ||
| 2 | # PODNAME: tapper-automatic-test.pl | ||
| 3 | # ABSTRACT: cmdline frontend to Testcontrol.autoinstall | ||
| 4 | |||
| 5 | use strict; | ||
| 6 | use warnings; | ||
| 7 | |||
| 8 | use Sys::Hostname; | ||
| 9 | use Tapper::PRC::Testcontrol; | ||
| 10 | use Tapper::Installer::Base; | ||
| 11 | |||
| 12 | if (@ARGV and $ARGV[0] eq "stop") { | ||
| 13 | exit 0; | ||
| 14 | } | ||
| 15 | |||
| 16 | # bearable since it never really changes | ||
| 17 | my $logconf = 'log4perl.rootlogger = DEBUG, Screen | ||
| 18 | log4perl.appender.Screen = Log::Log4perl::Appender::Screen | ||
| 19 | log4perl.appender.Screen.layout = PatternLayout | ||
| 20 | # date package category - message in last 2 components of filename (linenumber) newline | ||
| 21 | log4perl.appender.Screen.layout.ConversionPattern = %d %p %c - %m in %F{2} (%L)%n'; | ||
| 22 | Log::Log4perl::init(\$logconf); | ||
| 23 | |||
| 24 | |||
| 25 | if (@ARGV and $ARGV[0] eq "autoinstall") { | ||
| 26 | my $client = Tapper::Installer::Base->new; | ||
| 27 | $client->system_install("autoinstall"); | ||
| 28 | } | ||
| 29 | |||
| 30 | my $prc = new Tapper::PRC::Testcontrol; | ||
| 31 | $prc->run(); | ||
| 32 | |||
| 33 | __END__ |