Unverified Commit 89e0db21 authored by boklm's avatar boklm
Browse files

Allow defining the mozmill file separatly from the test name

This will allow us to use the same mozmill file for multiple tests.
parent 4a862168
......@@ -439,9 +439,10 @@ sub mozmill_run {
my $screenshots_tmp = File::Temp::newdir('XXXXXX', DIR => $options->{tmpdir});
$ENV{'MOZMILL_SCREENSHOTS'} = winpath($screenshots_tmp);
my $results_file = "$tbbinfos->{'results-dir'}/$test->{name}.json";
my $mozmill_test = $test->{mozmill_test} // $test->{name};
system(xvfb_run($test), mozmill_cmd(), '-b', ffbin_path($tbbinfos, $test),
'-p', winpath($tbbinfos->{ffprofiledir}),
'-t', winpath("$FindBin::Bin/mozmill-tests/tbb-tests/$test->{name}.js"),
'-t', winpath("$FindBin::Bin/mozmill-tests/tbb-tests/$mozmill_test.js"),
'--report', 'file://' . winpath($results_file));
my $i = 0;
for my $screenshot_file (reverse sort glob "$screenshots_tmp/*.png") {
......
......@@ -53,7 +53,8 @@ To add a new test based on mozmill, you will add something like this in
The mozmill test files are stored in the directory
'mozmill/mozmill-tests/tbb-tests/'. The name of the file is the name
of the test with '.js' at the end.
of the test with '.js' at the end, unless mozmill_test is defined, in
which case it is used instead of the name.
Adding a selenium test
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment