Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Test Commands Gives an Error #5

Closed
alwinhb opened this issue Aug 24, 2023 · 11 comments
Closed

Make Test Commands Gives an Error #5

alwinhb opened this issue Aug 24, 2023 · 11 comments

Comments

@alwinhb
Copy link

alwinhb commented Aug 24, 2023

I am getting the below error :-

'PYTHONPATH' is not recognized as an internal or external command,
operable program or batch file.
make: *** [Makefile:4: test] Error 1

Can you please GUIDE

@smarek
Copy link
Member

smarek commented Aug 24, 2023 via email

@alwinhb
Copy link
Author

alwinhb commented Aug 25, 2023

@smarek Windows 10.

@smarek
Copy link
Member

smarek commented Aug 26, 2023

Hey @alwinhb so here's the deal

Running tests, is just invocation of "pytest", extra arguments to pytest in Makefile are just for convenience and listing all the details of failed tests, which is handy for debugging/discussion

You can just use pytest without any arguments, or launch it through IDE

@smarek
Copy link
Member

smarek commented Aug 26, 2023

also i wrote the Makefile mainly for linux development, you can really just ignore it and use the ok-dmrlib in your favorite IDE as standard Python project

@smarek
Copy link
Member

smarek commented Aug 26, 2023

So I just tested on Windows machine, just run pytest is working fine

> pip install -e .[test]
> pytest
============================================================================ test session starts ============================================================================
platform win32 -- Python 3.10.11, pytest-7.4.0, pluggy-1.2.0
rootdir: C:\Users\marek\Downloads\ok-dmrlib
plugins: asyncio-0.21.1, cov-4.1.0
asyncio: mode=strict
collected 196 items

