mirror of
https://github.com/akuker/RASCSI.git
synced 2024-12-01 13:51:43 +00:00
52c2aa474f
* Rebrand project to PiSCSI - rascsi ->piscsi - rasctl -> scsictl - rasdump -> scsidump - ras* -> piscsi* (rasutil -> piscsi_util, etc.) * Refined the formatting and wording of the app startup banner * Kept some references to rascsi and rasctl where backwards compatibility is concerned * Point to the new github repo URL Co-authored-by: nucleogenic <nr@nucleogenic.com> Co-authored-by: Uwe Seimet <Uwe.Seimet@seimet.de>
40 lines
986 B
C++
40 lines
986 B
C++
//---------------------------------------------------------------------------
|
|
//
|
|
// SCSI Target Emulator PiSCSI for Raspberry Pi
|
|
// Loopback tester utility
|
|
//
|
|
// Copyright (C) 2022 akuker
|
|
//
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include "scsiloop_cout.h"
|
|
#include <iostream>
|
|
|
|
using namespace std;
|
|
|
|
void ScsiLoop_Cout::StartTest(const string &test_name)
|
|
{
|
|
cout << CYAN << "Testing " << test_name << ":" << WHITE;
|
|
}
|
|
void ScsiLoop_Cout::PrintUpdate()
|
|
{
|
|
cout << ".";
|
|
}
|
|
|
|
void ScsiLoop_Cout::FinishTest(const string &test_name, int failures)
|
|
{
|
|
if (failures == 0) {
|
|
cout << GREEN << "OK!" << WHITE << endl;
|
|
} else {
|
|
cout << RED << test_name << " FAILED! - " << failures << " errors!" << WHITE << endl;
|
|
}
|
|
}
|
|
|
|
void ScsiLoop_Cout::PrintErrors(vector<string> &test_errors)
|
|
{
|
|
if (test_errors.size() > 0) {
|
|
for (auto err_string : test_errors) {
|
|
cout << RED << err_string << endl;
|
|
}
|
|
}
|
|
} |