zarro 1.165.8 → 1.165.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(function () {
|
|
3
|
-
const gulp = requireModule("gulp"), path = require("path"), findTool = requireModule("
|
|
3
|
+
const gulp = requireModule("gulp"), path = require("path"), findTool = requireModule("test-util-finder").findTool, system = requireModule("system"), quoteIfRequired = requireModule("quote-if-required"), { rm, mkdir, exists } = require("yafs"), env = requireModule("env");
|
|
4
4
|
env.associate(["COVERAGE_XML", "COVERAGE_REPORTING_EXCLUDE"], "cover-dotnet");
|
|
5
5
|
gulp.task("default-report-generator", `Generates HTML reports from existing coverage XML reports`, async () => {
|
|
6
6
|
const reportGenerator = findTool("ReportGenerator.exe");
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
(function () {
|
|
4
|
-
const gutil = requireModule("gulp-util"), env = requireModule("env"), es = require("event-stream"), path = require("path"), testUtilFinder = requireModule("
|
|
4
|
+
const gutil = requireModule("gulp-util"), env = requireModule("env"), es = require("event-stream"), path = require("path"), testUtilFinder = requireModule("test-util-finder"), getToolsFolder = requireModule("get-tools-folder"), system = requireModule("system"), coverageTarget = process.env.COVERAGE_TARGET || "Debug", debug = requireModule("debug")(__filename), log = requireModule("log"), { mkdirSync, fileExistsSync } = require("yafs");
|
|
5
5
|
const PLUGIN_NAME = "gulp-dotnetcover";
|
|
6
6
|
function projectPathFor(p) {
|
|
7
7
|
return path.resolve(p);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
(function () {
|
|
4
|
-
const QUACKERS_LOG_PREFIX = ":quackers_log:", QUACKERS_SUMMARY_START_MARKER = `::start_summary::`, QUACKERS_SUMMARY_COMPLETE_MARKER = `::summary_complete::`, QUACKERS_FAILURE_START_MARKER = `::start_failures::`, QUACKERS_FAILURE_INDEX_PLACEHOLDER = "::[#]::", QUACKERS_SLOW_INDEX_PLACEHOLDER = "::[-]::", QUACKERS_SLOW_SUMMARY_START_MARKER = "::slow_summary_start::", QUACKERS_SLOW_SUMMARY_COMPLETE_MARKER = "::slow_summary_complete::", QUACKERS_SHOW_SUMMARY = "true", QUACKERS_SUMMARY_TOTALS_START_MARKER = "::totals_summary_start::", QUACKERS_SUMMARY_TOTALS_COMPLETE_MARKER = "::totals_summary_complete::", QUACKERS_OUTPUT_FAILURES_INLINE = "true", quackersLogPrefixLength = QUACKERS_LOG_PREFIX.length, quackersFullSummaryStartMarker = `${QUACKERS_LOG_PREFIX}${QUACKERS_SUMMARY_START_MARKER}`, quackersFullSummaryCompleteMarker = `${QUACKERS_LOG_PREFIX}${QUACKERS_SUMMARY_COMPLETE_MARKER}`, { rm, ls, FsEntities, readTextFile, mkdir } = require("yafs"), gulp = requireModule("gulp"), log = requireModule("log"), path = require("path"), gulpDebug = require("gulp-debug"), debug = requireModule("debug")(__filename), filter = require("gulp-filter"), ansiColors = requireModule("ansi-colors"), promisifyStream = requireModule("promisify-stream"), nunitRunner = requireModule("gulp-nunit-runner"), testUtilFinder = requireModule("
|
|
4
|
+
const QUACKERS_LOG_PREFIX = ":quackers_log:", QUACKERS_SUMMARY_START_MARKER = `::start_summary::`, QUACKERS_SUMMARY_COMPLETE_MARKER = `::summary_complete::`, QUACKERS_FAILURE_START_MARKER = `::start_failures::`, QUACKERS_FAILURE_INDEX_PLACEHOLDER = "::[#]::", QUACKERS_SLOW_INDEX_PLACEHOLDER = "::[-]::", QUACKERS_SLOW_SUMMARY_START_MARKER = "::slow_summary_start::", QUACKERS_SLOW_SUMMARY_COMPLETE_MARKER = "::slow_summary_complete::", QUACKERS_SHOW_SUMMARY = "true", QUACKERS_SUMMARY_TOTALS_START_MARKER = "::totals_summary_start::", QUACKERS_SUMMARY_TOTALS_COMPLETE_MARKER = "::totals_summary_complete::", QUACKERS_OUTPUT_FAILURES_INLINE = "true", quackersLogPrefixLength = QUACKERS_LOG_PREFIX.length, quackersFullSummaryStartMarker = `${QUACKERS_LOG_PREFIX}${QUACKERS_SUMMARY_START_MARKER}`, quackersFullSummaryCompleteMarker = `${QUACKERS_LOG_PREFIX}${QUACKERS_SUMMARY_COMPLETE_MARKER}`, { rm, ls, FsEntities, readTextFile, mkdir } = require("yafs"), gulp = requireModule("gulp"), log = requireModule("log"), path = require("path"), gulpDebug = require("gulp-debug"), debug = requireModule("debug")(__filename), filter = require("gulp-filter"), ansiColors = requireModule("ansi-colors"), promisifyStream = requireModule("promisify-stream"), nunitRunner = requireModule("gulp-nunit-runner"), testUtilFinder = requireModule("test-util-finder"), env = requireModule("env"), resolveTestMasks = requireModule("resolve-test-masks"), logConfig = requireModule("log-config"), gatherPaths = requireModule("gather-paths"), { test } = requireModule("dotnet-cli"), { resolveTestPrefixFor } = requireModule("test-utils"), buildReportFolder = path.dirname(env.resolve("BUILD_REPORT_XML")), Version = requireModule("version"), quote = requireModule("quote-if-required"), netFrameworkTestAssemblyFilter = requireModule("netfx-test-assembly-filter"), { baseName, chopExtension } = requireModule("path-utils");
|
|
5
5
|
async function runTests() {
|
|
6
6
|
await mkdir(buildReportFolder);
|
|
7
7
|
const dotNetCore = env.resolveFlag("DOTNET_CORE");
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
(function () {
|
|
3
|
+
"use strict";
|
|
4
|
+
const Version = requireModule("version"), log = requireModule("log"), fs = require("fs"), path = require("path"), debug = requireModule("debug")(__filename), { lsSync, FsEntities } = require("yafs"), programFilesFolder = process.env["ProgramFiles(x86)"]
|
|
5
|
+
|| process.env["ProgramFiles"], getToolsFolder = requireModule("get-tools-folder"), ZarroError = requireModule("zarro-error"), which = requireModule("which"), localAppDataFolder = process.env["LOCALAPPDATA"];
|
|
6
|
+
function isUnstable(folderName) {
|
|
7
|
+
return folderName.indexOf("alpha") > -1 ||
|
|
8
|
+
folderName.indexOf("beta") > -1;
|
|
9
|
+
}
|
|
10
|
+
function finder(searchBaseFolders, searchBaseSubFolder, searchFolderPrefix, searchBin, options) {
|
|
11
|
+
const ignoreBetas = options.ignoreBetas === undefined ? true : options.ignoreBetas, lprefix = searchFolderPrefix.toLowerCase();
|
|
12
|
+
if (!Array.isArray(searchBaseFolders)) {
|
|
13
|
+
searchBaseFolders = [searchBaseFolders];
|
|
14
|
+
}
|
|
15
|
+
const runner = searchBaseFolders
|
|
16
|
+
.filter(f => !!f)
|
|
17
|
+
.map(f => {
|
|
18
|
+
return searchBaseSubFolder
|
|
19
|
+
? path.join(f, searchBaseSubFolder)
|
|
20
|
+
: f;
|
|
21
|
+
})
|
|
22
|
+
.filter(checkExists)
|
|
23
|
+
.reduce((possibles, baseFolder) => {
|
|
24
|
+
debug("Searching: " + baseFolder);
|
|
25
|
+
return fs.readdirSync(baseFolder)
|
|
26
|
+
.reduce((acc, cur) => {
|
|
27
|
+
const folder = path.join(baseFolder, cur);
|
|
28
|
+
const lcur = cur.toLowerCase();
|
|
29
|
+
if (lcur.indexOf(lprefix) === 0) {
|
|
30
|
+
if (ignoreBetas && isUnstable(lcur)) {
|
|
31
|
+
log.notice("Ignoring unstable tool at: " + folder);
|
|
32
|
+
return acc;
|
|
33
|
+
}
|
|
34
|
+
const match = cur.match(/\d+/g);
|
|
35
|
+
if (!match) {
|
|
36
|
+
return acc;
|
|
37
|
+
}
|
|
38
|
+
const version = match.map(Number);
|
|
39
|
+
debug(`Adding possible: ${folder} = version ${version}`);
|
|
40
|
+
acc.push({
|
|
41
|
+
folder: folder,
|
|
42
|
+
version: version
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return acc;
|
|
46
|
+
}, possibles);
|
|
47
|
+
}, [])
|
|
48
|
+
.sort((x, y) => compareVersionArrays(x.version, y.version))
|
|
49
|
+
.map((possible) => path.join(possible.folder, searchBin))
|
|
50
|
+
.find(checkExists);
|
|
51
|
+
if (runner) {
|
|
52
|
+
log.debug("Using " + runner);
|
|
53
|
+
}
|
|
54
|
+
return runner;
|
|
55
|
+
}
|
|
56
|
+
function compareVersionArrays(x, y) {
|
|
57
|
+
const left = new Version(x), right = new Version(y);
|
|
58
|
+
const result = left.compareWith(right);
|
|
59
|
+
// Version::compareWith should compare in natural order (ascending)
|
|
60
|
+
// and we want descending so we can pick the first one as the top
|
|
61
|
+
// - but, on the other hand, -0 is a thing :/
|
|
62
|
+
return result === 0
|
|
63
|
+
? 0
|
|
64
|
+
: -result;
|
|
65
|
+
}
|
|
66
|
+
function findWrapper(func, name) {
|
|
67
|
+
const found = func();
|
|
68
|
+
if (!found) {
|
|
69
|
+
debug(`Can't find any installed ${name}`);
|
|
70
|
+
}
|
|
71
|
+
return found;
|
|
72
|
+
}
|
|
73
|
+
function findInstalledNUnit3() {
|
|
74
|
+
if (!programFilesFolder) {
|
|
75
|
+
return null;
|
|
76
|
+
}
|
|
77
|
+
const search = path.join(programFilesFolder, "NUnit.org", "nunit-console", "nunit3-console.exe");
|
|
78
|
+
if (!search) {
|
|
79
|
+
return null;
|
|
80
|
+
}
|
|
81
|
+
return fs.existsSync(search) ? search : null;
|
|
82
|
+
}
|
|
83
|
+
function checkExists(somePath) {
|
|
84
|
+
debug(`Checking if file exists: ${somePath}`);
|
|
85
|
+
return fs.existsSync(somePath) ? somePath : undefined;
|
|
86
|
+
}
|
|
87
|
+
function tryToFindNUnit(options) {
|
|
88
|
+
return initialToolSearch("nunit3-console.exe", "NUNIT") || searchForSystemNUnit(options);
|
|
89
|
+
}
|
|
90
|
+
function latestNUnit(options) {
|
|
91
|
+
const result = tryToFindNUnit(options);
|
|
92
|
+
debug(`Using nunit runner: ${result || "NOT FOUND"}`);
|
|
93
|
+
return result;
|
|
94
|
+
}
|
|
95
|
+
function nunit2Finder(searchBin, options) {
|
|
96
|
+
if (!programFilesFolder) {
|
|
97
|
+
return undefined;
|
|
98
|
+
}
|
|
99
|
+
return finder([programFilesFolder], undefined, "NUnit", searchBin, options);
|
|
100
|
+
}
|
|
101
|
+
function searchForSystemNUnit(options) {
|
|
102
|
+
options = options || {};
|
|
103
|
+
const isX86 = (options.x86 || ((options.platform || options.architecture) === "x86"));
|
|
104
|
+
const runner = isX86 ? "/bin/nunit-console-x86.exe" : "/bin/nunit-console.exe";
|
|
105
|
+
return findWrapper(function () {
|
|
106
|
+
return findInstalledNUnit3() || nunit2Finder(runner, options);
|
|
107
|
+
}, "nunit-console runner");
|
|
108
|
+
}
|
|
109
|
+
// FIXME: should ignore, eg, foo.csproj, to find foo.exe|bat|com on windows
|
|
110
|
+
// FIXME: when not on windows, should always do exact match
|
|
111
|
+
function findTool(exeName, underFolder) {
|
|
112
|
+
const { chopExtension } = requireModule("path-utils"), withoutExtension = chopExtension(exeName), exeHasExtension = exeName !== withoutExtension;
|
|
113
|
+
const allResults = lsSync(underFolder || getToolsFolder(), {
|
|
114
|
+
recurse: true,
|
|
115
|
+
entities: FsEntities.files,
|
|
116
|
+
fullPaths: true
|
|
117
|
+
})
|
|
118
|
+
.filter((p) => {
|
|
119
|
+
const thisFileExtension = path.extname(p), parts = p.split(/[\\\/]/g), filename = parts[parts.length - 1];
|
|
120
|
+
if (thisFileExtension) {
|
|
121
|
+
if (exeHasExtension) {
|
|
122
|
+
return filename.toLowerCase() === exeName.toLowerCase();
|
|
123
|
+
}
|
|
124
|
+
else {
|
|
125
|
+
const chopped = chopExtension(filename);
|
|
126
|
+
return chopped.toLowerCase() === withoutExtension.toLowerCase();
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
else {
|
|
130
|
+
return filename.toLowerCase() === withoutExtension.toLowerCase();
|
|
131
|
+
}
|
|
132
|
+
})
|
|
133
|
+
.sort();
|
|
134
|
+
return allResults[0] || which(exeName);
|
|
135
|
+
}
|
|
136
|
+
function locateDotCover(options) {
|
|
137
|
+
options = options || {};
|
|
138
|
+
return initialToolSearch("dotCover.exe", "DOTCOVER") ||
|
|
139
|
+
findWrapper(function () {
|
|
140
|
+
return finder([programFilesFolder, localAppDataFolder], "JetBrains/Installations", "dotCover", "dotCover.exe", options)
|
|
141
|
+
|| finder([programFilesFolder], "JetBrains/dotCover", "v", "Bin/dotCover.exe", options);
|
|
142
|
+
}, "dotCover");
|
|
143
|
+
}
|
|
144
|
+
function latestDotCover(options) {
|
|
145
|
+
const result = locateDotCover(options);
|
|
146
|
+
debug(`Using dotCover: ${result || "NOT FOUND"}`);
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
function initialToolSearch(toolExe, environmentVariable) {
|
|
150
|
+
const fromEnvironment = process.env[environmentVariable];
|
|
151
|
+
if (fromEnvironment) {
|
|
152
|
+
if (!fs.existsSync(fromEnvironment)) {
|
|
153
|
+
throw new ZarroError(`${fromEnvironment} specified in environment variable ${environmentVariable} not found`);
|
|
154
|
+
}
|
|
155
|
+
return fromEnvironment;
|
|
156
|
+
}
|
|
157
|
+
return findTool(toolExe);
|
|
158
|
+
}
|
|
159
|
+
function latestOpenCover() {
|
|
160
|
+
const result = initialToolSearch("OpenCover.Console.exe", "OPENCOVER");
|
|
161
|
+
debug(`Using opencover: ${result || "NOT FOUND"}`);
|
|
162
|
+
return result;
|
|
163
|
+
}
|
|
164
|
+
module.exports = {
|
|
165
|
+
latestNUnit: latestNUnit,
|
|
166
|
+
latestDotCover: latestDotCover,
|
|
167
|
+
latestOpenCover: latestOpenCover,
|
|
168
|
+
findTool: findTool,
|
|
169
|
+
nunit2Finder: nunit2Finder,
|
|
170
|
+
compareVersionArrays: compareVersionArrays
|
|
171
|
+
};
|
|
172
|
+
})();
|
|
@@ -1,172 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
(function () {
|
|
3
|
-
"
|
|
4
|
-
|
|
5
|
-
|| process.env["ProgramFiles"], getToolsFolder = requireModule("get-tools-folder"), ZarroError = requireModule("zarro-error"), which = requireModule("which"), localAppDataFolder = process.env["LOCALAPPDATA"];
|
|
6
|
-
function isUnstable(folderName) {
|
|
7
|
-
return folderName.indexOf("alpha") > -1 ||
|
|
8
|
-
folderName.indexOf("beta") > -1;
|
|
9
|
-
}
|
|
10
|
-
function finder(searchBaseFolders, searchBaseSubFolder, searchFolderPrefix, searchBin, options) {
|
|
11
|
-
const ignoreBetas = options.ignoreBetas === undefined ? true : options.ignoreBetas, lprefix = searchFolderPrefix.toLowerCase();
|
|
12
|
-
if (!Array.isArray(searchBaseFolders)) {
|
|
13
|
-
searchBaseFolders = [searchBaseFolders];
|
|
14
|
-
}
|
|
15
|
-
const runner = searchBaseFolders
|
|
16
|
-
.filter(f => !!f)
|
|
17
|
-
.map(f => {
|
|
18
|
-
return searchBaseSubFolder
|
|
19
|
-
? path.join(f, searchBaseSubFolder)
|
|
20
|
-
: f;
|
|
21
|
-
})
|
|
22
|
-
.filter(checkExists)
|
|
23
|
-
.reduce((possibles, baseFolder) => {
|
|
24
|
-
debug("Searching: " + baseFolder);
|
|
25
|
-
return fs.readdirSync(baseFolder)
|
|
26
|
-
.reduce((acc, cur) => {
|
|
27
|
-
const folder = path.join(baseFolder, cur);
|
|
28
|
-
const lcur = cur.toLowerCase();
|
|
29
|
-
if (lcur.indexOf(lprefix) === 0) {
|
|
30
|
-
if (ignoreBetas && isUnstable(lcur)) {
|
|
31
|
-
log.notice("Ignoring unstable tool at: " + folder);
|
|
32
|
-
return acc;
|
|
33
|
-
}
|
|
34
|
-
const match = cur.match(/\d+/g);
|
|
35
|
-
if (!match) {
|
|
36
|
-
return acc;
|
|
37
|
-
}
|
|
38
|
-
const version = match.map(Number);
|
|
39
|
-
debug(`Adding possible: ${folder} = version ${version}`);
|
|
40
|
-
acc.push({
|
|
41
|
-
folder: folder,
|
|
42
|
-
version: version
|
|
43
|
-
});
|
|
44
|
-
}
|
|
45
|
-
return acc;
|
|
46
|
-
}, possibles);
|
|
47
|
-
}, [])
|
|
48
|
-
.sort((x, y) => compareVersionArrays(x.version, y.version))
|
|
49
|
-
.map((possible) => path.join(possible.folder, searchBin))
|
|
50
|
-
.find(checkExists);
|
|
51
|
-
if (runner) {
|
|
52
|
-
log.debug("Using " + runner);
|
|
53
|
-
}
|
|
54
|
-
return runner;
|
|
55
|
-
}
|
|
56
|
-
function compareVersionArrays(x, y) {
|
|
57
|
-
const left = new Version(x), right = new Version(y);
|
|
58
|
-
const result = left.compareWith(right);
|
|
59
|
-
// Version::compareWith should compare in natural order (ascending)
|
|
60
|
-
// and we want descending so we can pick the first one as the top
|
|
61
|
-
// - but, on the other hand, -0 is a thing :/
|
|
62
|
-
return result === 0
|
|
63
|
-
? 0
|
|
64
|
-
: -result;
|
|
65
|
-
}
|
|
66
|
-
function findWrapper(func, name) {
|
|
67
|
-
const found = func();
|
|
68
|
-
if (!found) {
|
|
69
|
-
debug(`Can't find any installed ${name}`);
|
|
70
|
-
}
|
|
71
|
-
return found;
|
|
72
|
-
}
|
|
73
|
-
function findInstalledNUnit3() {
|
|
74
|
-
if (!programFilesFolder) {
|
|
75
|
-
return null;
|
|
76
|
-
}
|
|
77
|
-
const search = path.join(programFilesFolder, "NUnit.org", "nunit-console", "nunit3-console.exe");
|
|
78
|
-
if (!search) {
|
|
79
|
-
return null;
|
|
80
|
-
}
|
|
81
|
-
return fs.existsSync(search) ? search : null;
|
|
82
|
-
}
|
|
83
|
-
function checkExists(somePath) {
|
|
84
|
-
debug(`Checking if file exists: ${somePath}`);
|
|
85
|
-
return fs.existsSync(somePath) ? somePath : undefined;
|
|
86
|
-
}
|
|
87
|
-
function tryToFindNUnit(options) {
|
|
88
|
-
return initialToolSearch("nunit3-console.exe", "NUNIT") || searchForSystemNUnit(options);
|
|
89
|
-
}
|
|
90
|
-
function latestNUnit(options) {
|
|
91
|
-
const result = tryToFindNUnit(options);
|
|
92
|
-
debug(`Using nunit runner: ${result || "NOT FOUND"}`);
|
|
93
|
-
return result;
|
|
94
|
-
}
|
|
95
|
-
function nunit2Finder(searchBin, options) {
|
|
96
|
-
if (!programFilesFolder) {
|
|
97
|
-
return undefined;
|
|
98
|
-
}
|
|
99
|
-
return finder([programFilesFolder], undefined, "NUnit", searchBin, options);
|
|
100
|
-
}
|
|
101
|
-
function searchForSystemNUnit(options) {
|
|
102
|
-
options = options || {};
|
|
103
|
-
const isX86 = (options.x86 || ((options.platform || options.architecture) === "x86"));
|
|
104
|
-
const runner = isX86 ? "/bin/nunit-console-x86.exe" : "/bin/nunit-console.exe";
|
|
105
|
-
return findWrapper(function () {
|
|
106
|
-
return findInstalledNUnit3() || nunit2Finder(runner, options);
|
|
107
|
-
}, "nunit-console runner");
|
|
108
|
-
}
|
|
109
|
-
// FIXME: should ignore, eg, foo.csproj, to find foo.exe|bat|com on windows
|
|
110
|
-
// FIXME: when not on windows, should always do exact match
|
|
111
|
-
function findTool(exeName, underFolder) {
|
|
112
|
-
const { chopExtension } = requireModule("path-utils"), withoutExtension = chopExtension(exeName), exeHasExtension = exeName !== withoutExtension;
|
|
113
|
-
const allResults = lsSync(underFolder || getToolsFolder(), {
|
|
114
|
-
recurse: true,
|
|
115
|
-
entities: FsEntities.files,
|
|
116
|
-
fullPaths: true
|
|
117
|
-
})
|
|
118
|
-
.filter((p) => {
|
|
119
|
-
const thisFileExtension = path.extname(p), parts = p.split(/[\\\/]/g), filename = parts[parts.length - 1];
|
|
120
|
-
if (thisFileExtension) {
|
|
121
|
-
if (exeHasExtension) {
|
|
122
|
-
return filename.toLowerCase() === exeName.toLowerCase();
|
|
123
|
-
}
|
|
124
|
-
else {
|
|
125
|
-
const chopped = chopExtension(filename);
|
|
126
|
-
return chopped.toLowerCase() === withoutExtension.toLowerCase();
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
else {
|
|
130
|
-
return filename.toLowerCase() === withoutExtension.toLowerCase();
|
|
131
|
-
}
|
|
132
|
-
})
|
|
133
|
-
.sort();
|
|
134
|
-
return allResults[0] || which(exeName);
|
|
135
|
-
}
|
|
136
|
-
function locateDotCover(options) {
|
|
137
|
-
options = options || {};
|
|
138
|
-
return initialToolSearch("dotCover.exe", "DOTCOVER") ||
|
|
139
|
-
findWrapper(function () {
|
|
140
|
-
return finder([programFilesFolder, localAppDataFolder], "JetBrains/Installations", "dotCover", "dotCover.exe", options)
|
|
141
|
-
|| finder([programFilesFolder], "JetBrains/dotCover", "v", "Bin/dotCover.exe", options);
|
|
142
|
-
}, "dotCover");
|
|
143
|
-
}
|
|
144
|
-
function latestDotCover(options) {
|
|
145
|
-
const result = locateDotCover(options);
|
|
146
|
-
debug(`Using dotCover: ${result || "NOT FOUND"}`);
|
|
147
|
-
return result;
|
|
148
|
-
}
|
|
149
|
-
function initialToolSearch(toolExe, environmentVariable) {
|
|
150
|
-
const fromEnvironment = process.env[environmentVariable];
|
|
151
|
-
if (fromEnvironment) {
|
|
152
|
-
if (!fs.existsSync(fromEnvironment)) {
|
|
153
|
-
throw new ZarroError(`${fromEnvironment} specified in environment variable ${environmentVariable} not found`);
|
|
154
|
-
}
|
|
155
|
-
return fromEnvironment;
|
|
156
|
-
}
|
|
157
|
-
return findTool(toolExe);
|
|
158
|
-
}
|
|
159
|
-
function latestOpenCover() {
|
|
160
|
-
const result = initialToolSearch("OpenCover.Console.exe", "OPENCOVER");
|
|
161
|
-
debug(`Using opencover: ${result || "NOT FOUND"}`);
|
|
162
|
-
return result;
|
|
163
|
-
}
|
|
164
|
-
module.exports = {
|
|
165
|
-
latestNUnit: latestNUnit,
|
|
166
|
-
latestDotCover: latestDotCover,
|
|
167
|
-
latestOpenCover: latestOpenCover,
|
|
168
|
-
findTool: findTool,
|
|
169
|
-
nunit2Finder: nunit2Finder,
|
|
170
|
-
compareVersionArrays: compareVersionArrays
|
|
171
|
-
};
|
|
3
|
+
console.warn("testutil-finder has been renamed to test-util-finder");
|
|
4
|
+
return require("./test-util-finder");
|
|
172
5
|
})();
|