Annotation of HOPE/Net-OpenAMD/t/local_server.t, Revision 1.1
1.1 ! andrew 1: #!perl
! 2: # $AFresh1$
! 3: use Test::More;# tests => 75;
! 4:
! 5: use strict;
! 6: use warnings;
! 7:
! 8: #use File::Temp qw/ tempdir /;
! 9: #use File::Copy qw/ cp /;
! 10: #use File::Spec;
! 11:
! 12: my $have_test_json = 1;
! 13:
! 14: BEGIN {
! 15: eval "use Test::Mojo::Server";
! 16: plan skip_all => "Test::Mojo::Server required for testing local server" if $@;
! 17: }
! 18:
! 19: my $server = Test::Mojo::Server->new();
! 20: $server->executable('test_server.pl');
! 21: #$server = $server->command('perl t/test_server.pl');
! 22:
! 23: my $path = $server->find_executable_ok('executable found');
! 24: #print "PATH: $path\n";
! 25: #my $port = $server->generate_port_ok('port test');
! 26:
! 27: my $port = $server->start_daemon_ok('daemon test');
! 28: print "Port: $port\n";
! 29:
! 30: $server->server_ok('server running');
! 31:
! 32: my $pid = $server->pid;
! 33: print "PID: $pid\n";
! 34:
! 35: kill( 'TERM', $server->pid );
! 36: $server->stop_server_ok('server stopped');
! 37:
! 38:
! 39:
! 40: done_testing();
! 41: exit;
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>