Skip to content

Commit d30b832

Browse files
committed
style: minor comment changes
1 parent 8dea0c9 commit d30b832

File tree

2 files changed

+17
-16
lines changed

2 files changed

+17
-16
lines changed

Tools/PC/c3-submission-helpers/parse-suspend-30-logs.py

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,9 @@ class Meta(TypedDict):
105105

106106

107107
def parse_args() -> Input:
108-
p = argparse.ArgumentParser()
108+
p = argparse.ArgumentParser(
109+
formatter_class=argparse.ArgumentDefaultsHelpFormatter
110+
)
109111
p.add_argument(
110112
"-s",
111113
"--no-summary",
@@ -124,7 +126,7 @@ def parse_args() -> Input:
124126
p.add_argument(
125127
"filenames",
126128
nargs="+",
127-
help="The path to the suspend logs or the stress test submission .tar",
129+
help="The path to the stress test submission .tar files",
128130
)
129131
p.add_argument(
130132
"-w",
@@ -139,13 +141,13 @@ def parse_args() -> Input:
139141
"-d",
140142
"--directory",
141143
dest="write_dir",
142-
default="",
144+
default=os.getcwd(),
143145
required=False,
144146
help=(
145-
"Where to write the individual logs. "
146-
"If not specified and the -w flag is true, "
147-
"it will create a new local directory called "
148-
"{your original file name}-split."
147+
"The top level dir of where to write the individual logs. "
148+
"Inside this directory, subdirectories called "
149+
"{your original file name}-split will be created to contain the "
150+
"individual .txt files of each run"
149151
),
150152
)
151153
p.add_argument(
@@ -158,7 +160,7 @@ def parse_args() -> Input:
158160
p.add_argument(
159161
"-nb",
160162
"--num-boots",
161-
help="Set the expected number of boots in the input file. Default=3.",
163+
help="Set the expected number of boots in the input file.",
162164
dest="num_boots",
163165
default=3,
164166
required=False,
@@ -167,7 +169,7 @@ def parse_args() -> Input:
167169
p.add_argument(
168170
"-ns",
169171
"--num-suspends-per-boot",
170-
help="Set the expected number of runs in the input file. Default=30.",
172+
help="Set the expected number of runs in the input file.",
171173
dest="num_suspends",
172174
default=30,
173175
required=False,

Tools/PC/c3-submission-helpers/summarize-reboot-check-test.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,9 +77,6 @@ def bold(self, s: str):
7777
return f"\033[1m{s}\033[0m"
7878

7979

80-
C = Color()
81-
82-
8380
class Log:
8481
@staticmethod
8582
def ok(*args: str):
@@ -672,7 +669,8 @@ def _group_by_index(self):
672669
def parse_args() -> Input:
673670
p = argparse.ArgumentParser(
674671
description="Parses the outputs of reboot_check_test.py "
675-
"from a C3 submission tar file"
672+
"from a C3 submission tar file",
673+
formatter_class=argparse.ArgumentDefaultsHelpFormatter,
676674
)
677675
p.add_argument(
678676
"filenames",
@@ -711,9 +709,9 @@ def parse_args() -> Input:
711709
dest="expected_n_runs",
712710
help=(
713711
"Specify a value to show a warning when the number of boot files "
714-
"!= the number of runs you expect. Default=30. "
712+
"!= the number of runs you expect. "
715713
"Note that this number applies to both cold and warm boot "
716-
"since checkbox doesn't use a different number for CB/WB either."
714+
"since checkbox doesn't use a different number for CB/WB. "
717715
),
718716
type=int,
719717
default=30,
@@ -729,7 +727,8 @@ def parse_args() -> Input:
729727
def main():
730728
args = parse_args()
731729

732-
C.no_color = args.no_color
730+
global C
731+
C = Color(no_color=args.no_color)
733732

734733
for filename in args.filenames:
735734
reader = SubmissionTarReader(filename)

0 commit comments

Comments
 (0)