From 8f8960e1ca30a44b00688691cc9688b0d2a14cd9 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Mon, 3 Jun 2019 08:41:42 -0400 Subject: Minor improvements: * testdir can be changed * testdir is no longer incorporated into the delivery * pip calls will use an index if defined * multiarg now returns empty string if input is empty * remove clone repos if they already exist. guarantees pristine code/tests --- source/merge.d | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'source/merge.d') diff --git a/source/merge.d b/source/merge.d index 528582c..fa625c8 100644 --- a/source/merge.d +++ b/source/merge.d @@ -176,10 +176,12 @@ int integration_test(ref Session_t session, .replace(".git", ""); outdir.mkdirRecurse; - if (!repo_root.exists) { - if (conda.sh("git clone --recursive " ~ pkg.repo ~ " " ~ repo_root)) { - return 1; - } + if (repo_root.exists) { + repo_root.rmdirRecurse; + } + + if (conda.sh("git clone --recursive " ~ pkg.repo ~ " " ~ repo_root)) { + return 1; } repo_root.chdir; @@ -206,12 +208,14 @@ int integration_test(ref Session_t session, if (!session.test_pip_requirements.empty) { if (conda.sh("python -m pip install " + ~ conda.multiarg("-i", session.pip_index) ~ " " ~ safe_install(session.test_pip_requirements))) { return 1; } } - if (conda.sh("python -m pip install -e .[test]")) { + if (conda.sh("python -m pip install " + ~ conda.multiarg("-i", session.pip_index) ~ " -e .[test]")) { return 1; } -- cgit