summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAngelos Evripiotis <jevripiotis@bloomberg.net>2019-03-14 16:57:00 +0000
committerbst-marge-bot <marge-bot@buildstream.build>2019-03-15 11:09:31 +0000
commit0c6e1183851adcce649e842a0b13412b3abbc968 (patch)
treeb533b039ef898a3ea88eb9ec25059d5794be31ea
parentbbbe1f14e0c2644f62c628406c0a26fc9bb67554 (diff)
downloadbuildstream-0c6e1183851adcce649e842a0b13412b3abbc968.tar.gz
runcli.run(): coerce project and args to strings
It would be convenient if we could use datafiles directly, instead of fussing about with os.path.join(). The standard library supports path-like things, I see no reason why we shouldn't. In later work we can refactor our tests to take advantage of this.
-rw-r--r--buildstream/plugintestutils/runcli.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/buildstream/plugintestutils/runcli.py b/buildstream/plugintestutils/runcli.py
index 5dbecdd60..c08dd0ff3 100644
--- a/buildstream/plugintestutils/runcli.py
+++ b/buildstream/plugintestutils/runcli.py
@@ -310,6 +310,10 @@ class Cli():
if options is None:
options = []
+ # We may have been passed e.g. pathlib.Path or py.path
+ args = [str(x) for x in args]
+ project = str(project)
+
options = self.default_options + options
with ExitStack() as stack: