Skip to content

Commit 6747f1f

Browse files
atlinenxpfrankli
authored andcommitted
Allow to disable summary line when uuu flash
Use DISABLE_SUMMARY=true to disable summary line to avoid not so useful information in automation like LAVA. Signed-off-by: Larry Shen <larry.shen@nxp.com>
1 parent 40292a8 commit 6747f1f

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

uuu/uuu.cpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -692,18 +692,24 @@ int progress(uuu_notify nt, void *p)
692692
str += it + "*";
693693
}
694694

695-
print_oneline(str);
696-
print_oneline("");
697-
if ((*np)[nt.id].m_dev == "Prep" && !g_start_usb_transfer)
695+
size_t disable_summary = 0;
696+
697+
getenv_s(&disable_summary, NULL, 0, "DISABLE_SUMMARY");
698+
if (disable_summary)
698699
{
699-
Summary(np).print();
700-
}else
700+
print_oneline(str);
701701
print_oneline("");
702+
if ((*np)[nt.id].m_dev == "Prep" && !g_start_usb_transfer)
703+
{
704+
Summary(np).print();
705+
}else
706+
print_oneline("");
707+
}
702708

703709
for (it = g_map_path_nt.begin(); it != g_map_path_nt.end(); it++)
704710
it->second.print();
705711

706-
for (size_t i = 0; i < g_map_path_nt.size() + 3; i++)
712+
for (size_t i = 0; i < g_map_path_nt.size() + (disable_summary ? 0 : 3); i++)
707713
cout << "\x1B[1F";
708714

709715
}

0 commit comments

Comments
 (0)