File: rules

package info (click to toggle)
python-scrapli 2023.7.30-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 4,512 kB
  • sloc: python: 14,451; makefile: 72
file content (55 lines) | stat: -rwxr-xr-x 3,967 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/usr/bin/make -f

UPSTREAM_GIT := https://github.com/carlmontanari/scrapli
include /usr/share/openstack-pkg-tools/pkgos.make

export PYBUILD_NAME=scrapli
export PYBUILD_TEST_ARGS=-v tests/unit -k 'not test_factory_community_platform_defaults and not test_factory_community_platform_variant and not test_factory_no_scrapli_community_platform and not test_textfsm_get_template and not test_textfsm_parse and not test_ttp_parse and not test_response_parse_textfsm and not test_response_parse_ttp and not test_open_channel_no_session and not test_isalive_no_session and not test_write_exception and not test_socket_open_connection_refused and not test_socket_open_close_isalive and not test_socket_bool'

# Making these work means adding python3-ntc-templates as build-depends,
# though this would be recursive build-depends, so we just skip these tests.
#FAILED tests/unit/test_factory.py::test_factory_community_platform_defaults[sync_factory]
#FAILED tests/unit/test_factory.py::test_factory_community_platform_defaults[async_factory]
#FAILED tests/unit/test_factory.py::test_factory_community_platform_variant[sync_factory]
#FAILED tests/unit/test_factory.py::test_factory_community_platform_variant[async_factory]
#FAILED tests/unit/test_factory.py::test_factory_community_platform_variant_driver_type[sync_factory]
#FAILED tests/unit/test_factory.py::test_factory_community_platform_variant_driver_type[async_factory]
#FAILED tests/unit/test_factory.py::test_factory_no_scrapli_community_platform
#FAILED tests/unit/test_helper.py::test_textfsm_get_template - ModuleNotFoundE...
#FAILED tests/unit/test_helper.py::test_textfsm_parse[to_dict_false] - Attribu...
#FAILED tests/unit/test_helper.py::test_textfsm_parse[to_dict_true] - Attribut...
#FAILED tests/unit/test_helper.py::test_textfsm_parse_string_path[to_dict_false]
#FAILED tests/unit/test_helper.py::test_textfsm_parse_string_path[to_dict_true]
#FAILED tests/unit/test_helper.py::test_textfsm_parse_url_path[to_dict_false]
#FAILED tests/unit/test_helper.py::test_textfsm_parse_url_path[to_dict_true]
#FAILED tests/unit/test_helper.py::test_textfsm_parse_failed_to_parse - Attrib...
#FAILED tests/unit/test_helper.py::test_ttp_parse - AssertionError: assert [] ...
#FAILED tests/unit/test_helper.py::test_ttp_parse_failed_to_parse - assert [] ...
#FAILED tests/unit/test_response.py::test_response_parse_textfsm[to_dict_false]
#FAILED tests/unit/test_response.py::test_response_parse_textfsm[to_dict_true]
#FAILED tests/unit/test_response.py::test_response_parse_textfsm_string_path
#FAILED tests/unit/test_response.py::test_response_parse_ttp - IndexError: lis...
#FAILED tests/unit/test_response.py::test_response_parse_ttp_fail - assert [] ...
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_open_channel_no_session
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_isalive_no_session
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_write_exception

# These are failing because of missing ssh2 module. This module is for ssh to AWS instances.
# I personally don't care about AWS (but care about OpenStack). Anyone willing to fix the
# situation must package python3-ssh2, and add (build-)depends in this package.
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_open_channel_no_session
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_isalive_no_session
#ERROR tests/unit/transport/plugins/ssh2/test_ssh2_transport.py::test_write_exception

# These tests require an sshd to run, which isn't always the case,
# so we simply skip these tests:
# tests/unit/transport/base/test_base_socket.py::test_socket_open_close_isalive
# tests/unit/transport/base/test_base_socket.py::test_socket_bool

%:
	dh $@ --with python3 --buildsystem=pybuild

override_dh_auto_clean:
	rm -rf build *.egg-info .pybuild
	find . -iname '*.pyc' -delete
	for i in $$(find . -type d -iname __pycache__) ; do rm -rf $$i ; done