Closed Bug 1257659 Opened 5 years ago Closed 5 years ago

mach try path/to/tests fails on Windows with 'Specified path "path/to/tests" is not a directory under the srcdir'


(Firefox Build System :: General, defect)

Not set


(firefox48 fixed)

Tracking Status
firefox48 --- fixed


(Reporter: jaws, Assigned: chmanchester)




(2 files)

After bug 1255479, 
`mach try --no-push -p linux --rebuild 20 -v toolkit/mozapps/extensions/test/` is failing for me on Windows with the following error:

Specified path "c:\fx\toolkit\mozapps\extensions\test" is not a directory under the srcdir, unable to specify tests outside of the srcdir
Flags: needinfo?(ted)
I backed out the patches in bug 1255479 locally and I saw the same error. Maybe I'm getting this because I just did a fresh `hg pull -u` and need to do a full rebuild before I can use this command? I will update this bug when my local clobber build finishes.
I am still getting the same failure after a full rebuild.
Ok, doesn't look like this has to do with Ted's patch. I'll take a look.
Assignee: nobody → cmanchester
Flags: needinfo?(ted)
Felipe said that it is working for him on fx-team tip (32a2a01d3d2b) on OSX. This could be a Windows-related issue, it wouldn't be the first time paths get messed up on Windows vs OSX/Linux.
Yeah this is an issue with the direction of the slashes in the paths. 

With some more debugging info put in to,

> jared@jaws-win10 /c/fx
> $ mach try -p linux --rebuild 20 --verbose --no-push browser/base/content/test/general/
> mach try is under development, please file bugs blocking 1149670.
> Normalized "browser/base/content/test/general/" path to "c:\fx\browser\base\content\test\general"
> Specified path "c:\fx\browser\base\content\test\general" is not a directory under the srcdir, unable to > specify tests outside of the srcdir (srcdir="c:/fx")

** Note the forward slash on the srcdir but the normalized path having back slashes. **
Blocks: 1149670
No longer blocks: 1255479
Okay, I got it working locally with this attached (hacky) patch.

I don't know the right place to fix the topsrcdir, or why it's got the wrong path separators for me all of a sudden though.
Attachment #8731971 - Flags: feedback?(cmanchester)
Comment on attachment 8731971 [details] [diff] [review]
Hack to get it working for me

Review of attachment 8731971 [details] [diff] [review]:

We recently started posix-normalizing topsrcdir throughout the build system, this is almost certainly fallout from that. Patch coming up.
Attachment #8731971 - Flags: feedback?(cmanchester)
We recently started posix-normalizing path separators for "topsrcdir", so
we need to posix-normalize our inputs before making comparisons.

Review commit:
See other reviews:
Attachment #8732287 - Flags: review?(mshal)
Thanks, this patch fixes the issue for me.
Hit this too, and can confirm the patch fixes the issue.
Duplicate of this bug: 1258386
Attachment #8732287 - Flags: review?(mshal) → review+
Comment on attachment 8732287 [details]
MozReview Request: Bug 1257659 - Fix |mach try| on Windows by normalizing before comparing paths. r=mshal
Closed: 5 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.