Bug 1259174 - Fix absolute paths in TEST_HARNESS_FILES. r=mshal
authoraleth <aleth@instantbird.org>
Wed, 23 Mar 2016 22:44:12 +0100
changeset 290355 8b62c5b05ff1fee583c76e8c697e51e8f823aadc
parent 290354 9edb10202fd20089aa706ac293c4f5b3327a8871
child 290356 335fcad998a98b454f81e5798780915b666625f5
push id19656
push usergwagner@mozilla.com
push dateMon, 04 Apr 2016 13:43:23 +0000
treeherderb2g-inbound@e99061fde28a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1259174
milestone48.0a1
Bug 1259174 - Fix absolute paths in TEST_HARNESS_FILES. r=mshal
python/mozbuild/mozbuild/backend/recursivemake.py
--- a/python/mozbuild/mozbuild/backend/recursivemake.py
+++ b/python/mozbuild/mozbuild/backend/recursivemake.py
@@ -1241,17 +1241,21 @@ class RecursiveMakeBackend(CommonBackend
                 dest = mozpath.join(reltarget, path, f.target_basename)
                 if not isinstance(f, ObjDirPath):
                     if '*' in f:
                         if not isinstance(f, SourcePath):
                             raise Exception("Wildcards are only supported in "
                                             "SourcePath objects in %s. Path is: %s" % (
                                                 type(obj), f
                                             ))
-                        install_manifest.add_pattern_symlink(f.srcdir, f, path)
+                        if f.startswith('/'):
+                            basepath = f.full_path.rstrip('*')
+                            install_manifest.add_pattern_symlink(basepath, '*', path)
+                        else:
+                            install_manifest.add_pattern_symlink(f.srcdir, f, path)
                     else:
                         install_manifest.add_symlink(f.full_path, dest)
                 else:
                     install_manifest.add_optional_exists(dest)
                     backend_file.write('%s_FILES += %s\n' % (
                         target_var, self._pretty_path(f, backend_file)))
                     have_objdir_files = True
             if have_objdir_files: