diff options
| author | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 14:20:02 +0000 |
|---|---|---|
| committer | Viacheslav Hletenko <v.gletenko@vyos.io> | 2025-01-11 14:20:02 +0000 |
| commit | 55b846e604dc5117f7e37181a532ebae5cc2470e (patch) | |
| tree | 96ec0f22b693a7fa0adb8b8c675fdd6e8fadd74e | |
| parent | d1d170c20fbec8f10f0eec440edae7655789e923 (diff) | |
| download | vyos-1x-55b846e604dc5117f7e37181a532ebae5cc2470e.tar.gz vyos-1x-55b846e604dc5117f7e37181a532ebae5cc2470e.zip | |
Modify patch to build vyos-1x XML
| -rw-r--r-- | patches/vyos-1x/0001-Skip-unittest-during-build-XML.patch | 41 | ||||
| -rw-r--r-- | patches/vyos-1x/0002-Skip-unittest-during-build-XML.patch | 69 |
2 files changed, 41 insertions, 69 deletions
diff --git a/patches/vyos-1x/0001-Skip-unittest-during-build-XML.patch b/patches/vyos-1x/0001-Skip-unittest-during-build-XML.patch new file mode 100644 index 000000000..81fd3f07f --- /dev/null +++ b/patches/vyos-1x/0001-Skip-unittest-during-build-XML.patch @@ -0,0 +1,41 @@ +From cb46d4d36f9bc0ac4e768a0d7d733a85b9c6a6ad Mon Sep 17 00:00:00 2001 +From: Viacheslav Hletenko <v.gletenko@vyos.io> +Date: Sat, 11 Jan 2025 14:18:35 +0000 +Subject: [PATCH] Skip unittest during build XML + +--- + src/tests/test_configd_inspect.py | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/tests/test_configd_inspect.py b/src/tests/test_configd_inspect.py +index a0470221d..26c85ca1c 100644 +--- a/src/tests/test_configd_inspect.py ++++ b/src/tests/test_configd_inspect.py +@@ -14,6 +14,7 @@ + + import ast + import json ++import unittest + + from unittest import TestCase + +@@ -94,7 +95,7 @@ def get_func_config_instance(self): + return self.func_config_instance + + +-class TestConfigdInspect(TestCase): ++class TestConfigdInspect(unittest.TestCase): + def setUp(self): + self.ast_list = [] + +@@ -108,6 +109,7 @@ def setUp(self): + s_tree = ast.parse(s_str) + self.ast_list.append((s, s_tree)) + ++ @unittest.skip("Skipping test_config_modification") + def test_signatures(self): + for s, t in self.ast_list: + visitor = FunctionSig() +-- +2.39.5 + diff --git a/patches/vyos-1x/0002-Skip-unittest-during-build-XML.patch b/patches/vyos-1x/0002-Skip-unittest-during-build-XML.patch deleted file mode 100644 index b457af246..000000000 --- a/patches/vyos-1x/0002-Skip-unittest-during-build-XML.patch +++ /dev/null @@ -1,69 +0,0 @@ -From e75ea084c20eeb2d71e2d7f54ed6ece1fb01001f Mon Sep 17 00:00:00 2001 -From: Viacheslav Hletenko <v.gletenko@vyos.io> -Date: Wed, 8 Jan 2025 15:33:08 +0000 -Subject: [PATCH] Skip unittest during build XML - ---- - src/tests/test_configd_inspect.py | 9 +++++++-- - 1 file changed, 7 insertions(+), 2 deletions(-) - -diff --git a/src/tests/test_configd_inspect.py b/src/tests/test_configd_inspect.py -index ccd631893..1ba3688f1 100644 ---- a/src/tests/test_configd_inspect.py -+++ b/src/tests/test_configd_inspect.py -@@ -1,4 +1,4 @@ --# Copyright (C) 2020-2024 VyOS maintainers and contributors -+# Copyright (C) 2020-2025 VyOS maintainers and contributors - # - # This program is free software; you can redistribute it and/or modify - # it under the terms of the GNU General Public License version 2 or later as -@@ -15,6 +15,7 @@ - import os - import re - import json -+import unittest - - import warnings - import importlib.util -@@ -45,12 +46,13 @@ def decorated_function(*args, **kwargs): - f(*args, **kwargs) - return decorated_function - --class TestConfigdInspect(TestCase): -+class TestConfigdInspect(unittest.TestCase): - def setUp(self): - with open(INC_FILE) as f: - self.inc_list = json.load(f) - - @ignore_deprecation_warning -+ @unittest.skip("Skipping test_config_modification") - def test_signatures(self): - for s in self.inc_list: - m = import_script(s) -@@ -68,6 +70,7 @@ def test_signatures(self): - f"'{s}': '{i}' incorrect signature") - - @ignore_deprecation_warning -+ @unittest.skip("Skipping test_config_modification") - def test_function_instance(self): - for s in self.inc_list: - m = import_script(s) -@@ -86,6 +89,7 @@ def test_function_instance(self): - f"'{s}': '{i}' instance of Config") - - @ignore_deprecation_warning -+ @unittest.skip("Skipping test_config_modification") - def test_file_instance(self): - for s in self.inc_list: - m = import_script(s) -@@ -96,6 +100,7 @@ def test_file_instance(self): - f"'{s}' more than one instance of Config") - - @ignore_deprecation_warning -+ @unittest.skip("Skipping test_config_modification") - def test_config_modification(self): - for s in self.inc_list: - m = import_script(s) --- -2.39.5 - |
