rprove 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #!/usr/bin/env perl
  2. package App::Prove::Remote::rprove;
  3. use strict;
  4. use warnings;
  5. use App::Prove::Remote::Connector ();
  6. use Getopt::Long ();
  7. exit run() unless caller();
  8. sub run {
  9. my ( $host, $verbosity, @tests ) = ('127.0.0.1', 0);
  10. Getopt::Long::Configure( 'bundling', 'auto_help', 'pass_through' );
  11. Getopt::Long::GetOptions(
  12. 'host|h=s' => \$host,
  13. 'verbosity|v=i' => \$verbosity,
  14. );
  15. my $conn = App::Prove::Remote::Connector->new($host, $verbosity);
  16. return 0;
  17. }
  18. 1;
  19. __END__
  20. =head1 NAME
  21. rprove - Prove wrapper which executes your tests on the remote host
  22. =head1 SYNOPSIS
  23. rprove [options] [file ...]
  24. Options:
  25. -help You are reading it!
  26. -host Host to connect to. Defaults to 127.0.0.1.
  27. -verbosity How verbose you want this (and the SSH connection) to be
  28. =head1 OPTIONS
  29. =over 8
  30. =item B<-help>
  31. Print a brief help message and exits.
  32. =item B<-host>
  33. Host to connect to. Defaults to 127.0.0.1
  34. =item B<-verbosity>
  35. How verbose you want this to be. Useful if you need to debug
  36. some strange SSH behavior.
  37. =back
  38. =head1 DESCRIPTION
  39. B<rprove> will locally run prove with a --exec argument which is a shim.
  40. This (remote_shim.pl) will connect to the remote host for the test in
  41. question, upload it to a temporary directory and run it on the host.
  42. Output of the script is then read by the TAP parser as is expected for
  43. a seamless testing experience *as if you had ran the test locally*.
  44. =cut