From b9c1b51e45b845debb76d8658edabca70ca56079 Mon Sep 17 00:00:00 2001 From: Kate Stone Date: Tue, 6 Sep 2016 20:57:50 +0000 Subject: *** This commit represents a complete reformatting of the LLDB source code *** to conform to clang-format’s LLVM style. This kind of mass change has *** two obvious implications: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Firstly, merging this particular commit into a downstream fork may be a huge effort. Alternatively, it may be worth merging all changes up to this commit, performing the same reformatting operation locally, and then discarding the merge for this particular commit. The commands used to accomplish this reformatting were as follows (with current working directory as the root of the repository): find . \( -iname "*.c" -or -iname "*.cpp" -or -iname "*.h" -or -iname "*.mm" \) -exec clang-format -i {} + find . -iname "*.py" -exec autopep8 --in-place --aggressive --aggressive {} + ; The version of clang-format used was 3.9.0, and autopep8 was 1.2.4. Secondly, “blame” style tools will generally point to this commit instead of a meaningful prior commit. There are alternatives available that will attempt to look through this change and find the appropriate prior commit. YMMV. llvm-svn: 280751 --- lldb/packages/Python/lldbsuite/test/redo.py | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'lldb/packages/Python/lldbsuite/test/redo.py') diff --git a/lldb/packages/Python/lldbsuite/test/redo.py b/lldb/packages/Python/lldbsuite/test/redo.py index e4eba8b2786..03052c3a08c 100644 --- a/lldb/packages/Python/lldbsuite/test/redo.py +++ b/lldb/packages/Python/lldbsuite/test/redo.py @@ -17,7 +17,9 @@ for help. from __future__ import print_function -import os, sys, datetime +import os +import sys +import datetime import re # If True, redo with no '-t' option for the test driver. @@ -42,6 +44,7 @@ comp_specs = set() # The "-A arch" for arch_specs. arch_specs = set() + def usage(): print("""\ Usage: redo.py [-F filename_component] [-n] [session_dir] [-d] @@ -60,6 +63,7 @@ possible session directories with names starting with %Y-%m-%d- (for example, 2012-01-23-) and employs the one with the latest timestamp.""") sys.exit(0) + def where(session_dir, test_dir): """Returns the full path to the session directory; None if non-existent.""" abspath = os.path.abspath(session_dir) @@ -77,6 +81,8 @@ def where(session_dir, test_dir): filter_pattern = re.compile("^\./dotest\.py.*-f (.*)$") comp_pattern = re.compile(" -C ([^ ]+) ") arch_pattern = re.compile(" -A ([^ ]+) ") + + def redo(suffix, dir, names): """Visitor function for os.path.walk(path, visit, arg).""" global redo_specs @@ -108,10 +114,11 @@ def redo(suffix, dir, names): comp_specs.add(comp.group(1)) arch = arch_pattern.search(line) if arch: - arch_specs.add(arch.group(1)) + arch_specs.add(arch.group(1)) else: continue + def main(): """Read the session directory and run the failed test cases one by one.""" global no_trace @@ -128,7 +135,8 @@ def main(): index = 1 while index < len(sys.argv): - if sys.argv[index].startswith('-h') or sys.argv[index].startswith('--help'): + if sys.argv[index].startswith( + '-h') or sys.argv[index].startswith('--help'): usage() if sys.argv[index].startswith('-'): @@ -185,8 +193,8 @@ def main(): for arch in arch_specs: archs += "--arch %s " % (arch) - command = "./dotest.py %s %s -v %s %s -f " % (compilers, archs, "" if no_trace else "-t", "-d" if do_delay else "") - + command = "./dotest.py %s %s -v %s %s -f " % ( + compilers, archs, "" if no_trace else "-t", "-d" if do_delay else "") print("Running %s" % (command + filters)) os.system(command + filters) -- cgit v1.2.3