Merge in 'release/8.0.1xx' changes

This commit is contained in:
dotnet-bot 2024-06-17 16:00:47 +00:00
commit 9b2ed635d6

View file

@ -144,13 +144,16 @@ public class LicenseScanTests : TestBase
{ {
Assert.NotNull(Config.LicenseScanPath); Assert.NotNull(Config.LicenseScanPath);
// Indicates how long until a timeout occurs for scanning a given file
const int FileScanTimeoutSeconds = 240;
string scancodeResultsPath = Path.Combine(LogsDirectory, "scancode-results.json"); string scancodeResultsPath = Path.Combine(LogsDirectory, "scancode-results.json");
// Scancode Doc: https://scancode-toolkit.readthedocs.io/en/latest/index.html // Scancode Doc: https://scancode-toolkit.readthedocs.io/en/latest/index.html
string ignoreOptions = string.Join(" ", s_ignoredFilePatterns.Select(pattern => $"--ignore {pattern}")); string ignoreOptions = string.Join(" ", s_ignoredFilePatterns.Select(pattern => $"--ignore {pattern}"));
ExecuteHelper.ExecuteProcessValidateExitCode( ExecuteHelper.ExecuteProcessValidateExitCode(
"scancode", "scancode",
$"--license --processes 4 --strip-root --only-findings {ignoreOptions} --json-pp {scancodeResultsPath} {Config.LicenseScanPath}", $"--license --processes 4 --timeout {FileScanTimeoutSeconds} --strip-root --only-findings {ignoreOptions} --json-pp {scancodeResultsPath} {Config.LicenseScanPath}",
OutputHelper); OutputHelper);
JsonDocument doc = JsonDocument.Parse(File.ReadAllText(scancodeResultsPath)); JsonDocument doc = JsonDocument.Parse(File.ReadAllText(scancodeResultsPath));