Closed Bug 1257659 Opened 4 years ago Closed 4 years ago

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

Categories

(Firefox Build System :: General, defect)

defect
Not set

Tracking

(firefox48 fixed)

RESOLVED FIXED
mozilla48
Tracking Status
firefox48 --- fixed

People

(Reporter: jaws, Assigned: chmanchester)

References

Details

Attachments

(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 mach_commands.py,

> 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: https://reviewboard.mozilla.org/r/41069/diff/#index_header
See other reviews: https://reviewboard.mozilla.org/r/41069/
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

https://reviewboard.mozilla.org/r/41069/#review37883
https://hg.mozilla.org/mozilla-central/rev/4e844efafd5d
Status: NEW → RESOLVED
Closed: 4 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.