|
@@ -173,6 +173,7 @@ BOOL CFATP_FQCDlg::CheckLog(CString strLogDir)
|
|
{
|
|
{
|
|
if ( PathFileExists(strLogDir) )
|
|
if ( PathFileExists(strLogDir) )
|
|
{
|
|
{
|
|
|
|
+ INT nPassLog = 0;
|
|
CString strLogFile;
|
|
CString strLogFile;
|
|
for ( int i = 1; i < 6; i++ )
|
|
for ( int i = 1; i < 6; i++ )
|
|
{
|
|
{
|
|
@@ -184,6 +185,7 @@ BOOL CFATP_FQCDlg::CheckLog(CString strLogDir)
|
|
CString strData = GLOBAL::ReadFileContent(strLogFile);
|
|
CString strData = GLOBAL::ReadFileContent(strLogFile);
|
|
GLOBAL::GetStringList(strData, _T("\n"), listStr);
|
|
GLOBAL::GetStringList(strData, _T("\n"), listStr);
|
|
INT nPassCount = GLOBAL::CheckListData(listStr);
|
|
INT nPassCount = GLOBAL::CheckListData(listStr);
|
|
|
|
+ FLOAT fPercent = (float)nPassCount/(float)(listStr.GetSize()/2)*100;
|
|
|
|
|
|
CString strResult;
|
|
CString strResult;
|
|
strResult.Format(_T("%s,log_%d,%d/%d=%.2f%%,%s"),
|
|
strResult.Format(_T("%s,log_%d,%d/%d=%.2f%%,%s"),
|
|
@@ -191,8 +193,8 @@ BOOL CFATP_FQCDlg::CheckLog(CString strLogDir)
|
|
i,
|
|
i,
|
|
nPassCount,
|
|
nPassCount,
|
|
listStr.GetSize()/2,
|
|
listStr.GetSize()/2,
|
|
- (float)nPassCount/(float)(listStr.GetSize()/2)*100,
|
|
|
|
- (0.9 < (float)nPassCount/(float)(listStr.GetSize()/2)) ? _T("PASS") : _T("FAIL"));
|
|
|
|
|
|
+ fPercent,
|
|
|
|
+ (90.0 < fPercent) ? _T("PASS") : _T("FAIL"));
|
|
m_listResult.AddTail(strResult);
|
|
m_listResult.AddTail(strResult);
|
|
|
|
|
|
INT nItemCount = m_list.GetItemCount();
|
|
INT nItemCount = m_list.GetItemCount();
|
|
@@ -201,17 +203,23 @@ BOOL CFATP_FQCDlg::CheckLog(CString strLogDir)
|
|
strResult.Format(_T("Log.%d"), i);
|
|
strResult.Format(_T("Log.%d"), i);
|
|
m_list.SetItemText(nItemCount, 1, strResult);
|
|
m_list.SetItemText(nItemCount, 1, strResult);
|
|
|
|
|
|
- strResult.Format(_T("%d/%d=%.2f%%"), nPassCount, listStr.GetSize()/2, (float)nPassCount/(float)(listStr.GetSize()/2)*100);
|
|
|
|
|
|
+ strResult.Format(_T("%d/%d=%.2f%%"), nPassCount, listStr.GetSize()/2, fPercent);
|
|
m_list.SetItemText(nItemCount, 2, strResult);
|
|
m_list.SetItemText(nItemCount, 2, strResult);
|
|
|
|
|
|
- strResult.Format(_T("%s"), (0.9 < (float)nPassCount/(float)(listStr.GetSize()/2)) ? _T("PASS") : _T("FAIL"));
|
|
|
|
|
|
+ strResult.Format(_T("%s"), (90.0 < fPercent) ? _T("PASS") : _T("FAIL"));
|
|
m_list.SetItemText(nItemCount, 3, strResult);
|
|
m_list.SetItemText(nItemCount, 3, strResult);
|
|
|
|
|
|
|
|
+ if ( 90.0 < fPercent )
|
|
|
|
+ nPassLog++;
|
|
|
|
+
|
|
UpdateData();
|
|
UpdateData();
|
|
}
|
|
}
|
|
|
|
|
|
GLOBAL::SaveList(m_listResult);
|
|
GLOBAL::SaveList(m_listResult);
|
|
m_listResult.RemoveAll();
|
|
m_listResult.RemoveAll();
|
|
|
|
+
|
|
|
|
+ if ( nPassLog == 5 )
|
|
|
|
+ return TRUE;
|
|
}
|
|
}
|
|
|
|
|
|
return FALSE;
|
|
return FALSE;
|