blob: 66f315ddf4363ca988eaae41d4f9607c131274e9 [file] [log] [blame]
armvixlad96eda2013-06-14 11:42:37 +01001#!/usr/bin/env python2.7
2
Alexandre Ramesb78f1392016-07-01 14:22:22 +01003# Copyright 2015, VIXL authors
armvixlad96eda2013-06-14 11:42:37 +01004# All rights reserved.
5#
6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions are met:
8#
9# * Redistributions of source code must retain the above copyright notice,
10# this list of conditions and the following disclaimer.
11# * Redistributions in binary form must reproduce the above copyright notice,
12# this list of conditions and the following disclaimer in the documentation
13# and/or other materials provided with the distribution.
14# * Neither the name of ARM Limited nor the names of its contributors may be
15# used to endorse or promote products derived from this software without
16# specific prior written permission.
17#
18# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
19# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
22# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
23# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
24# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
25# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
26# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28
armvixlad96eda2013-06-14 11:42:37 +010029import argparse
armvixldb644342015-07-21 11:37:10 +010030import fcntl
31import git
32import itertools
armvixl4a102ba2014-07-14 09:02:40 +010033import multiprocessing
armvixldb644342015-07-21 11:37:10 +010034import os
35from os.path import join
36import platform
armvixldb644342015-07-21 11:37:10 +010037import subprocess
38import sys
armvixlad96eda2013-06-14 11:42:37 +010039import time
armvixldb644342015-07-21 11:37:10 +010040
41import config
armvixl0f35e362016-05-10 13:57:58 +010042import clang_format
Anthony Barbier89eefef2019-07-05 11:15:13 +010043import clang_tidy
armvixldb644342015-07-21 11:37:10 +010044import lint
45import printer
46import test
Anthony Barbier89eefef2019-07-05 11:15:13 +010047import test_runner
armvixlad96eda2013-06-14 11:42:37 +010048import util
49
50
armvixldb644342015-07-21 11:37:10 +010051dir_root = config.dir_root
52
Anthony Barbierf2986e12019-02-28 16:49:23 +000053
54# Remove duplicates from a list
55def RemoveDuplicates(values):
56 # Convert the list into a set and back to list
57 # as sets guarantee items are unique.
58 return list(set(values))
armvixldb644342015-07-21 11:37:10 +010059
60
Anthony Barbierf2986e12019-02-28 16:49:23 +000061# Custom argparse.Action to automatically add and handle an 'all' option.
62# If no 'default' value is set, it will default to 'all.
63# If accepted options are set using 'choices' then only these values will be
64# allowed.
65# If they're set using 'soft_choices' then 'all' will default to these values,
66# but other values will also be accepted.
67class AllChoiceAction(argparse.Action):
armvixldb644342015-07-21 11:37:10 +010068
Anthony Barbierf2986e12019-02-28 16:49:23 +000069 # At least one option was set by the user.
70 WasSetByUser = False
armvixldb644342015-07-21 11:37:10 +010071
Anthony Barbierf2986e12019-02-28 16:49:23 +000072 def __init__(self, **kwargs):
73 if 'choices' in kwargs:
74 assert 'soft_choices' not in kwargs,\
75 "Can't have both 'choices' and 'soft_choices' options"
76 self.all_choices = list(kwargs['choices'])
77 kwargs['choices'].append('all')
armvixldb644342015-07-21 11:37:10 +010078 else:
Anthony Barbierf2986e12019-02-28 16:49:23 +000079 self.all_choices = kwargs['soft_choices']
80 kwargs['help'] += ' Supported values: {' + ','.join(
81 ['all'] + self.all_choices) + '}'
82 del kwargs['soft_choices']
83 if 'default' not in kwargs:
84 kwargs['default'] = self.all_choices
85 super(AllChoiceAction, self).__init__(**kwargs)
armvixldb644342015-07-21 11:37:10 +010086
Anthony Barbierf2986e12019-02-28 16:49:23 +000087 def __call__(self, parser, namespace, values, option_string=None):
88 AllChoiceAction.WasSetByUser = True
89 if 'all' in values:
90 # Substitute 'all' by the actual values.
91 values = self.all_choices + [value for value in values if value != 'all']
armvixldb644342015-07-21 11:37:10 +010092
Anthony Barbierf2986e12019-02-28 16:49:23 +000093 setattr(namespace, self.dest, RemoveDuplicates(values))
armvixl5799d6c2014-05-01 11:05:00 +010094
95
armvixlad96eda2013-06-14 11:42:37 +010096def BuildOptions():
armvixldb644342015-07-21 11:37:10 +010097 args = argparse.ArgumentParser(
98 description =
armvixl0f35e362016-05-10 13:57:58 +010099 '''This tool runs all tests matching the specified filters for multiple
armvixldb644342015-07-21 11:37:10 +0100100 environment, build options, and runtime options configurations.''',
101 # Print default values.
102 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
103
104 args.add_argument('filters', metavar='filter', nargs='*',
105 help='Run tests matching all of the (regexp) filters.')
106
107 # We automatically build the script options from the options to be tested.
108 test_arguments = args.add_argument_group(
109 'Test options',
110 'These options indicate what should be tested')
Anthony Barbierf2986e12019-02-28 16:49:23 +0000111 test_arguments.add_argument(
112 '--negative_testing',
113 help='Tests with negative testing enabled.',
114 action='store_const',
115 const='on',
116 default='off')
117 test_arguments.add_argument(
118 '--compiler',
119 help='Test for the specified compilers.',
120 soft_choices=config.tested_compilers,
121 action=AllChoiceAction,
122 nargs="+")
123 test_arguments.add_argument(
124 '--mode',
125 help='Test with the specified build modes.',
126 choices=config.build_options_modes,
127 action=AllChoiceAction,
128 nargs="+")
129 test_arguments.add_argument(
130 '--std',
131 help='Test with the specified C++ standard.',
132 soft_choices=config.tested_cpp_standards,
133 action=AllChoiceAction,
134 nargs="+")
135 test_arguments.add_argument(
136 '--target',
137 help='Test with the specified isa enabled.',
138 soft_choices=config.build_options_target,
139 action=AllChoiceAction,
140 nargs="+")
armvixldb644342015-07-21 11:37:10 +0100141
142 general_arguments = args.add_argument_group('General options')
Jacob Bramley59d74ae2017-01-18 15:27:45 +0000143 general_arguments.add_argument('--dry-run', action='store_true',
144 help='''Don't actually build or run anything,
145 but print the configurations that would be
146 tested.''')
Anthony Barbier88e1d032019-06-13 15:20:20 +0100147 general_arguments.add_argument('--verbose', action='store_true',
148 help='''Print extra information.''')
armvixldb644342015-07-21 11:37:10 +0100149 general_arguments.add_argument(
150 '--jobs', '-j', metavar='N', type=int, nargs='?',
Anthony Barbier9c4ba7a2019-02-15 15:20:25 +0000151 default=multiprocessing.cpu_count(),
152 const=multiprocessing.cpu_count(),
armvixldb644342015-07-21 11:37:10 +0100153 help='''Runs the tests using N jobs. If the option is set but no value is
154 provided, the script will use as many jobs as it thinks useful.''')
Pierre Langlois44096c42018-05-23 23:15:25 +0100155 general_arguments.add_argument('--clang-format',
156 default=clang_format.DEFAULT_CLANG_FORMAT,
157 help='Path to clang-format.')
Anthony Barbier89eefef2019-07-05 11:15:13 +0100158 general_arguments.add_argument('--clang-tidy',
159 default=clang_tidy.DEFAULT_CLANG_TIDY,
160 help='Path to clang-tidy.')
armvixldb644342015-07-21 11:37:10 +0100161 general_arguments.add_argument('--nobench', action='store_true',
162 help='Do not run benchmarks.')
163 general_arguments.add_argument('--nolint', action='store_true',
164 help='Do not run the linter.')
armvixl0f35e362016-05-10 13:57:58 +0100165 general_arguments.add_argument('--noclang-format', action='store_true',
166 help='Do not run clang-format.')
Anthony Barbier89eefef2019-07-05 11:15:13 +0100167 general_arguments.add_argument('--noclang-tidy', action='store_true',
168 help='Do not run clang-tidy.')
armvixldb644342015-07-21 11:37:10 +0100169 general_arguments.add_argument('--notest', action='store_true',
170 help='Do not run tests.')
Alexandre Rames73064a22016-07-08 09:17:03 +0100171 general_arguments.add_argument('--fail-early', action='store_true',
172 help='Exit as soon as a test fails.')
armvixl684cd2a2015-10-23 13:38:33 +0100173 general_arguments.add_argument(
174 '--under_valgrind', action='store_true',
175 help='''Run the test-runner commands under Valgrind.
176 Note that a few tests are known to fail because of
177 issues in Valgrind''')
armvixldb644342015-07-21 11:37:10 +0100178 return args.parse_args()
armvixlad96eda2013-06-14 11:42:37 +0100179
180
armvixldb644342015-07-21 11:37:10 +0100181def RunCommand(command, environment_options = None):
182 # Create a copy of the environment. We do not want to pollute the environment
183 # of future commands run.
Anthony Barbierf2986e12019-02-28 16:49:23 +0000184 environment = os.environ.copy()
armvixlad96eda2013-06-14 11:42:37 +0100185
armvixldb644342015-07-21 11:37:10 +0100186 printable_command = ''
187 if environment_options:
Anthony Barbierf2986e12019-02-28 16:49:23 +0000188 # Add the environment options to the environment:
189 environment.update(environment_options)
190 printable_command += ' ' + DictToString(environment_options) + ' '
armvixldb644342015-07-21 11:37:10 +0100191 printable_command += ' '.join(command)
armvixlad96eda2013-06-14 11:42:37 +0100192
armvixldb644342015-07-21 11:37:10 +0100193 printable_command_orange = \
194 printer.COLOUR_ORANGE + printable_command + printer.NO_COLOUR
195 printer.PrintOverwritableLine(printable_command_orange)
196 sys.stdout.flush()
armvixlad96eda2013-06-14 11:42:37 +0100197
armvixldb644342015-07-21 11:37:10 +0100198 # Start a process for the command.
199 # Interleave `stderr` and `stdout`.
200 p = subprocess.Popen(command,
201 stdout=subprocess.PIPE,
202 stderr=subprocess.STDOUT,
203 env=environment)
armvixlad96eda2013-06-14 11:42:37 +0100204
armvixldb644342015-07-21 11:37:10 +0100205 # We want to be able to display a continuously updated 'work indicator' while
206 # the process is running. Since the process can hang if the `stdout` pipe is
207 # full, we need to pull from it regularly. We cannot do so via the
208 # `readline()` function because it is blocking, and would thus cause the
209 # indicator to not be updated properly. So use file control mechanisms
210 # instead.
211 indicator = ' (still working: %d seconds elapsed)'
armvixl5799d6c2014-05-01 11:05:00 +0100212
armvixldb644342015-07-21 11:37:10 +0100213 # Mark the process output as non-blocking.
214 flags = fcntl.fcntl(p.stdout, fcntl.F_GETFL)
215 fcntl.fcntl(p.stdout, fcntl.F_SETFL, flags | os.O_NONBLOCK)
armvixl5799d6c2014-05-01 11:05:00 +0100216
armvixldb644342015-07-21 11:37:10 +0100217 t_start = time.time()
Anthony Barbierf2986e12019-02-28 16:49:23 +0000218 t_current = t_start
armvixldb644342015-07-21 11:37:10 +0100219 t_last_indication = t_start
Anthony Barbier7b4df2b2019-03-12 17:36:15 +0000220 t_current = t_start
armvixldb644342015-07-21 11:37:10 +0100221 process_output = ''
armvixl5799d6c2014-05-01 11:05:00 +0100222
armvixldb644342015-07-21 11:37:10 +0100223 # Keep looping as long as the process is running.
224 while p.poll() is None:
225 # Avoid polling too often.
226 time.sleep(0.1)
227 # Update the progress indicator.
228 t_current = time.time()
229 if (t_current - t_start >= 2) and (t_current - t_last_indication >= 1):
230 printer.PrintOverwritableLine(
231 printable_command_orange + indicator % int(t_current - t_start))
232 sys.stdout.flush()
233 t_last_indication = t_current
234 # Pull from the process output.
235 while True:
236 try:
237 line = os.read(p.stdout.fileno(), 1024)
238 except OSError:
239 line = ''
240 break
241 if line == '': break
242 process_output += line
armvixlad96eda2013-06-14 11:42:37 +0100243
armvixldb644342015-07-21 11:37:10 +0100244 # The process has exited. Don't forget to retrieve the rest of its output.
245 out, err = p.communicate()
246 rc = p.poll()
247 process_output += out
armvixlad96eda2013-06-14 11:42:37 +0100248
Anthony Barbierb5f72392019-02-15 15:33:48 +0000249 printable_command += ' (took %d seconds)' % int(t_current - t_start)
armvixldb644342015-07-21 11:37:10 +0100250 if rc == 0:
251 printer.Print(printer.COLOUR_GREEN + printable_command + printer.NO_COLOUR)
armvixl4a102ba2014-07-14 09:02:40 +0100252 else:
armvixldb644342015-07-21 11:37:10 +0100253 printer.Print(printer.COLOUR_RED + printable_command + printer.NO_COLOUR)
254 printer.Print(process_output)
255 return rc
armvixl5799d6c2014-05-01 11:05:00 +0100256
257
Anthony Barbierf2986e12019-02-28 16:49:23 +0000258def RunLinter(jobs):
Jacob Bramleyf89cb482019-06-28 15:53:18 +0100259 return lint.RunLinter(map(lambda x: join(dir_root, x),
260 util.get_source_files()),
armvixldb644342015-07-21 11:37:10 +0100261 jobs = args.jobs, progress_prefix = 'cpp lint: ')
armvixlad96eda2013-06-14 11:42:37 +0100262
armvixlad96eda2013-06-14 11:42:37 +0100263
Anthony Barbierf2986e12019-02-28 16:49:23 +0000264def RunClangFormat(clang_path, jobs):
Jacob Bramleyf89cb482019-06-28 15:53:18 +0100265 return clang_format.ClangFormatFiles(util.get_source_files(),
266 clang_path,
267 jobs = jobs,
armvixl0f35e362016-05-10 13:57:58 +0100268 progress_prefix = 'clang-format: ')
269
Anthony Barbier89eefef2019-07-05 11:15:13 +0100270def RunClangTidy(clang_path, jobs):
271 return clang_tidy.ClangTidyFiles(util.get_source_files(),
272 clang_path,
273 jobs = jobs,
274 progress_prefix = 'clang-tidy: ')
armvixl0f35e362016-05-10 13:57:58 +0100275
Anthony Barbierf2986e12019-02-28 16:49:23 +0000276def BuildAll(build_options, jobs, environment_options):
277 scons_command = ['scons', '-C', dir_root, 'all', '-j', str(jobs)]
Anthony Barbier9c4ba7a2019-02-15 15:20:25 +0000278 if util.IsCommandAvailable('ccache'):
279 scons_command += ['compiler_wrapper=ccache']
280 # Fixes warnings for ccache 3.3.1 and lower:
281 environment_options = environment_options.copy()
282 environment_options["CCACHE_CPP2"] = 'yes'
Anthony Barbierf2986e12019-02-28 16:49:23 +0000283 scons_command += DictToString(build_options).split()
284 return RunCommand(scons_command, environment_options)
armvixlad96eda2013-06-14 11:42:37 +0100285
armvixl4a102ba2014-07-14 09:02:40 +0100286
Anthony Barbierf2986e12019-02-28 16:49:23 +0000287def CanRunAarch64(options, args):
288 for target in options['target']:
289 if target in ['aarch64', 'a64']:
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000290 return True
291
292 return False
293
294
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000295def CanRunAarch32(options, args):
Anthony Barbierf2986e12019-02-28 16:49:23 +0000296 for target in options['target']:
297 if target in ['aarch32', 'a32', 't32']:
298 return True
299 return False
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000300
301
302def RunBenchmarks(options, args):
armvixldb644342015-07-21 11:37:10 +0100303 rc = 0
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000304 if CanRunAarch32(options, args):
Pierre Langlois1c1488c2016-12-14 18:16:44 +0000305 benchmark_names = util.ListCCFilesWithoutExt(config.dir_aarch32_benchmarks)
306 for bench in benchmark_names:
307 rc |= RunCommand(
308 [os.path.realpath(
Martyn Capewell9cd420f2017-05-12 20:30:23 +0100309 join(config.dir_build_latest, 'benchmarks/aarch32', bench)), '10'])
Rodolph Perfetta9a9331f2016-12-09 22:05:48 +0000310 if CanRunAarch64(options, args):
Pierre Langlois1c1488c2016-12-14 18:16:44 +0000311 benchmark_names = util.ListCCFilesWithoutExt(config.dir_aarch64_benchmarks)
312 for bench in benchmark_names:
313 rc |= RunCommand(
314 [util.relrealpath(
Martyn Capewell9cd420f2017-05-12 20:30:23 +0100315 join(config.dir_build_latest,
316 'benchmarks/aarch64', bench)), '10'])
armvixldb644342015-07-21 11:37:10 +0100317 return rc
armvixl4a102ba2014-07-14 09:02:40 +0100318
armvixl4a102ba2014-07-14 09:02:40 +0100319
armvixl4a102ba2014-07-14 09:02:40 +0100320
Anthony Barbierf2986e12019-02-28 16:49:23 +0000321# It is a precommit run if the user did not specify any of the
322# options that would affect the automatically generated combinations.
323def IsPrecommitRun(args):
324 return args.negative_testing == "off" and not AllChoiceAction.WasSetByUser
325
326# Generate a list of all the possible combinations of the passed list:
327# ListCombinations( a = [a0, a1], b = [b0, b1] ) will return
328# [ {a : a0, b : b0}, {a : a0, b : b1}, {a: a1, b : b0}, {a : a1, b : b1}]
329def ListCombinations(**kwargs):
330 # End of recursion: no options passed
331 if not kwargs:
332 return [{}]
333 option, values = kwargs.popitem()
334 configs = ListCombinations(**kwargs)
335 retval = []
336 if not isinstance(values, list):
337 values = [values]
338 for value in values:
339 for config in configs:
340 new_config = config.copy()
341 new_config[option] = value
342 retval.append(new_config)
343 return retval
344
345# Convert a dictionary into a space separated string
346# {a : a0, b : b0} --> "a=a0 b=b0"
347def DictToString(options):
348 return " ".join(
349 ["{}={}".format(option, value) for option, value in options.items()])
armvixlad96eda2013-06-14 11:42:37 +0100350
351
352if __name__ == '__main__':
armvixldb644342015-07-21 11:37:10 +0100353 util.require_program('scons')
armvixlad96eda2013-06-14 11:42:37 +0100354
armvixlad96eda2013-06-14 11:42:37 +0100355 args = BuildOptions()
armvixlad96eda2013-06-14 11:42:37 +0100356
Anthony Barbierf2986e12019-02-28 16:49:23 +0000357 rc = util.ReturnCode(args.fail_early, printer.Print)
Alexandre Rames73064a22016-07-08 09:17:03 +0100358
armvixl684cd2a2015-10-23 13:38:33 +0100359 if args.under_valgrind:
360 util.require_program('valgrind')
361
Anthony Barbier89eefef2019-07-05 11:15:13 +0100362 tests = test_runner.TestQueue()
Anthony Barbierf2986e12019-02-28 16:49:23 +0000363 if not args.nolint and not args.dry_run:
364 rc.Combine(RunLinter(args.jobs))
Jacob Bramley59d74ae2017-01-18 15:27:45 +0000365
Anthony Barbierf2986e12019-02-28 16:49:23 +0000366 if not args.noclang_format and not args.dry_run:
367 rc.Combine(RunClangFormat(args.clang_format, args.jobs))
368
Anthony Barbier89eefef2019-07-05 11:15:13 +0100369 if not args.noclang_tidy and not args.dry_run:
370 rc.Combine(RunClangTidy(args.clang_tidy, args.jobs))
371
Anthony Barbierf2986e12019-02-28 16:49:23 +0000372 list_options = []
373 if IsPrecommitRun(args):
374 # Maximize the coverage for precommit testing.
375
Pierre Langloisa5b3cef2019-01-28 11:30:38 +0000376 # Debug builds with negative testing and all targets enabled.
Anthony Barbierf2986e12019-02-28 16:49:23 +0000377 list_options += ListCombinations(
378 compiler = args.compiler,
379 negative_testing = 'on',
Anthony Barbierf2986e12019-02-28 16:49:23 +0000380 mode = 'debug',
381 target = 'a64,a32,t32')
382
383 # Release builds with all targets enabled.
384 list_options += ListCombinations(
385 compiler = args.compiler,
386 negative_testing = 'off',
387 std = args.std,
388 mode = 'release',
389 target = 'a64,a32,t32')
390
391 # c++98 builds for Thumb32 target only.
392 list_options += ListCombinations(
393 compiler = args.compiler,
394 negative_testing = 'off',
395 std = 'c++98',
396 mode = args.mode,
397 target = 't32')
398
399 # c++11 builds for Aarch64 target only.
400 list_options += ListCombinations(
401 compiler = args.compiler,
402 negative_testing = 'off',
403 std = 'c++11',
404 mode = args.mode,
405 target = 'a64')
406 else:
407 list_options = ListCombinations(
408 compiler = args.compiler,
409 negative_testing = args.negative_testing,
410 std = args.std,
411 mode = args.mode,
412 target = args.target)
413
414 for options in list_options:
415 if (args.dry_run):
416 print(DictToString(options))
417 continue
418 # Convert 'compiler' into an environment variable:
419 environment_options = {'CXX': options['compiler']}
420 del options['compiler']
421
422 # Avoid going through the build stage if we are not using the build
423 # result.
424 if not (args.notest and args.nobench):
425 build_rc = BuildAll(options, args.jobs, environment_options)
426 # Don't run the tests for this configuration if the build failed.
427 if build_rc != 0:
428 rc.Combine(build_rc)
429 continue
armvixlad96eda2013-06-14 11:42:37 +0100430
armvixldb644342015-07-21 11:37:10 +0100431 # Use the realpath of the test executable so that the commands printed
432 # can be copy-pasted and run.
Alexandre Rames81c76e62016-07-19 09:53:09 +0100433 test_executable = util.relrealpath(
armvixldb644342015-07-21 11:37:10 +0100434 join(config.dir_build_latest, 'test', 'test-runner'))
435
436 if not args.notest:
437 printer.Print(test_executable)
Anthony Barbier89eefef2019-07-05 11:15:13 +0100438 tests.AddTests(
Anthony Barbierf2986e12019-02-28 16:49:23 +0000439 test_executable,
440 args.filters,
Anthony Barbier89eefef2019-07-05 11:15:13 +0100441 list(),
442 args.under_valgrind)
armvixldb644342015-07-21 11:37:10 +0100443
444 if not args.nobench:
Anthony Barbierf2986e12019-02-28 16:49:23 +0000445 rc.Combine(RunBenchmarks(options, args))
armvixldb644342015-07-21 11:37:10 +0100446
Anthony Barbier88e1d032019-06-13 15:20:20 +0100447 rc.Combine(tests.Run(args.jobs, args.verbose))
Jacob Bramley59d74ae2017-01-18 15:27:45 +0000448 if not args.dry_run:
Anthony Barbierf2986e12019-02-28 16:49:23 +0000449 rc.PrintStatus()
Alexandre Rames7c0ea8b2016-05-18 13:47:42 +0100450
Anthony Barbierf2986e12019-02-28 16:49:23 +0000451 sys.exit(rc.Value)