mirror of
https://github.com/servo/servo.git
synced 2025-08-07 06:25:32 +01:00
auto merge of #4053 : mttr/servo/reftests_with_relative_dir, r=SimonSapin
Fixes #3521
This commit is contained in:
commit
dfa9e1aa4a
1 changed files with 8 additions and 1 deletions
|
@ -165,7 +165,14 @@ fn parse_lists(file: &Path, servo_args: &[String], render_mode: RenderMode, id_o
|
||||||
"!=" => Different,
|
"!=" => Different,
|
||||||
part => panic!("reftest line: '{:s}' has invalid kind '{:s}'", line, part)
|
part => panic!("reftest line: '{:s}' has invalid kind '{:s}'", line, part)
|
||||||
};
|
};
|
||||||
let base = file.dir_path();
|
|
||||||
|
// If we're running this directly, file.dir_path() might be relative.
|
||||||
|
// (see issue #3521)
|
||||||
|
let base = match file.dir_path().is_relative() {
|
||||||
|
true => os::getcwd().join(file.dir_path()),
|
||||||
|
false => file.dir_path()
|
||||||
|
};
|
||||||
|
|
||||||
let file_left = base.join(test_line.file_left);
|
let file_left = base.join(test_line.file_left);
|
||||||
let file_right = base.join(test_line.file_right);
|
let file_right = base.join(test_line.file_right);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue