Restores parallel settings, fixes filename test-args formatting
This commit is contained in:
parent
8ee5eb5767
commit
a4ba1fbe2c
@ -1,6 +1,6 @@
|
|||||||
using NUnit.Framework;
|
using NUnit.Framework;
|
||||||
|
|
||||||
[assembly: LevelOfParallelism(10)]
|
[assembly: LevelOfParallelism(1)]
|
||||||
namespace CodexReleaseTests.DataTests
|
namespace CodexReleaseTests.DataTests
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ namespace DistTestCore
|
|||||||
kubeConfigFile = GetNullableEnvVarOrDefault("KUBECONFIG", null);
|
kubeConfigFile = GetNullableEnvVarOrDefault("KUBECONFIG", null);
|
||||||
logPath = GetEnvVarOrDefault("LOGPATH", "CodexTestLogs");
|
logPath = GetEnvVarOrDefault("LOGPATH", "CodexTestLogs");
|
||||||
dataFilesPath = GetEnvVarOrDefault("DATAFILEPATH", "TestDataFiles");
|
dataFilesPath = GetEnvVarOrDefault("DATAFILEPATH", "TestDataFiles");
|
||||||
AlwaysDownloadContainerLogs = true; // !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
|
AlwaysDownloadContainerLogs = !string.IsNullOrEmpty(GetEnvVarOrDefault("ALWAYS_LOGS", ""));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Configuration(string? kubeConfigFile, string logPath, string dataFilesPath)
|
public Configuration(string? kubeConfigFile, string logPath, string dataFilesPath)
|
||||||
|
@ -55,12 +55,23 @@ namespace DistTestCore
|
|||||||
private static string FormatArguments(TestContext.TestAdapter test)
|
private static string FormatArguments(TestContext.TestAdapter test)
|
||||||
{
|
{
|
||||||
if (test.Arguments == null || !test.Arguments.Any()) return "";
|
if (test.Arguments == null || !test.Arguments.Any()) return "";
|
||||||
return $"[{string.Join(',', test.Arguments)}]";
|
return $"[{string.Join(',', test.Arguments.Select(FormatArgument).ToArray())}]";
|
||||||
|
}
|
||||||
|
|
||||||
|
private static string FormatArgument(object? obj)
|
||||||
|
{
|
||||||
|
if (obj == null) return "";
|
||||||
|
var str = obj.ToString();
|
||||||
|
if (string.IsNullOrEmpty(str)) return "";
|
||||||
|
return ReplaceInvalidCharacters(str);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string ReplaceInvalidCharacters(string name)
|
private static string ReplaceInvalidCharacters(string name)
|
||||||
{
|
{
|
||||||
return name.Replace(":", "_");
|
return name
|
||||||
|
.Replace(":", "_")
|
||||||
|
.Replace("/", "_")
|
||||||
|
.Replace("\\", "_");
|
||||||
}
|
}
|
||||||
|
|
||||||
private static string DetermineFolder(LogConfig config, DateTime start)
|
private static string DetermineFolder(LogConfig config, DateTime start)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user