Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/libraries/sendtohelixhelp.proj
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,7 @@
<HelixCommandPrefixEnvVarItem Condition="'$(TestUsingWorkloads)' == 'true'" Include="TEST_USING_WORKLOADS=true" />
<HelixCommandPrefixEnvVarItem Condition="'$(WasmEnableWebcil)' == 'false'" Include="WASM_ENABLE_WEBCIL=false" />
<HelixCommandPrefixEnvVarItem Condition="'$(WasmFingerprintAssets)' == 'false'" Include="WASM_FINGERPRINT_ASSETS=false" />
<HelixCommandPrefixEnvVarItem Condition="'$(WasmFingerprintDotnetJs)' == 'true'" Include="WASM_FINGERPRINT_DOTNET_JS=true" />
<HelixCommandPrefixEnvVarItem Condition="'$(WorkloadsTestPreviousVersions)' == 'true'" Include="WORKLOADS_TEST_PREVIOUS_VERSIONS=true" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ internal static class EnvironmentVariables
internal static readonly bool ShowBuildOutput = IsRunningOnCI || Environment.GetEnvironmentVariable("SHOW_BUILD_OUTPUT") is not null;
internal static readonly bool UseWebcil = Environment.GetEnvironmentVariable("USE_WEBCIL_FOR_TESTS") is "true";
internal static readonly bool UseFingerprinting = Environment.GetEnvironmentVariable("USE_FINGERPRINTING_FOR_TESTS") is "true";
internal static readonly bool UseFingerprintingDotnetJS = Environment.GetEnvironmentVariable("WASM_FINGERPRINT_DOTNET_JS") is "true";
internal static readonly bool UseFingerprintingDotnetJS = Environment.GetEnvironmentVariable("USE_DOTNET_FINGERPRINTING_FOR_TESTS") is "true";
internal static readonly string? SdkDirName = Environment.GetEnvironmentVariable("SDK_DIR_NAME");
internal static readonly string? WasiSdkPath = Environment.GetEnvironmentVariable("WASI_SDK_PATH");
internal static readonly bool WorkloadsTestPreviousVersions = Environment.GetEnvironmentVariable("WORKLOADS_TEST_PREVIOUS_VERSIONS") is "true";
Expand Down
10 changes: 5 additions & 5 deletions src/mono/wasm/Wasm.Build.Tests/ProjectProviderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public IReadOnlyDictionary<string, DotNetFileName> FindAndAssertDotnetFiles(
return false;

string actualFilename = Path.GetFileName(actualFile);
// _testOutput.WriteLine($"Comparing {expectedFilename} with {actualFile}, expectFingerprintOnDotnetJs: {expectFingerprintOnDotnetJs}, expectFingerprint: {expectFingerprint}");
_testOutput.WriteLine($"Comparing {expectedFilename} with {actualFile}, expectFingerprintOnDotnetJs: {expectFingerprintOnDotnetJs}, expectFingerprint: {expectFingerprint}");
if (ShouldCheckFingerprint(expectedFilename: expectedFilename,
expectFingerprintOnDotnetJs: expectFingerprintOnDotnetJs,
expectFingerprintForThisFile: expectFingerprint))
Expand Down Expand Up @@ -147,12 +147,12 @@ public IReadOnlyDictionary<string, DotNetFileName> FindAndAssertDotnetFiles(
}).ToList();
}

// _testOutput.WriteLine($"Accepted count: {actual.Count}");
// foreach (var kvp in actual)
// _testOutput.WriteLine($"Accepted: \t[{kvp.Key}] = {kvp.Value}");

if (dotnetFiles.Any())
{
_testOutput.WriteLine($"Accepted count: {actual.Count}");
foreach (var kvp in actual)
_testOutput.WriteLine($"Accepted: \t[{kvp.Key}] = {kvp.Value}");

throw new XunitException($"Found unknown files in {binFrameworkDir}:{Environment.NewLine} " +
$"{string.Join($"{Environment.NewLine} ", dotnetFiles.Select(f => Path.GetRelativePath(binFrameworkDir, f)))}{Environment.NewLine}" +
$"Add these to {nameof(GetAllKnownDotnetFilesToFingerprintMap)} method");
Expand Down
5 changes: 5 additions & 0 deletions src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,11 @@ if [%WASM_FINGERPRINT_ASSETS%] == [false] (
) else (
set USE_FINGERPRINTING_FOR_TESTS=true
)
if [%WASM_FINGERPRINT_DOTNET_JS%] == [false] (
set USE_DOTNET_FINGERPRINTING_FOR_TESTS=false
) else (
set USE_DOTNET_FINGERPRINTING_FOR_TESTS=true
)

if [%HELIX_CORRELATION_PAYLOAD%] NEQ [] (
robocopy /mt /np /nfl /NDL /nc /e %BASE_DIR%\%SDK_DIR_NAME% %EXECUTION_DIR%\%SDK_DIR_NAME%
Expand Down
6 changes: 6 additions & 0 deletions src/mono/wasm/Wasm.Build.Tests/data/RunScriptTemplate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ function set_env_vars()
export USE_FINGERPRINTING_FOR_TESTS=true
fi

if [ "x$WASM_FINGERPRINT_DOTNET_JS" = "xfalse" ]; then
export USE_DOTNET_FINGERPRINTING_FOR_TESTS=false
else
export USE_DOTNET_FINGERPRINTING_FOR_TESTS=true
fi

local _SDK_DIR=
if [[ -n "$HELIX_WORKITEM_UPLOAD_ROOT" ]]; then
cp -r $BASE_DIR/$SDK_DIR_NAME $EXECUTION_DIR
Expand Down