30 lines
670 B
C#
30 lines
670 B
C#
using Logging;
|
|
|
|
namespace DistTestCore.Logs
|
|
{
|
|
public abstract class BaseTestLog : BaseLog
|
|
{
|
|
private bool hasFailed;
|
|
|
|
public BaseTestLog(bool debug)
|
|
: base(debug)
|
|
{
|
|
}
|
|
|
|
public void WriteLogTag()
|
|
{
|
|
var runId = NameUtils.GetRunId();
|
|
var category = NameUtils.GetCategoryName();
|
|
var name = NameUtils.GetTestMethodName();
|
|
LogFile.WriteRaw($"{runId} {category} {name}");
|
|
}
|
|
|
|
public void MarkAsFailed()
|
|
{
|
|
if (hasFailed) return;
|
|
hasFailed = true;
|
|
LogFile.ConcatToFilename("_FAILED");
|
|
}
|
|
}
|
|
}
|