github-runner: fix test execution on build

This commit is contained in:
Lucien Zimmermann 2024-11-23 14:51:06 +01:00 committed by Weijia Wang
parent 1c79f7f852
commit 2a226b64c7

View File

@ -1,11 +1,14 @@
--- a/src/Test/L0/TestUtil.cs
+++ b/src/Test/L0/TestUtil.cs
@@ -29,7 +29,7 @@
@@ -27,11 +27,8 @@
public static string GetSrcPath()
{
string L0dir = Path.GetDirectoryName(GetTestFilePath());
string testDir = Path.GetDirectoryName(L0dir);
- string L0dir = Path.GetDirectoryName(GetTestFilePath());
- string testDir = Path.GetDirectoryName(L0dir);
- string srcDir = Path.GetDirectoryName(testDir);
+ string srcDir = "/build/src" + Path.GetDirectoryName(testDir).Substring(2);
+ string srcDir = "../../../../..";
ArgUtil.Directory(srcDir, nameof(srcDir));
Assert.Equal(Src, Path.GetFileName(srcDir));
- Assert.Equal(Src, Path.GetFileName(srcDir));
return srcDir;
}