Skip to content

Commit

Permalink
Tests/CheckDashboard: Ensure we don't have legacy early abort DAC mes…
Browse files Browse the repository at this point in the history
…sages present

Via CommonAnalysisFunctionChecks which we call at the end of each analysis
function test we already enforce that we have a valid dashboard pass/fail
message.

But since 8657a24 (AD_GetPerSweepFailMessage/AD_GetBaselineFailMsg:
Handle user aborted sweeps better, 2023-05-30) we try harder to also
detect early stopped sweeps prior to 87f9cbf (DAQ: Add stopping reason to
the labnotebook, 2021-05-13).

But we don't want to have the legacy sweep stop message present in any of
the tests of our analysis functions. As that always indicates a gap in the
dashboard evaluation.
  • Loading branch information
t-b committed Dec 1, 2023
1 parent 0c21882 commit e1aaa8d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Packages/MIES/MIES_AnalysisFunctions_Dashboard.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1116,7 +1116,7 @@ static Function/S AD_HasPrematureStopLegacy(WAVE numericalValues, WAVE/T textual
FindValue/FNAN/R AD

if(V_Value >= 0)
return "DAQ was stopped early (n.a.)"
return DAQ_STOPPED_EARLY_LEGACY_MSG
endif
endif
endfor
Expand Down
1 change: 1 addition & 0 deletions Packages/MIES/MIES_Constants.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -1686,6 +1686,7 @@ StrConstant BUFFEREDDRAWDDAQAXES = "dDAQAxes"
StrConstant TP_PROPERTIES_HASH = "TestPulsePropertiesHash"

StrConstant DASHBOARD_PASSING_MESSAGE = "Pass"
StrConstant DAQ_STOPPED_EARLY_LEGACY_MSG = "DAQ was stopped early (n.a.)"

Constant MAX_DOUBLE_PRECISION = 15

Expand Down
10 changes: 8 additions & 2 deletions Packages/tests/UTF_HardwareHelperFunctions.ipf
Original file line number Diff line number Diff line change
Expand Up @@ -517,7 +517,7 @@ End

static Function CheckDashboard(string device, WAVE headstageQC)

string databrowser
string databrowser, message
variable numEntries, i, state

databrowser = DB_FindDataBrowser(device)
Expand All @@ -534,8 +534,14 @@ static Function CheckDashboard(string device, WAVE headstageQC)
CHECK_GT_VAR(numEntries, 0)

for(i = 0; i < numEntries; i += 1)
state = !cmpstr(listWave[i][%Result], DASHBOARD_PASSING_MESSAGE)
message = listWave[i][%Result]
state = !cmpstr(message, DASHBOARD_PASSING_MESSAGE)
CHECK_EQUAL_VAR(state, headstageQC[i])

if(!headstageQC[i])
INFO("Index=%g, state=%g, message=%s", n0 = i, n1 = state, s0 = message)
CHECK_EQUAL_VAR(strsearch(message, DAQ_STOPPED_EARLY_LEGACY_MSG, 0), -1)
endif
endfor
End

Expand Down

0 comments on commit e1aaa8d

Please sign in to comment.