testing: sync reviewboard-fork into vct container (bug 1264203) r?gps draft
authorbyron jones <glob@mozilla.com>
Wed, 20 Apr 2016 13:46:48 +0800
changeset 8099 62e954c1419cb20df12a9901bc196dd876aeafa3
parent 8098 315a868f861c647991670c3e09e3e0d52514b93b
child 8100 177bb51dfc5f99539a7ec45e0c52aed578bdcb40
push id821
push userbjones@mozilla.com
push dateThu, 12 May 2016 05:13:51 +0000
reviewersgps
bugs1264203
testing: sync reviewboard-fork into vct container (bug 1264203) r?gps MozReview-Commit-ID: ACKNa6lyTGW
testing/vcttesting/docker.py
--- a/testing/vcttesting/docker.py
+++ b/testing/vcttesting/docker.py
@@ -210,23 +210,33 @@ class Docker(object):
     def _get_vct_files(self):
         """Obtain all the files in the version-control-tools repo.
 
         Returns a dict of relpath to full path.
         """
         hg = os.path.join(ROOT, 'venv', 'bin', 'hg')
         env = dict(os.environ)
         env['HGRCPATH'] = '/dev/null'
-        args = [hg, '-R', ROOT, 'locate']
+        args = [hg, '-R', '.', 'locate']
         with open(os.devnull, 'wb') as null:
-            output = subprocess.check_output(args, env=env, cwd='/',
-                                             stderr=null)
+            files = subprocess.check_output(
+                args, env=env, cwd=ROOT, stderr=null).splitlines()
+
+        # Add files from the nested reviewboard-fork repo.
+        fork_path = os.path.join(ROOT, 'reviewboard-fork')
+        if os.path.exists(fork_path):
+            with open(os.devnull, 'wb') as null:
+                fork_files = subprocess.check_output(
+                    args, env=env, stderr=null, cwd=fork_path
+                ).splitlines()
+                for f in fork_files:
+                    files.append(os.path.join('reviewboard-fork', f))
 
         paths = {}
-        for f in output.splitlines():
+        for f in files:
             full = os.path.join(ROOT, f)
             # Filter out files that have been removed in the working
             # copy but haven't been committed.
             if os.path.exists(full):
                 paths[f] = full
 
         return paths