+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_absolute_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_description_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ec_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ec_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_freq_0(config_fail_test):
- config_fail_test()
-
-
-def test_freq_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_freq_neg(config_fail_test):
- config_fail_test()
-
-
-def test_offset_cycles_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_offset_cycles_neg(config_fail_test):
- config_fail_test()
-
-
-def test_offset_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_offset_seconds_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_offset_seconds_neg(config_fail_test):
- config_fail_test()
-
-
-def test_offset_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_rct_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_uuid_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_uuid_invalid(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_metadata_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_metadata_no(config_fail_test):
- config_fail_test()
-
-
-def test_options_gen_default_stream_def_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_options_gen_prefix_def_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_options_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_options_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_prefix_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_prefix_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_version_invalid_19(config_fail_test):
- config_fail_test()
-
-
-def test_version_invalid_23(config_fail_test):
- config_fail_test()
-
-
-def test_version_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_version_no(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_ct_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ct_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_ll_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ll_non_existing(config_fail_test):
- config_fail_test()
-
-
-def test_no_fields_at_all(config_fail_test):
- config_fail_test()
-
-
-def test_pt_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_pt_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_file_not_found(config_fail_test):
- config_fail_test()
-
-
-def test_file_not_found_abs(config_fail_test):
- config_fail_test()
-
-
-def test_file_not_found_in_array(config_fail_test):
- config_fail_test()
-
-
-def test_file_not_found_recursive(config_fail_test):
- config_fail_test()
-
-
-def test_cycle(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_clocks_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_clocks_key_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_default_stream_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_default_stream_stream_default_duplicate(config_fail_test):
- config_fail_test()
-
-
-def test_default_stream_unknown_stream(config_fail_test):
- config_fail_test()
-
-
-def test_env_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_env_key_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_env_value_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ll_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ll_value_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_multiple_streams_trace_ph_no_stream_id(config_fail_test):
- config_fail_test()
-
-
-def test_streams_empty(config_fail_test):
- config_fail_test()
-
-
-def test_streams_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_streams_key_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_streams_no(config_fail_test):
- config_fail_test()
-
-
-def test_ta_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_trace_empty(config_fail_test):
- config_fail_test()
-
-
-def test_trace_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_trace_no(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_default_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ect_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ect_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_eht_id_no_multiple_events(config_fail_test):
- config_fail_test()
-
-
-def test_eht_id_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_eht_id_too_small(config_fail_test):
- config_fail_test()
-
-
-def test_eht_id_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_eht_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_eht_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_eht_timestamp_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_eht_timestamp_wrong_pm(config_fail_test):
- config_fail_test()
-
-
-def test_eht_timestamp_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_events_empty(config_fail_test):
- config_fail_test()
-
-
-def test_events_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_events_key_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_events_no(config_fail_test):
- config_fail_test()
-
-
-def test_pct_cs_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_pct_cs_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_pct_cs_yes_ps_no(config_fail_test):
- config_fail_test()
-
-
-def test_pct_ed_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_pct_ed_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_pct_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_pct_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_pct_no(config_fail_test):
- config_fail_test()
-
-
-def test_pct_ps_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_pct_ps_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_pct_ps_yes_cs_no(config_fail_test):
- config_fail_test()
-
-
-def test_pct_tb_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_pct_tb_te_different_clocks(config_fail_test):
- config_fail_test()
-
-
-def test_pct_tb_wrong_pm(config_fail_test):
- config_fail_test()
-
-
-def test_pct_tb_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_pct_tb_yes_te_no(config_fail_test):
- config_fail_test()
-
-
-def test_pct_te_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_pct_te_wrong_pm(config_fail_test):
- config_fail_test()
-
-
-def test_pct_te_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_pct_te_yes_tb_no(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_bo_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_bo_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_bo_no(config_fail_test):
- config_fail_test()
-
-
-def test_ph_magic_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_ph_magic_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_ph_magic_wrong_size(config_fail_test):
- config_fail_test()
-
-
-def test_ph_not_struct(config_fail_test):
- config_fail_test()
-
-
-def test_ph_streamid_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_ph_streamid_too_small(config_fail_test):
- config_fail_test()
-
-
-def test_ph_streamid_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_et_not_int(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_et_wrong_align(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_et_wrong_signed(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_et_wrong_size(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_not_array(config_fail_test):
- config_fail_test()
-
-
-def test_ph_uuid_wrong_length(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_uuid_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_uuid_invalid_uuid(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_inherit_forward(config_fail_test):
- config_fail_test()
-
-
-def test_inherit_unknown(config_fail_test):
- config_fail_test()
-
-
-def test_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_no_class(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_members_el_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_members_el_member_label_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_members_el_member_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_members_el_member_value_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_members_el_member_value_outside_range_signed(config_fail_test):
- config_fail_test()
-
-
-def test_members_el_member_value_outside_range_unsigned(config_fail_test):
- config_fail_test()
-
-
-def test_members_empty(config_fail_test):
- config_fail_test()
-
-
-def test_members_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_members_no(config_fail_test):
- config_fail_test()
-
-
-def test_members_overlap(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_vt_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_vt_no(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_align_0(config_fail_test):
- config_fail_test()
-
-
-def test_align_3(config_fail_test):
- config_fail_test()
-
-
-def test_align_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_bo_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_bo_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_size_exp_mant_wrong_sum(config_fail_test):
- config_fail_test()
-
-
-def test_size_exp_no(config_fail_test):
- config_fail_test()
-
-
-def test_size_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_size_mant_no(config_fail_test):
- config_fail_test()
-
-
-def test_size_no(config_fail_test):
- config_fail_test()
-
-
-def test_size_unknown_prop(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_align_0(config_fail_test):
- config_fail_test()
-
-
-def test_align_3(config_fail_test):
- config_fail_test()
-
-
-def test_align_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_base_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_base_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_bo_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_bo_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_pm_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_pm_property_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_pm_type_invalid(config_fail_test):
- config_fail_test()
-
-
-def test_pm_unknown_clock(config_fail_test):
- config_fail_test()
-
-
-def test_signed_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_size_0(config_fail_test):
- config_fail_test()
-
-
-def test_size_65(config_fail_test):
- config_fail_test()
-
-
-def test_size_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_size_no(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_fields_field_invalid_identifier(config_fail_test):
- config_fail_test()
-
-
-def test_fields_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_ma_0(config_fail_test):
- config_fail_test()
-
-
-def test_ma_3(config_fail_test):
- config_fail_test()
-
-
-def test_ma_invalid_type(config_fail_test):
- config_fail_test()
-
-
-def test_unknown_prop(config_fail_test):
- config_fail_test()
+++ /dev/null
-# The MIT License (MIT)
-#
-# Copyright (c) 2020 Philippe Proulx <pproulx@efficios.com>
-#
-# Permission is hereby granted, free of charge, to any person obtaining
-# a copy of this software and associated documentation files (the
-# "Software"), to deal in the Software without restriction, including
-# without limitation the rights to use, copy, modify, merge, publish,
-# distribute, sublicense, and/or sell copies of the Software, and to
-# permit persons to whom the Software is furnished to do so, subject to
-# the following conditions:
-#
-# The above copyright notice and this permission notice shall be
-# included in all copies or substantial portions of the Software.
-#
-# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-# IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-# CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
-def test_invalid(config_fail_test):
- config_fail_test()
import barectf
-@pytest.fixture
-def config_fail_test(yaml_cfg_path):
- def func():
- yaml_dir = os.path.dirname(yaml_cfg_path)
+def pytest_collect_file(parent, path):
+ yaml_ext = '.yaml'
- with open(yaml_cfg_path) as f:
+ if path.ext != yaml_ext:
+ # not a YAML file: cancel
+ return
+
+ # At the end of this loop, if `path` is
+ # `/home/jo/barectf/tests/config/yaml/2/configs/fail/stream/pct-no.yaml`,
+ # for example, then `elems` is:
+ #
+ # * `pct-no.yaml`
+ # * `stream`
+ # * `fail`
+ path_str = str(path)
+ elems = []
+
+ while True:
+ elem = os.path.basename(path_str)
+
+ if elem == 'configs':
+ break
+
+ elems.append(elem)
+ path_str = os.path.dirname(path_str)
+
+ if 'fail' not in elems:
+ return
+
+ # create a unique test name
+ name = f'test-{"-".join(reversed(elems))}'.replace(yaml_ext, '')
+
+ # create the file node
+ return _YamlFile.from_parent(parent, fspath=path, name=name)
+
+
+class _YamlFile(pytest.File):
+ def __init__(self, parent, fspath, name):
+ super().__init__(parent=parent, fspath=fspath)
+ self._name = name
+
+ def collect(self):
+ # yield a single item
+ yield _YamlItem.from_parent(self, name=self._name)
+
+
+class _YamlItem(pytest.Item):
+ def __init__(self, parent, name):
+ super().__init__(parent=parent, name=name)
+
+ def runtest(self):
+ yaml_dir = self.fspath.dirname
+
+ with open(str(self.fspath)) as f:
with pytest.raises(barectf._ConfigurationParseError):
barectf.configuration_from_file(f, inclusion_directories=[yaml_dir])
- return func
+ def repr_failure(self, excinfo, style=None):
+ return f'`{self.fspath}` did not make barectf.configuration_from_file() raise `barectf._ConfigurationParseError`: {excinfo}.'
+
+ def reportinfo(self):
+ return self.fspath, None, self.name