forked from cuiliang/Performance
-
Notifications
You must be signed in to change notification settings - Fork 0
/
makefile.shade
43 lines (33 loc) · 1.51 KB
/
makefile.shade
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
var VERSION='0.1'
var FULL_VERSION='0.1'
var AUTHORS='Microsoft Open Technologies, Inc.'
use-standard-lifecycle
k-standard-goals
#stress-test .compile
@{
var projectFiles = Files.Include("stress-test/**/project.json").Exclude("**/bin/*/app/project.json").ToList();
projectFiles.ForEach(projectFile =>
{
var projectFolder = Path.GetDirectoryName(projectFile);
var projectName = Path.GetFileName(projectFolder);
var framework = "dnx451";
var configuration = "Debug";
var testArgs = " -parallel none";
var runnerFolder = Path.GetFullPath(Path.Combine(KoreBuildFolderPath, "build", "xunit.runner.console", "tools"));
var xunitCoreFolder = Path.GetFullPath(Path.Combine(KoreBuildFolderPath, "build", "xunit.core", "build", "_desktop"));
if (IsLinux)
{
// Work around issue with testing in parallel on Mono
// and issue https://github.com/xunit/xunit/issues/158
testArgs = " -parallel none -noappdomain";
}
var publishFolder = Path.Combine(projectFolder, "obj", "testPublish-" + framework);
DotnetPublish(projectFile, publishFolder, framework, configuration);
var runnerExe = "xunit.console.exe";
Copy(runnerFolder, publishFolder, "*.*", true);
Copy(xunitCoreFolder, publishFolder, "*.*", true);
var runnerFullPath = Path.GetFullPath(Path.Combine(publishFolder, runnerExe));
var targetTestDll = projectName + ".dll";
ExecClr(runnerFullPath, targetTestDll + " " + testArgs, publishFolder);
});
}