diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-09 06:21:23 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2022-05-09 06:21:23 +0000 |
commit | da931ea978ba63dc9b9d640e2c44ed91e09b2abc (patch) | |
tree | b0522edde1d3c5356c95eb1ee2eae3e87befa1f3 /llvm_tools/patch_manager_unittest.py | |
parent | 044c02a61ef920f082cc93ebfd6d8d9eb33a89c8 (diff) | |
parent | 178e686da38f18bbc35b0f1903c93effa94bc6b4 (diff) | |
download | toolchain-utils-da931ea978ba63dc9b9d640e2c44ed91e09b2abc.tar.gz |
Snap for 8558685 from 178e686da38f18bbc35b0f1903c93effa94bc6b4 to tm-frc-networking-releaset_frc_net_330443000android13-frc-networking-release
Change-Id: I0ecce9cdaefa8b5d8923e59fbee11a21e2971889
Diffstat (limited to 'llvm_tools/patch_manager_unittest.py')
-rwxr-xr-x | llvm_tools/patch_manager_unittest.py | 112 |
1 files changed, 78 insertions, 34 deletions
diff --git a/llvm_tools/patch_manager_unittest.py b/llvm_tools/patch_manager_unittest.py index 62947ed1..69bb683e 100755 --- a/llvm_tools/patch_manager_unittest.py +++ b/llvm_tools/patch_manager_unittest.py @@ -182,7 +182,9 @@ class PatchManagerTest(unittest.TestCase): test_patch = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_stdout.patch', - 'end_version': 1000 + 'version_range': { + 'until': 1000, + } } self.assertEqual( @@ -275,7 +277,9 @@ class PatchManagerTest(unittest.TestCase): patch = [{ 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 10 + 'version_range': { + 'from': 10, + }, }] abs_patch_path = '/abs/path/to/filesdir/PATCHES' @@ -293,13 +297,17 @@ class PatchManagerTest(unittest.TestCase): test_updated_patch_metadata = [{ 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 10 + 'version_range': { + 'from': 10, + } }] expected_patch_metadata = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 10 + 'version_range': { + 'from': 10, + } } with CreateTemporaryJsonFile() as json_test_file: @@ -335,7 +343,9 @@ class PatchManagerTest(unittest.TestCase): test_patch_metadata = [{ 'comment': 'Redirects output to stdout', 'rel_patch_path': rel_patch_path, - 'start_version': 10 + 'version_range': { + 'from': 10, + } }] with CreateTemporaryJsonFile() as json_test_file: @@ -379,7 +389,9 @@ class PatchManagerTest(unittest.TestCase): test_patch_metadata = [{ 'comment': 'Redirects output to stdout', 'rel_patch_path': rel_patch_path, - 'start_version': 1000 + 'version_range': { + 'from': 1000, + }, }] with CreateTemporaryJsonFile() as json_test_file: @@ -415,28 +427,36 @@ class PatchManagerTest(unittest.TestCase): test_patch_1 = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 1000, - 'end_version': 1250 + 'version_range': { + 'from': 1000, + 'until': 1250 + } } test_patch_2 = { 'comment': 'Fixes input', 'rel_patch_path': 'cherry/fixes_input.patch', - 'start_version': 1000 + 'version_range': { + 'from': 1000 + } } test_patch_3 = { 'comment': 'Adds a warning', 'rel_patch_path': 'add_warning.patch', - 'start_version': 750, - 'end_version': 1500 + 'version_range': { + 'from': 750, + 'until': 1500 + } } test_patch_4 = { 'comment': 'Adds a helper function', 'rel_patch_path': 'add_helper.patch', - 'start_version': 20, - 'end_version': 900 + 'version_range': { + 'from': 20, + 'until': 900 + } } test_patch_metadata = [ @@ -520,28 +540,36 @@ class PatchManagerTest(unittest.TestCase): test_patch_1 = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 1000, - 'end_version': 1190 + 'version_range': { + 'from': 1000, + 'until': 1190 + } } test_patch_2 = { 'comment': 'Fixes input', 'rel_patch_path': 'cherry/fixes_input.patch', - 'start_version': 1000 + 'version_range': { + 'from': 1000 + } } test_patch_3 = { 'comment': 'Adds a warning', 'rel_patch_path': 'add_warning.patch', - 'start_version': 750, - 'end_version': 1500 + 'version_range': { + 'from': 750, + 'until': 1500 + } } test_patch_4 = { 'comment': 'Adds a helper function', 'rel_patch_path': 'add_helper.patch', - 'start_version': 20, - 'end_version': 2000 + 'version_range': { + 'from': 20, + 'until': 2000 + } } test_patch_metadata = [ @@ -654,8 +682,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_1 = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 1000, - 'end_version': 1190 + 'version_range': { + 'from': 1000, + 'until': 1190 + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -665,7 +695,9 @@ class PatchManagerTest(unittest.TestCase): test_patch_2 = { 'comment': 'Fixes input', 'rel_patch_path': 'cherry/fixes_input.patch', - 'start_version': 1000 + 'version_range': { + 'from': 1000 + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -674,8 +706,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_3 = { 'comment': 'Adds a warning', 'rel_patch_path': 'add_warning.patch', - 'start_version': 750, - 'end_version': 1500 + 'version_range': { + 'from': 750, + 'until': 1500 + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -684,8 +718,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_4 = { 'comment': 'Adds a helper function', 'rel_patch_path': 'add_helper.patch', - 'start_version': 20, - 'end_version': 1400 + 'version_range': { + 'from': 20, + 'until': 1400 + } } test_patch_metadata = [ @@ -786,8 +822,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_1 = { 'comment': 'Redirects output to stdout', 'rel_patch_path': 'cherry/fixes_output.patch', - 'start_version': 1000, - 'end_version': 1190 + 'version_range': { + 'from': 1000, + 'until': 1190 + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -797,7 +835,9 @@ class PatchManagerTest(unittest.TestCase): test_patch_2 = { 'comment': 'Fixes input', 'rel_patch_path': 'cherry/fixes_input.patch', - 'start_version': 1000 + 'version_range': { + 'from': 1000, + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -806,8 +846,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_3 = { 'comment': 'Adds a warning', 'rel_patch_path': 'add_warning.patch', - 'start_version': 750, - 'end_version': 1500 + 'version_range': { + 'from': 750, + 'until': 1500 + } } # For the 'remove_patches' mode, this patch is expected to be in the @@ -816,8 +858,10 @@ class PatchManagerTest(unittest.TestCase): test_patch_4 = { 'comment': 'Adds a helper function', 'rel_patch_path': 'add_helper.patch', - 'start_version': 1600, - 'end_version': 2000 + 'version_range': { + 'from': 1600, + 'until': 2000 + } } test_patch_metadata = [ |