Skip to contentSkip to conversation

patchtestdata: convert paths to absolute paths

PATCH New Ed Bartosh 1 participant 1 message Dec 22, 2016

lore
Share & tools
lore

Ed Bartosh

author
#0 lore raw

PATCH 1/1 patchtestdata: convert paths to absolute paths

From: Ed Bartosh <[email protected]>

Some tests fail if relative paths are provided to patchtest. Converting --repo-dir and --start-dir arguments to abosolute paths should make paths absolute, which is what patchset code currently assumes.

---
 patchtestdata.py | 2 ++
 1 file changed, 2 insertions(+)
patchtestdata.py +2 -0
index 2254ccb..ec7fa1f 100644
@@ -68,6 +68,7 @@ class PatchTestArgs(object):
 
         parser.add_argument('--repo-dir', '-r',
                             dest='repodir',
+                            type=os.path.abspath,
                             default=os.getcwd(),
                             help="Name of the repository where patch is merged")
 
@@ -79,6 +80,7 @@ class PatchTestArgs(object):
         startdir = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'tests')
         parser.add_argument('--start-dir', '-s',
                             dest='startdir',
+                            type=os.path.abspath,
                             default=startdir,
                             help="Directory to start discover")
 
Signature · 1 line
2.1.4