okdmr\tests\dmrlib\etsi\crc\test_crc.py ...                                                                                                                            [  1%]
okdmr\tests\dmrlib\etsi\crc\test_crc16.py .                                                                                                                            [  2%]
okdmr\tests\dmrlib\etsi\crc\test_crc32.py .                                                                                                                            [  2%]
okdmr\tests\dmrlib\etsi\crc\test_crc8.py .                                                                                                                             [  3%]
okdmr\tests\dmrlib\etsi\crc\test_crc9.py ..                                                                                                                            [  4%]
okdmr\tests\dmrlib\etsi\fec\test_bptc_196_96.py ....                                                                                                                   [  6%]
okdmr\tests\dmrlib\etsi\fec\test_five_bit_checksum.py .                                                                                                                [  6%]
okdmr\tests\dmrlib\etsi\fec\test_golay_20_8_7.py ..                                                                                                                    [  7%]
okdmr\tests\dmrlib\etsi\fec\test_hamming_13_9_3.py ....                                                                                                                [  9%]
okdmr\tests\dmrlib\etsi\fec\test_hamming_15_11_3.py ...                                                                                                                [ 11%]
okdmr\tests\dmrlib\etsi\fec\test_hamming_16_11_4.py ...                                                                                                                [ 12%]
okdmr\tests\dmrlib\etsi\fec\test_hamming_17_12_3.py ...                                                                                                                [ 14%]
okdmr\tests\dmrlib\etsi\fec\test_hamming_7_4_3.py ...                                                                                                                  [ 15%]
okdmr\tests\dmrlib\etsi\fec\test_quadratic_residue_16_7_6.py ..                                                                                                        [ 16%]
okdmr\tests\dmrlib\etsi\fec\test_reed_solomon_12_9_4.py ..                                                                                                             [ 17%]
okdmr\tests\dmrlib\etsi\fec\test_trellis.py .........                                                                                                                  [ 22%]
okdmr\tests\dmrlib\etsi\fec\test_vbptc_128_72.py ...                                                                                                                   [ 23%]
okdmr\tests\dmrlib\etsi\fec\test_vbptc_32_11.py ..                                                                                                                     [ 25%]
okdmr\tests\dmrlib\etsi\fec\test_vbptc_68_36.py ..                                                                                                                     [ 26%]
okdmr\tests\dmrlib\etsi\layer2\test_burst.py .....                                                                                                                     [ 28%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_data_packet_formats.py .                                                                                                  [ 29%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_data_types.py .                                                                                                           [ 29%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_defined_data_formats.py .                                                                                                 [ 30%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_feature_set_ids.py ..                                                                                                     [ 31%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_fragment_sequence_number.py .                                                                                             [ 31%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_sap_identifier.py .                                                                                                       [ 32%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_slcos.py .                                                                                                                [ 32%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_sync_patterns.py ..                                                                                                       [ 33%]
okdmr\tests\dmrlib\etsi\layer2\elements\test_udt_format.py .                                                                                                           [ 34%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_csbk.py .....                                                                                                                  [ 36%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_data_header.py ...                                                                                                             [ 38%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_embedded_signalling.py .                                                                                                       [ 38%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_full_link_control.py ...                                                                                                       [ 40%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_pi_header.py .                                                                                                                 [ 40%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_rate12_data.py ..                                                                                                              [ 41%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_rate1_data.py ..                                                                                                               [ 42%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_rate34_data.py ...                                                                                                             [ 44%]
okdmr\tests\dmrlib\etsi\layer2\pdu\test_slot_type.py .                                                                                                                 [ 44%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_access_types.py .                                                                                                         [ 45%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_activity_id.py .                                                                                                          [ 45%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_announcement_type.py .                                                                                                    [ 46%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_answer_response.py .                                                                                                      [ 46%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_bits_enums.py .                                                                                                           [ 47%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_channel_timing_opcode.py .                                                                                                [ 47%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_ip_address_identifier.py .                                                                                                [ 48%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_position_error.py ..                                                                                                      [ 49%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_reason_code.py ..                                                                                                         [ 50%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_service_options.py ..                                                                                                     [ 51%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_strict_elements_enums.py ..                                                                                               [ 52%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_talker_alias_data_format.py .                                                                                             [ 53%]
okdmr\tests\dmrlib\etsi\layer3\elements\test_udp_port_identifier.py .                                                                                                  [ 53%]
okdmr\tests\dmrlib\etsi\layer3\pdu\test_udp_ipv4_compressed_header.py ..                                                                                               [ 54%]
okdmr\tests\dmrlib\hytera\test_hytera_ipsc.py ..                                                                                                                       [ 55%]
okdmr\tests\dmrlib\hytera\pdu\test_hdap.py .                                                                                                                           [ 56%]
okdmr\tests\dmrlib\hytera\pdu\test_hrnp.py .......                                                                                                                     [ 59%]
okdmr\tests\dmrlib\hytera\pdu\test_hstrp.py ..                                                                                                                         [ 60%]
okdmr\tests\dmrlib\hytera\pdu\test_lp.py ...                                                                                                                           [ 62%]
okdmr\tests\dmrlib\hytera\pdu\test_radio_ip.py .                                                                                                                       [ 62%]
okdmr\tests\dmrlib\hytera\pdu\test_rcp.py ...                                                                                                                          [ 64%]
okdmr\tests\dmrlib\hytera\pdu\test_rrs.py ....                                                                                                                         [ 66%]
okdmr\tests\dmrlib\hytera\pdu\test_tmp.py ....                                                                                                                         [ 68%]
okdmr\tests\dmrlib\motorola\test_arrp.py .                                                                                                                             [ 68%]
okdmr\tests\dmrlib\motorola\test_ars.py .........                                                                                                                      [ 73%]
okdmr\tests\dmrlib\motorola\test_lrrp.py ..........                                                                                                                    [ 78%]
okdmr\tests\dmrlib\motorola\test_mbxml.py ............                                                                                                                 [ 84%]
okdmr\tests\dmrlib\motorola\test_tms.py .......                                                                                                                        [ 88%]
okdmr\tests\dmrlib\tools\test_dmrlib_tool.py ..                                                                                                                        [ 89%]
okdmr\tests\dmrlib\tools\test_hytera_tool.py .                                                                                                                         [ 89%]
okdmr\tests\dmrlib\tools\test_pcap_tool.py ....                                                                                                                        [ 91%]
okdmr\tests\dmrlib\transmission\test_transmission.py ...........                                                                                                       [ 97%]
okdmr\tests\dmrlib\utils\test_bits_bytes.py ...                                                                                                                        [ 98%]
okdmr\tests\dmrlib\utils\test_logging.py .                                                                                                                             [ 99%]
okdmr\tests\dmrlib\utils\test_parsing.py .                                                                                                                             [100%]

============================================================================ 196 passed in 4.90s ============================================================================

@smarek smarek closed this as completed in 5eac449 Aug 26, 2023
@smarek
Copy link
Member

smarek commented Aug 26, 2023

I just removed PYTHONPATH from Makefile, since it's not required on newer pytest on Windows nor Linux.
You still need to have correct PATH on Windows, or you can use python -m pytest if you have pytest installed but shows up as "Unknown command"

@alwinhb
Copy link
Author

alwinhb commented Apr 2, 2024

@smarek Can you help me with okdmr\tests\dmrlib\etsi\crc\test_crc32.py

I am creating a c++ code equivalent to crc32.py

@smarek
Copy link
Member

smarek commented Apr 2, 2024

@alwinhb sure, if it's opensource, let me know where is your code and what are the obstacles you need help with :)

@alwinhb
Copy link
Author

alwinhb commented Apr 2, 2024

CRC32.txt

@smarek Attached

@smarek
Copy link
Member

smarek commented Apr 2, 2024

I really don't code in C++ often, so this is not trivial for me

I suggest you use code from other projects, CRC is implemented eg. in https://github.com/pd0mz/go-dmr/blob/master/crc.go#L62
or https://github.com/g4klx/MMDVMHost/blob/master/CRC.cpp

Also the data must be in correct order, see https://github.com/OK-DMR/ok-dmrlib/blob/master/okdmr/dmrlib/etsi/crc/crc32.py#L32

@alwinhb
Copy link
Author

alwinhb commented Apr 2, 2024

Thanks @smarek appreciating your time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants