Bug 1467728 - Fix mozrunner build on macOS. r?whimboo draft
authorAndreas Tolfsen <ato@sny.no>
Fri, 08 Jun 2018 14:24:58 +0100
changeset 805795 40961721347a44510a8b0c8ab114c15c8e6d61ed
parent 805786 e0595117ff5bda3a63a72ad7b3b8754fec4fb4f0
push id112761
push userbmo:ato@sny.no
push dateFri, 08 Jun 2018 13:41:49 +0000
reviewerswhimboo
bugs1467728, 1464995
milestone62.0a1
Bug 1467728 - Fix mozrunner build on macOS. r?whimboo Bug 1464995 broke mozrunner on macOS, but we did not notice because geckodriver is not compiled on macOS. This fixes the build. MozReview-Commit-ID: GnvZTT30wHG
testing/mozbase/rust/mozrunner/src/runner.rs
--- a/testing/mozbase/rust/mozrunner/src/runner.rs
+++ b/testing/mozbase/rust/mozrunner/src/runner.rs
@@ -371,22 +371,22 @@ pub mod platform {
         for &(prefix_home, trial_path) in [
             (
                 false,
                 "/Applications/Firefox.app/Contents/MacOS/firefox-bin",
             ),
             (true, "Applications/Firefox.app/Contents/MacOS/firefox-bin"),
         ].iter()
         {
-            let path = match (home, prefix_home) {
+            let path = match (home.as_ref(), prefix_home) {
                 (Some(ref home_dir), true) => home_dir.join(trial_path),
                 (None, true) => continue,
-                (_, false) => trial_path.to_path_buf(),
+                (_, false) => PathBuf::from(trial_path),
             };
-            if is_binary(path) {
+            if is_binary(&path) {
                 return Some(path);
             }
         }
 
         None
     }
 
     pub fn arg_prefix_char(c: char) -> bool {