Parcourir la source

Accept specific test file for recording

This is primarily for use in conjunction with
gempesaw/docker-selenium-remote-driver
Daniel Gempesaw il y a 9 ans
Parent
commit
05acd53e8d
1 fichiers modifiés avec 5 ajouts et 1 suppressions
  1. 5 1
      t/bin/record.pl

+ 5 - 1
t/bin/record.pl

@@ -15,7 +15,11 @@ my $built_lib = find_built_lib();
 my $export = $^O eq 'MSWin32' ? 'set' : 'export';
 my $wait = $^O eq 'MSWin32' ? 'START /WAIT' : '';
 my $prove_opts = '-I' . $built_lib .' -j9 -r --verbose --trap --merge --state=save,slow';
-print `$export WD_MOCKING_RECORD=1 && cd $repo_root && perl -Ilib t/01-driver.t`;
+my $default_prove = "prove $prove_opts t/";
+my $executable = $ARGV[0] ? "perl -I$built_lib $ARGV[0]" : $default_prove;
+my $command = "$export WD_MOCKING_RECORD=1 && cd $repo_root && $executable";
+print "Executing: $command\n";
+print `$command`;
 reset_env();
 
 sub find_built_lib {