From 96f9e80fa3e523d9a7355ba3598e16252ca42bc5 Mon Sep 17 00:00:00 2001 From: Michael Pysson Date: Fri, 16 Aug 2024 21:17:17 +0000 Subject: [PATCH] Merged PR 799125: Use QTest from bxl binary location instead of package location Use QTest from bxl binary location instead of package location --- .../InternalSdk/Sdk.QTest/module.config.dsc | 6 +++++ Private/InternalSdk/Sdk.QTest/sdk.qtest.dsc | 22 +++++++++++++++++ .../InternalSdk/Sdk.QTest/tools/DBS.QTest.exe | 1 + .../Public/Tools/QTest/Tool.QTestRunner.dsc | 5 +++- .../BuildXL/Testing/QTest/qtestFramework.dsc | 24 +------------------ 5 files changed, 34 insertions(+), 24 deletions(-) create mode 100644 Private/InternalSdk/Sdk.QTest/module.config.dsc create mode 100644 Private/InternalSdk/Sdk.QTest/sdk.qtest.dsc create mode 100644 Private/InternalSdk/Sdk.QTest/tools/DBS.QTest.exe diff --git a/Private/InternalSdk/Sdk.QTest/module.config.dsc b/Private/InternalSdk/Sdk.QTest/module.config.dsc new file mode 100644 index 000000000..493064ded --- /dev/null +++ b/Private/InternalSdk/Sdk.QTest/module.config.dsc @@ -0,0 +1,6 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +module({ + name: "Sdk.QTest" +}); diff --git a/Private/InternalSdk/Sdk.QTest/sdk.qtest.dsc b/Private/InternalSdk/Sdk.QTest/sdk.qtest.dsc new file mode 100644 index 000000000..6c3e3d41b --- /dev/null +++ b/Private/InternalSdk/Sdk.QTest/sdk.qtest.dsc @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. + +import {Transformer} from "Sdk.Transformers"; + +// This is an empty facade for a Microsoft internal package. + +namespace Contents { + export declare const qualifier: { + }; + + @@public + export const all: StaticDirectory = Transformer.sealPartialDirectory(d`.`, [ + f`tools/DBS.QTest.exe`, + ]); +} + +@@public +export const qTestTool: Transformer.ToolDefinition = Context.getCurrentHost().os === "win" && { + exe: f`tools/DBS.QTest.exe`, + description: "Facade QTest Tool. Will not correctly execute", +}; \ No newline at end of file diff --git a/Private/InternalSdk/Sdk.QTest/tools/DBS.QTest.exe b/Private/InternalSdk/Sdk.QTest/tools/DBS.QTest.exe new file mode 100644 index 000000000..e44ecc207 --- /dev/null +++ b/Private/InternalSdk/Sdk.QTest/tools/DBS.QTest.exe @@ -0,0 +1 @@ +// This is an empty facade for a Microsoft internal package. \ No newline at end of file diff --git a/Public/Sdk/Public/Tools/QTest/Tool.QTestRunner.dsc b/Public/Sdk/Public/Tools/QTest/Tool.QTestRunner.dsc index f1a4d47a1..b9d1d33bd 100644 --- a/Public/Sdk/Public/Tools/QTest/Tool.QTestRunner.dsc +++ b/Public/Sdk/Public/Tools/QTest/Tool.QTestRunner.dsc @@ -24,7 +24,10 @@ export const qTestTool: Transformer.ToolDefinition = { d`${Context.getMount("ProgramFilesX86").path}`, d`${Context.getMount("ProgramFiles").path}`, d`${Context.getMount("AppData").path}`, - d`${Context.getMount("LocalAppData").path}` + d`${Context.getMount("LocalAppData").path}`, + // To ensure that dmps are generated during crashes, QTest now includes procdmp.exe + // However, this tool reads dbghelp.dll located in the following directory in CloudBuild machines + d`C:/Debuggers` ]), dependsOnWindowsDirectories: true, dependsOnAppDataDirectory: true, diff --git a/Public/Sdk/SelfHost/BuildXL/Testing/QTest/qtestFramework.dsc b/Public/Sdk/SelfHost/BuildXL/Testing/QTest/qtestFramework.dsc index c73847ff4..2ed7043c1 100644 --- a/Public/Sdk/SelfHost/BuildXL/Testing/QTest/qtestFramework.dsc +++ b/Public/Sdk/SelfHost/BuildXL/Testing/QTest/qtestFramework.dsc @@ -9,31 +9,9 @@ import * as Qtest from "BuildXL.Tools.QTest"; export declare const qualifier : Managed.TargetFrameworks.All; const qTestContents = importFrom("CB.QTest").Contents.all; -// const isDotNetCore = Shared.isDotNetCore(qualifier.targetFramework); // qualifier.targetFramework.startsWith("netcoreapp"); @@public -export const qTestTool: Transformer.ToolDefinition = Context.getCurrentHost().os === "win" && { - exe: qTestContents.getFile(r`tools/DBS.QTest.exe`), - description: "SelfHost Dev Build QTest", - runtimeDirectoryDependencies: [ - qTestContents - ], - untrackedDirectoryScopes: addIfLazy(Context.getCurrentHost().os === "win", () => [ - d`${Context.getMount("ProgramFiles").path}`, - d`${Context.getMount("ProgramFilesX86").path}`, - d`${Context.getMount("ProgramData").path}`, - d`${Context.getMount("AppData").path}`, - d`${Context.getMount("LocalAppData").path}`, - d`${Context.getMount("UserProfile").path}`, - // To ensure that dmps are generated during crashes, QTest now includes procdmp.exe - // However, this tool reads dbghelp.dll located in the following directory in CloudBuild machines - d`C:/Debuggers` - ]), - dependsOnWindowsDirectories: true, - dependsOnAppDataDirectory: true, - prepareTempDirectory: true, - timeoutInMilliseconds: Qtest.qtestDefaultTimeoutInMilliseconds -}; +export const qTestTool: Transformer.ToolDefinition = importFrom("Sdk.QTest").qTestTool; @@public export interface TestRunArguments extends Managed.TestRunArguments, Qtest.QTestArguments {