feat(cli): Add new timeout and file range options with enhanced logfile diff logging

This commit is contained in:
2025-05-24 01:32:41 +00:00
parent b525754035
commit 31bf090410
7 changed files with 266 additions and 30 deletions

View File

@@ -256,7 +256,11 @@ export class TsTestLogger {
// Create error copy if there were failures
if (failed > 0) {
const errorLogPath = path.join(logDir, `00err_${logBasename}`);
const errorDir = path.join(logDir, '00err');
if (!fs.existsSync(errorDir)) {
fs.mkdirSync(errorDir, { recursive: true });
}
const errorLogPath = path.join(errorDir, logBasename);
fs.writeFileSync(errorLogPath, logContent);
}
@@ -267,7 +271,11 @@ export class TsTestLogger {
// Simple check if content differs
if (previousContent !== logContent) {
const diffLogPath = path.join(logDir, `00diff_${logBasename}`);
const diffDir = path.join(logDir, '00diff');
if (!fs.existsSync(diffDir)) {
fs.mkdirSync(diffDir, { recursive: true });
}
const diffLogPath = path.join(diffDir, logBasename);
const diffContent = this.createDiff(previousContent, logContent, logBasename);
fs.writeFileSync(diffLogPath, diffContent);
}