Skip to content

Commit 6b51323

Browse files
committedJan 20, 2016
tests: add --option k=v to overload PCSX2 option
Allow to easily switch rounding/clamping/Interpreter vs recompiler
1 parent 7b2dc69 commit 6b51323

File tree

1 file changed

+25
-11
lines changed

1 file changed

+25
-11
lines changed
 

‎tests/run_test.pl

+25-11
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,29 @@ sub help {
2222
The script run_test.pl is a test runner that work in conjunction with ps2autotests (https://github.com/unknownbrackets/ps2autotests)
2323
2424
Mandatory Option
25-
--exe <STRING> : the PCSX2 binary that you want to test
26-
--cfg <STRING> : a path to the a default ini configuration of PCSX2
27-
--suite <STRING> : a path to ps2autotests test (root directory)
25+
--exe <STRING> : the PCSX2 binary that you want to test
26+
--cfg <STRING> : a path to the a default ini configuration of PCSX2
27+
--suite <STRING> : a path to ps2autotests test (root directory)
2828
2929
Optional Option
30-
--cpu=1 : the number of parallel tests launched. Might create additional issue
31-
--timeout=20 : a global timeout for hang tests
32-
--show_diff : show debug information
30+
--cpu=1 : the number of parallel tests launched. Might create additional issue
31+
--timeout=20 : a global timeout for hang tests
32+
--show_diff : show debug information
3333
34-
--test=<REGEXP> : filter test based on their names
35-
--regression : blacklist test that are known to be broken
34+
--test=<REGEXP> : filter test based on their names
35+
--regression : blacklist test that are known to be broken
36+
--option <KEY>=<VAL> : overload PCSX2 configuration option
3637
37-
--debug_me : print script info
38-
--dry_run : don't launch PCSX2
38+
--debug_me : print script info
39+
--dry_run : don't launch PCSX2
40+
41+
PCSX2 option
42+
EnableEE=disabled : Use EE interpreter
43+
EnableIOP=disabled : Use IOP interpreter
44+
EnableVU0=disabled : Use VU0 interpreter
45+
EnableVU1=disabled : Use VU1 interpreter
46+
FPU.Roundmode=3 : EE FPU round mode
47+
VU.Roundmode=3 : VU round mode
3948
4049
EOS
4150
print $msg;
@@ -44,7 +53,7 @@ sub help {
4453
}
4554

4655
my $mt_timeout :shared;
47-
my ($o_suite, $o_help, $o_exe, $o_cfg, $o_max_cpu, $o_timeout, $o_show_diff, $o_debug_me, $o_test_name, $o_regression, $o_dry_run);
56+
my ($o_suite, $o_help, $o_exe, $o_cfg, $o_max_cpu, $o_timeout, $o_show_diff, $o_debug_me, $o_test_name, $o_regression, $o_dry_run, %o_pcsx2_opt);
4857

4958
# default value
5059
$o_max_cpu = 1;
@@ -68,6 +77,7 @@ sub help {
6877
'dry_run' => \$o_dry_run,
6978
'exe=s' => \$o_exe,
7079
'help' => \$o_help,
80+
'option=s' => \%o_pcsx2_opt,
7181
'regression' => \$o_regression,
7282
'testname=s' => \$o_test_name,
7383
'timeout=i' => \$o_timeout,
@@ -251,6 +261,10 @@ sub generate_cfg {
251261
# FIXME add interpreter vs recompiler
252262
# FIXME add clamping / rounding option
253263
# FIXME need separate cfg dir !
264+
foreach my $k (keys(%o_pcsx2_opt)) {
265+
my $v = $o_pcsx2_opt{$k};
266+
$sed{$k} = $v;
267+
}
254268

255269
tie my @ui, 'Tie::File', File::Spec->catfile($out_dir, "PCSX2_ui.ini") or die "Fail to tie PCSX2_ui.ini $!\n";
256270
tie my @vm, 'Tie::File', File::Spec->catfile($out_dir, "PCSX2_vm.ini") or die "Fail to tie PCSX2_vm.ini $!\n";

0 commit comments

Comments
 (0)
Please sign in to comment.