From 82f01003837278fa07f278ef384f480152d83287 Mon Sep 17 00:00:00 2001 From: Iman Narasamdya Date: Fri, 12 Jul 2024 22:52:16 +0000 Subject: [PATCH] Merged PR 795016: Enable QTest in light UTs Due to bug #2195273 , QTest has been disabled in our selfhost builds. The problem is that we no longer exercise QTest framework in our selfhost, while at the same time we're deploying QTest to customers. Also, because there's no QTest UTs, the (optional) QTest validation stage in our release pipeline failed. To address the above problem, this PR enables some of light UTs, e.g., UTs that don't have many `[InlineData]` attributes and that don't take a long time to run. Related work items: #2195273 --- .../Collections/Test.BuildXL.Utilities.Collections.dsc | 5 +++++ .../Configuration/Test.BuildXL.Utilities.Configuration.dsc | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/Public/Src/Utilities/UnitTests/Collections/Test.BuildXL.Utilities.Collections.dsc b/Public/Src/Utilities/UnitTests/Collections/Test.BuildXL.Utilities.Collections.dsc index 1d074834d..a595a7ece 100644 --- a/Public/Src/Utilities/UnitTests/Collections/Test.BuildXL.Utilities.Collections.dsc +++ b/Public/Src/Utilities/UnitTests/Collections/Test.BuildXL.Utilities.Collections.dsc @@ -1,5 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +import * as QTest from "Sdk.Managed.Testing.QTest"; +import * as XUnit from "Sdk.Managed.Testing.XUnit"; namespace Collections { @@public @@ -11,5 +13,8 @@ namespace Collections { importFrom("BuildXL.Utilities").Native.dll, importFrom("BuildXL.Utilities").Utilities.Core.dll, ], + testFramework: BuildXLSdk.Flags.isMicrosoftInternal + ? QTest.getFramework(XUnit.framework) + : undefined }); } diff --git a/Public/Src/Utilities/UnitTests/Configuration/Test.BuildXL.Utilities.Configuration.dsc b/Public/Src/Utilities/UnitTests/Configuration/Test.BuildXL.Utilities.Configuration.dsc index b50919844..f0d95ef45 100644 --- a/Public/Src/Utilities/UnitTests/Configuration/Test.BuildXL.Utilities.Configuration.dsc +++ b/Public/Src/Utilities/UnitTests/Configuration/Test.BuildXL.Utilities.Configuration.dsc @@ -1,5 +1,7 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. +import * as QTest from "Sdk.Managed.Testing.QTest"; +import * as XUnit from "Sdk.Managed.Testing.XUnit"; namespace Configuration { @@public @@ -12,6 +14,9 @@ namespace Configuration { importFrom("BuildXL.Utilities").dll, importFrom("BuildXL.Utilities").Configuration.dll, importFrom("BuildXL.Utilities").Utilities.Core.dll, - ] + ], + testFramework: BuildXLSdk.Flags.isMicrosoftInternal + ? QTest.getFramework(XUnit.framework) + : undefined }); }