From 9fe1fdffa494d9f6043607bc185667ba429bb394 Mon Sep 17 00:00:00 2001 From: Pascal Berger Date: Fri, 29 Jul 2022 21:02:54 +0200 Subject: [PATCH] Fix repo root folder for integration tests --- .../script-runner/build.cake | 10 ++++++---- .../script-runner/build/analyze/markdownlint.cake | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/Cake.Issues.Reporting.Sarif/script-runner/build.cake b/tests/Cake.Issues.Reporting.Sarif/script-runner/build.cake index 3f5bdaf3c..9fef66ba4 100644 --- a/tests/Cake.Issues.Reporting.Sarif/script-runner/build.cake +++ b/tests/Cake.Issues.Reporting.Sarif/script-runner/build.cake @@ -17,6 +17,7 @@ var target = Argument("target", "Default"); public class BuildData { public DirectoryPath RepoRootFolder { get; } + public DirectoryPath TestRootFolder { get; } public DirectoryPath SourceFolder { get; } public DirectoryPath DocsFolder { get; } public DirectoryPath OutputFolder { get; } @@ -24,10 +25,11 @@ public class BuildData public BuildData(ICakeContext context) { - this.RepoRootFolder = context.MakeAbsolute(context.Directory("./")); - this.SourceFolder = this.RepoRootFolder.Combine("src"); - this.DocsFolder = this.RepoRootFolder.Combine("docs"); - this.OutputFolder = this.RepoRootFolder.Combine("output"); + this.TestRootFolder = context.MakeAbsolute(context.Directory("./")); + this.RepoRootFolder = this.TestRootFolder.Combine(".."); + this.SourceFolder = this.TestRootFolder.Combine("src"); + this.DocsFolder = this.TestRootFolder.Combine("docs"); + this.OutputFolder = this.TestRootFolder.Combine("output"); this.Issues = new List(); } diff --git a/tests/Cake.Issues.Reporting.Sarif/script-runner/build/analyze/markdownlint.cake b/tests/Cake.Issues.Reporting.Sarif/script-runner/build/analyze/markdownlint.cake index f2afbd89e..8e8dfe152 100644 --- a/tests/Cake.Issues.Reporting.Sarif/script-runner/build/analyze/markdownlint.cake +++ b/tests/Cake.Issues.Reporting.Sarif/script-runner/build/analyze/markdownlint.cake @@ -43,7 +43,7 @@ Task("Lint-AddinDocumentation") // Run markdownlint var settings = - MarkdownlintNodeJsRunnerSettings.ForDirectory(data.RepoRootFolder.Combine("../../../docs")); + MarkdownlintNodeJsRunnerSettings.ForDirectory(data.RepoRootFolder.Combine("docs")); settings.OutputFile = markdownLintLogFilePath; settings.ThrowOnIssue = false; RunMarkdownlintNodeJs(settings);