diff --git a/pyuavcan/dsdl_test_data/root_a/1023.ServiceInRootA.uavcan b/pyuavcan/dsdl_test_data/root_a/1023.ServiceInRootA.uavcan deleted file mode 100644 index c3531d5a13..0000000000 --- a/pyuavcan/dsdl_test_data/root_a/1023.ServiceInRootA.uavcan +++ /dev/null @@ -1,7 +0,0 @@ - # -# Test file -# - -root_b.TypeInRootB foo ---- -root_a.ns2.TypeInNs2[<12] foo diff --git a/pyuavcan/dsdl_test_data/root_a/425.TypeInRootA.uavcan b/pyuavcan/dsdl_test_data/root_a/425.TypeInRootA.uavcan deleted file mode 100644 index 6e2b11e780..0000000000 --- a/pyuavcan/dsdl_test_data/root_a/425.TypeInRootA.uavcan +++ /dev/null @@ -1,11 +0,0 @@ - # -# Test file -# - -int2 SMALL_CONST = -2 -int61 CONST = -123456789 -float16 FLOAT_CONST = 1.23 -float16 FLOAT_CONST2 = nan -float16 FLOAT_CONST3 = -inf -root_b.TypeInRootB type_in_root_b -root_a.ns2.TypeInNs2[<5] type_in_ns_2 diff --git a/pyuavcan/dsdl_test_data/root_a/ns1/ns9/425.BeginFirmwareUpdate.uavcan b/pyuavcan/dsdl_test_data/root_a/ns1/ns9/425.BeginFirmwareUpdate.uavcan deleted file mode 100644 index 3963bc6855..0000000000 --- a/pyuavcan/dsdl_test_data/root_a/ns1/ns9/425.BeginFirmwareUpdate.uavcan +++ /dev/null @@ -1,19 +0,0 @@ -# -# Deliberately misformatted definition -# - - root_a.TypeInRootA[<23] type_in_root_a - -float64 CONST = 3.141592653589793 # 123 - - float16[<12] huge_array - -bool a -int2 a_ - ---- - -bool a -float32 CONST = 1.23 -bool ok -uint7[<=128] optional_error_message diff --git a/pyuavcan/dsdl_test_data/root_a/ns2/999.TypeInNs2.uavcan b/pyuavcan/dsdl_test_data/root_a/ns2/999.TypeInNs2.uavcan deleted file mode 100644 index 321cb9b12d..0000000000 --- a/pyuavcan/dsdl_test_data/root_a/ns2/999.TypeInNs2.uavcan +++ /dev/null @@ -1,6 +0,0 @@ -int32 int32 -truncated int2 truncated -saturated bool A = false -truncated bool B = true -float16 C = 70000 / 2 -bool c diff --git a/pyuavcan/dsdl_test_data/root_b/1.TypeInRootB.uavcan b/pyuavcan/dsdl_test_data/root_b/1.TypeInRootB.uavcan deleted file mode 100644 index f6d4952bcc..0000000000 --- a/pyuavcan/dsdl_test_data/root_b/1.TypeInRootB.uavcan +++ /dev/null @@ -1 +0,0 @@ -bool b = true + false \ No newline at end of file diff --git a/pyuavcan/dsdl_test_data/root_b/ns3/2.TypeInB.uavcan b/pyuavcan/dsdl_test_data/root_b/ns3/2.TypeInB.uavcan deleted file mode 100644 index b1cfe267e6..0000000000 --- a/pyuavcan/dsdl_test_data/root_b/ns3/2.TypeInB.uavcan +++ /dev/null @@ -1 +0,0 @@ -# Empty \ No newline at end of file diff --git a/pyuavcan/pyuavcan/dsdl/parser.py b/pyuavcan/pyuavcan/dsdl/parser.py index 2b085038a4..f03d198254 100644 --- a/pyuavcan/pyuavcan/dsdl/parser.py +++ b/pyuavcan/pyuavcan/dsdl/parser.py @@ -516,16 +516,9 @@ if __name__ == '__main__': if not sys.argv[1:]: self_directory = os.path.dirname(__file__) - test_dir = os.path.join(self_directory, '..', '..', 'dsdl_test_data') - test_dir = os.path.normpath(test_dir) -# parser = Parser([os.path.join(test_dir, 'root_a'), os.path.join(test_dir, 'root_b')]) -# t = parser.parse(os.path.join(test_dir, 'root_a', 'ns1', 'ns9', '425.BeginFirmwareUpdate.uavcan')) - t = parse_namespace(os.path.join(test_dir, 'root_a'), [os.path.join(test_dir, 'root_b')]) + test_dir = os.path.join(self_directory, '..', '..', '..', 'dsdl', 'uavcan') + t = parse_namespace(test_dir, []) print(len(t)) else: t = parse_namespace(sys.argv[1], sys.argv[2:]) print(len(t)) -# search_dirs = sys.argv[1:-1] -# filename = sys.argv[-1] -# parser = Parser(search_dirs) -# t = parser.parse(filename)