mirror of https://github.com/PCSX2/pcsx2.git
tests: take 431414...
restore cwd after the find just put the front letter in cyg_abs_path (as previous working bash script)
This commit is contained in:
parent
8b1c465bf6
commit
3f5ac02697
|
@ -5,6 +5,7 @@ use warnings;
|
||||||
use threads;
|
use threads;
|
||||||
use threads::shared;
|
use threads::shared;
|
||||||
|
|
||||||
|
use Cwd;
|
||||||
use Getopt::Long;
|
use Getopt::Long;
|
||||||
use File::Basename;
|
use File::Basename;
|
||||||
use File::Find;
|
use File::Find;
|
||||||
|
@ -155,11 +156,15 @@ if (defined $o_regression) {
|
||||||
#####################################################
|
#####################################################
|
||||||
|
|
||||||
# Round 1: Collect the tests
|
# Round 1: Collect the tests
|
||||||
|
my $cwd = getcwd();
|
||||||
|
|
||||||
my $g_test_db;
|
my $g_test_db;
|
||||||
print "INFO: search tests in $o_suite and run them in $o_max_cpu CPU)\n";
|
print "INFO: search tests in $o_suite and run them in $o_max_cpu CPU)\n";
|
||||||
find({ wanted => \&add_test_cmd_for_elf, no_chdir => 1 }, $o_suite);
|
find({ wanted => \&add_test_cmd_for_elf, no_chdir => 1 }, $o_suite);
|
||||||
print "\n";
|
print "\n";
|
||||||
|
|
||||||
|
chdir($cwd); # Just to be sure
|
||||||
|
|
||||||
# Round 2: Run the tests (later in thread)
|
# Round 2: Run the tests (later in thread)
|
||||||
foreach my $test (keys(%$g_test_db)) {
|
foreach my $test (keys(%$g_test_db)) {
|
||||||
# wait free CPU slot
|
# wait free CPU slot
|
||||||
|
@ -215,9 +220,7 @@ sub cyg_abs_path {
|
||||||
my $p = shift;
|
my $p = shift;
|
||||||
my $ap = abs_path($o_suite);
|
my $ap = abs_path($o_suite);
|
||||||
if ($o_cygwin) {
|
if ($o_cygwin) {
|
||||||
$ap = `cygpath -w $ap`;
|
$ap =~ s/\/cygdrive\/(\w)/$1:/;
|
||||||
chomp($ap);
|
|
||||||
$ap =~ s/\\/\\\\/g;
|
|
||||||
}
|
}
|
||||||
return $ap;
|
return $ap;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue