Skip to content

Commit 2bef583

Browse files
thefourtheyeevanlucas
authored andcommitted
tools: cleanup no-build and build-only options
As the `no-build` and `build-only` options are not used anymore, they can be safely removed. PR-URL: #7620 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]>
1 parent fbc9ef8 commit 2bef583

File tree

1 file changed

+0
-38
lines changed

1 file changed

+0
-38
lines changed

tools/test.py

-38
Original file line numberDiff line numberDiff line change
@@ -696,15 +696,6 @@ def Execute(args, context, timeout=None, env={}, faketty=False):
696696
return CommandOutput(exit_code, timed_out, output, errors)
697697

698698

699-
def ExecuteNoCapture(args, context, timeout=None):
700-
(process, exit_code, timed_out) = RunProcess(
701-
context,
702-
timeout,
703-
args = args,
704-
)
705-
return CommandOutput(exit_code, False, "", "")
706-
707-
708699
def CarCdr(path):
709700
if len(path) == 0:
710701
return (None, [ ])
@@ -878,14 +869,6 @@ def RunTestCases(cases_to_run, progress, tasks, flaky_tests_mode):
878869
return progress.Run(tasks)
879870

880871

881-
def BuildRequirements(context, requirements, mode, scons_flags):
882-
command_line = (['scons', '-Y', context.workspace, 'mode=' + ",".join(mode)]
883-
+ requirements
884-
+ scons_flags)
885-
output = ExecuteNoCapture(command_line, context)
886-
return output.exit_code == 0
887-
888-
889872
# -------------------------------------------
890873
# --- T e s t C o n f i g u r a t i o n ---
891874
# -------------------------------------------
@@ -1323,15 +1306,9 @@ def BuildOptions():
13231306
default=False, action="store_true")
13241307
result.add_option('--logfile', dest='logfile',
13251308
help='write test output to file. NOTE: this only applies the tap progress indicator')
1326-
result.add_option("-S", dest="scons_flags", help="Flag to pass through to scons",
1327-
default=[], action="append")
13281309
result.add_option("-p", "--progress",
13291310
help="The style of progress indicator (verbose, dots, color, mono, tap)",
13301311
choices=PROGRESS_INDICATORS.keys(), default="mono")
1331-
result.add_option("--no-build", help="Don't build requirements",
1332-
default=True, action="store_true")
1333-
result.add_option("--build-only", help="Only build requirements, don't run the tests",
1334-
default=False, action="store_true")
13351312
result.add_option("--report", help="Print a summary of the tests to be run",
13361313
default=False, action="store_true")
13371314
result.add_option("-s", "--suite", help="A test suite",
@@ -1548,21 +1525,6 @@ def Main():
15481525
options.suppress_dialogs,
15491526
options.store_unexpected_output,
15501527
options.repeat)
1551-
# First build the required targets
1552-
if not options.no_build:
1553-
reqs = [ ]
1554-
for path in paths:
1555-
reqs += root.GetBuildRequirements(path, context)
1556-
reqs = list(set(reqs))
1557-
if len(reqs) > 0:
1558-
if options.j != 1:
1559-
options.scons_flags += ['-j', str(options.j)]
1560-
if not BuildRequirements(context, reqs, options.mode, options.scons_flags):
1561-
return 1
1562-
1563-
# Just return if we are only building the targets for running the tests.
1564-
if options.build_only:
1565-
return 0
15661528

15671529
# Get status for tests
15681530
sections = [ ]

0 commit comments

Comments
 (0)