-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
FI-765 fix: directly end
e2ed
on termination signals
fix: add more temporary logs on termination signals
- Loading branch information
Showing
9 changed files
with
89 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import {ExitCode} from '../../constants/internal'; | ||
|
||
import {failMessage, generalLog, okMessage} from '../generalLog'; | ||
import {collectReportData, getLiteReport} from '../report'; | ||
|
||
import {collectFullEventsData} from './collectFullEventsData'; | ||
|
||
import type {LiteReport, ReportData} from '../../types/internal'; | ||
|
||
type Return = Readonly<{liteReport: LiteReport; reportData: ReportData}>; | ||
|
||
/** | ||
* Get report data and lite report. | ||
* @internal | ||
*/ | ||
export const getReports = async (): Promise<Return> => { | ||
const fullEventsData = await collectFullEventsData(); | ||
|
||
const reportData = await collectReportData(fullEventsData); | ||
|
||
const stateMessage = reportData.exitCode === ExitCode.Passed ? okMessage : failMessage; | ||
|
||
generalLog(`Results of pack: ${stateMessage} ${reportData.summaryPackResults}`); | ||
|
||
const liteReport = getLiteReport(reportData); | ||
|
||
return {liteReport, reportData}; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import {writeHtmlReport, writeLiteJsonReport} from '../report'; | ||
|
||
import type {LiteReport, ReportData} from '../../types/internal'; | ||
|
||
type Options = Readonly<{liteReport: LiteReport; reportData: ReportData}>; | ||
|
||
/** | ||
* Writes HTML report and lite JSON report to corresponding files. | ||
* @internal | ||
*/ | ||
export const writeReports = async ({liteReport, reportData}: Options): Promise<void> => { | ||
const {liteReportFileName, reportFileName} = reportData; | ||
|
||
if (liteReportFileName !== null) { | ||
await writeLiteJsonReport(liteReport); | ||
} | ||
|
||
if (reportFileName !== null) { | ||
await writeHtmlReport(reportData); | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters