aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/app.d5
-rw-r--r--source/conda.d2
-rw-r--r--source/merge.d16
-rw-r--r--source/session.d14
4 files changed, 33 insertions, 4 deletions
diff --git a/source/app.d b/source/app.d
index 68c0f47..1fc3e32 100644
--- a/source/app.d
+++ b/source/app.d
@@ -80,6 +80,9 @@ int main(string[] args) {
return 1;
}
+ foreach (pair; session.runtime.byPair) {
+ conda.env[pair.key] = session.runtime[pair.key];
+ }
conda.initialize();
if (conda.env_exists(session.delivery)) {
@@ -107,7 +110,7 @@ int main(string[] args) {
if (session.run_tests) {
int failures = 0;
string testdir = buildPath(output_dir, "testdir");
- testable_t[] pkgs = testable_packages(conda, session.conda_requirements);
+ testable_t[] pkgs = testable_packages(conda, session.conda_requirements, session.test_filter_git_orgs);
foreach (pkg; pkgs) {
failures += integration_test(session, conda, testdir, pkg);
diff --git a/source/conda.d b/source/conda.d
index 2f4995a..9fee38f 100644
--- a/source/conda.d
+++ b/source/conda.d
@@ -20,7 +20,7 @@ class Conda {
public string install_prefix;
public string installer_version = "4.5.12";
public string installer_variant = "3";
- private string[string] env;
+ public string[string] env;
private string[string] env_orig;
private const string url_base = "https://repo.continuum.io";
private const string url_miniconda = join([this.url_base, "miniconda"], "/");
diff --git a/source/merge.d b/source/merge.d
index f11e593..72805d6 100644
--- a/source/merge.d
+++ b/source/merge.d
@@ -86,7 +86,7 @@ bool env_combine(ref Session_t session, ref Conda conda) {
}
-testable_t[] testable_packages(ref Conda conda, string[] inputs) {
+testable_t[] testable_packages(ref Conda conda, string[] inputs, string[] orgs=[]) {
testable_t[] results;
foreach (record; dmfile(inputs)) {
Node meta;
@@ -138,12 +138,24 @@ testable_t[] testable_packages(ref Conda conda, string[] inputs) {
repository = "";
}
+ bool[] skips;
+ foreach (git_org; orgs) {
+ if (!canFind(repository, git_org)) {
+ skips ~= true;
+ }
+ }
+
+ if (any(skips)) {
+ writefln("Will not test package: %s", repository);
+ continue;
+ }
results ~= testable_t(repository, head);
}
return results;
}
-auto integration_test(ref Session_t session,
+
+int integration_test(ref Session_t session,
ref Conda conda,
string outdir,
testable_t pkg) {
diff --git a/source/session.d b/source/session.d
index 21a0d2f..ef2a9e7 100644
--- a/source/session.d
+++ b/source/session.d
@@ -30,6 +30,8 @@ struct Session_t {
string test_args = "-v";
string[] test_conda_requirements;
string[] test_pip_requirements;
+ string[] test_filter_git_orgs;
+ string[] test_filter_git_projects;
}
@@ -130,5 +132,17 @@ Session_t getconf(string filename) {
foreach (Node v; data)
session.test_pip_requirements ~= v.as!string;
}
+
+ if (root.containsKey("test_filter_git_orgs")) {
+ data = root["test_filter_git_orgs"];
+ foreach (Node v; data)
+ session.test_filter_git_orgs ~= v.as!string;
+ }
+
+ if (root.containsKey("test_filter_git_projects")) {
+ data = root["test_filter_git_projects"];
+ foreach (Node v; data)
+ session.test_filter_git_projects ~= v.as!string;
+ }
return session;
}