From 2124be5caee6803d5bfe6f7cdc8e3367cb375807 Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Thu, 21 Apr 2022 10:27:37 -0700 Subject: toolchain_utils: s/Cr OS/CrOS/g Result of running `sed -ri 's/Chrom(ium|e) OS/Chrom\1OS/g' $(find -type f)`. BUG=None TEST=None Change-Id: I59be92537aa19bc989f52b585e307e76dbde401b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3600147 Reviewed-by: Manoj Gupta Commit-Queue: George Burgess Tested-by: George Burgess --- seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py') diff --git a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py index 3e7aa4cc..c128ad02 100755 --- a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py +++ b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2021 The Chromium OS Authors. All rights reserved. +# Copyright 2021 The ChromiumOS Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- cgit v1.2.3 From 74bd380a27f4f0e8e90ff2dc1cef0b502d74961b Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Fri, 2 Sep 2022 16:59:27 -0700 Subject: Autoformat all Python code This autoformats all Python code with our new Python formatter, `black`. BUG=b:244644217 TEST=None Change-Id: I15ee49233d98fb6295c0c53c129bbf8e78e0d9ff Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3877337 Tested-by: George Burgess Reviewed-by: Jordan Abrahams-Whitehead Commit-Queue: George Burgess --- .../test_mass_seccomp_editor.py | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py') diff --git a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py index c128ad02..5889dec5 100755 --- a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py +++ b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py @@ -17,20 +17,22 @@ poll: 1 foobar: 1 """ -TEST_FP = 'foo' +TEST_FP = "foo" class TestMassSeccompEditor(unittest.TestCase): - """Test the mass_seccomp_editor.""" + """Test the mass_seccomp_editor.""" - def test_check_missing_sycalls(self): - """Test we can find missing syscalls.""" - with mock.patch('builtins.open', - mock.mock_open(read_data=BASE_SECCOMP_CONTENTS)): - out = mass_seccomp_editor.check_missing_syscalls( - ['fstat', 'dup', 'fizzbuzz'], TEST_FP) - self.assertEqual(out, set(['dup', 'fizzbuzz'])) + def test_check_missing_sycalls(self): + """Test we can find missing syscalls.""" + with mock.patch( + "builtins.open", mock.mock_open(read_data=BASE_SECCOMP_CONTENTS) + ): + out = mass_seccomp_editor.check_missing_syscalls( + ["fstat", "dup", "fizzbuzz"], TEST_FP + ) + self.assertEqual(out, set(["dup", "fizzbuzz"])) -if __name__ == '__main__': - unittest.main() +if __name__ == "__main__": + unittest.main() -- cgit v1.2.3 From fdcd39d5de4bd61cee94cf1e26416838d23092b8 Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 13 Sep 2022 14:19:58 -0400 Subject: Update license boilerplate text in source code files Normally we don't do this, but enough changes have accumulated that we're doing a tree-wide one-off update of the name & style. BUG=chromium:1098010 TEST=`repo upload` works Change-Id: Icb42e5012a87920c2cd13b666fb3e55e7e4fb3b8 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/toolchain-utils/+/3891080 Auto-Submit: Mike Frysinger Tested-by: Mike Frysinger Commit-Queue: George Burgess Reviewed-by: George Burgess --- seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py') diff --git a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py index 5889dec5..c1693da5 100755 --- a/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py +++ b/seccomp_tools/mass_seccomp_editor/test_mass_seccomp_editor.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 -# Copyright 2021 The ChromiumOS Authors. All rights reserved. +# Copyright 2021 The ChromiumOS Authors # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -- cgit v1.2.3