提交 57ff0dd4 编写于 作者: A Ankit Jain

Revert to test projects created in bindir, instead of a temp one

This was necessary because on windows the tmp path is very long, causing
the test project paths to become too long causing build failures.
上级 0aa1b5a9
......@@ -27,7 +27,7 @@ public class BuildEnvironment
public static readonly string RelativeTestAssetsPath = @"..\testassets\";
public static readonly string TestAssetsPath = Path.Combine(AppContext.BaseDirectory, "testassets");
public static readonly string TestDataPath = Path.Combine(AppContext.BaseDirectory, "data");
public static readonly string TmpPath = Path.Combine(Path.GetTempPath(), "wasmbuildtests");
public static readonly string TmpPath = Path.Combine(AppContext.BaseDirectory, "wbt");
private static readonly Dictionary<string, string> s_runtimePackVersions = new();
......
......@@ -281,7 +281,7 @@ public BuildTestBase(ITestOutputHelper output, SharedBuildPerTestClassFixture bu
protected void InitPaths(string id)
{
if (_projectDir == null)
_projectDir = Path.Combine(AppContext.BaseDirectory, id);
_projectDir = Path.Combine(BuildEnvironment.TmpPath, id);
_logPath = Path.Combine(s_buildEnv.LogRootPath, id);
_nugetPackagesDir = Path.Combine(BuildEnvironment.TmpPath, "nuget", id);
......@@ -466,7 +466,7 @@ private static string GetNuGetConfigWithLocalPackagesPath(string templatePath, s
public string CreateWasmTemplateProject(string id, string template = "wasmbrowser", string extraArgs = "")
{
InitPaths(id);
InitProjectDir(id, addNuGetSourceForLocalPackages: true);
InitProjectDir(_projectDir, addNuGetSourceForLocalPackages: true);
File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.props"), "<Project />");
File.WriteAllText(Path.Combine(_projectDir, "Directory.Build.targets"),
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册