On 2022/02/26 19:24, Bjorn Ketelaars wrote:
> On Sat 26/02/2022 17:48, Stuart Henderson wrote:
> > py-test-benchmark ideally wants this (easy to patch around, as is done
> > in the current port, but since cpuinfo does actually work on OpenBSD now,
> > why not..)
> > 
> > ok to import?
> 
> Builds, and works for me. I'm seeing two failing tests though. Is this
> something to care about?

Thanks, the dmesg parser doesn't cope with our dmesg cpu attach lines
yet. I don't think it's all that important.

> ============================= test session starts 
> ==============================
> platform openbsd7 -- Python 3.9.10, pytest-4.4.0, py-1.8.0, pluggy-0.13.1
> rootdir: /tmp/ports/pobj/py-cpuinfo-8.0.0-python3/py-cpuinfo-8.0.0
> collected 296 items
> 
> test_suite.py F.......................s................................. [ 
> 19%]
> ........................................................................ [ 
> 43%]
> ..................                                                       [ 
> 50%]
> tests/test_actual.py F                                                   [ 
> 50%]
> tests/test_cli.py ....                                                   [ 
> 51%]
> tests/test_compile_errors.py .                                           [ 
> 52%]
> tests/test_cpuid.py ..                                                   [ 
> 52%]
> tests/test_example.py .                                                  [ 
> 53%]
> tests/test_free_bsd_11_x86_64.py ....                                    [ 
> 54%]
> tests/test_haiku_x86_32.py ...                                           [ 
> 55%]
> tests/test_haiku_x86_64.py ...                                           [ 
> 56%]
> tests/test_haiku_x86_64_beta_1_ryzen_7.py ...                            [ 
> 57%]
> tests/test_invalid_cpu.py ..                                             [ 
> 58%]
> tests/test_linux_aarch64_64.py s...                                      [ 
> 59%]
> tests/test_linux_alt_p9_mipsel_bfk3.py ....                              [ 
> 60%]
> tests/test_linux_beagle_bone_arm.py ....                                 [ 
> 62%]
> tests/test_linux_debian_8_5_x86_64.py .....                              [ 
> 63%]
> tests/test_linux_debian_8_7_1_ppc64le.py .....                           [ 
> 65%]
> tests/test_linux_debian_8_x86_64.py ...                                  [ 
> 66%]
> tests/test_linux_fedora_24_ppc64le.py .....                              [ 
> 68%]
> tests/test_linux_fedora_24_x86_64.py .....                               [ 
> 69%]
> tests/test_linux_fedora_29_x86_64_ryzen_7.py ....                        [ 
> 71%]
> tests/test_linux_fedora_5_s390x.py .....                                 [ 
> 72%]
> tests/test_linux_gentoo_2_2_x86_64.py .....                              [ 
> 74%]
> tests/test_linux_mips64el_loongson3A3000.py ....                         [ 
> 76%]
> tests/test_linux_odroid_c2_aarch64.py .....                              [ 
> 77%]
> tests/test_linux_odroid_xu3_arm_32.py .....                              [ 
> 79%]
> tests/test_linux_raspberry_pi_model_b_arm.py ....                        [ 
> 80%]
> tests/test_linux_rhel_7_3_ppc64le.py .....                               [ 
> 82%]
> tests/test_linux_ubuntu_16_04_x86_64.py .....                            [ 
> 84%]
> tests/test_open_indiana_5_11_x86_64_ryzen_7.py ...                       [ 
> 85%]
> tests/test_osx_10_12_x86_64.py ...                                       [ 
> 86%]
> tests/test_osx_10_9_x86_64.py ...                                        [ 
> 87%]
> tests/test_parse_cpu_string.py ......                                    [ 
> 89%]
> tests/test_parse_errors.py ..                                            [ 
> 89%]
> tests/test_pcbsd_10_x86_64.py ...                                        [ 
> 90%]
> tests/test_selinux.py ....                                               [ 
> 92%]
> tests/test_solaris_11_x86_32.py ...                                      [ 
> 93%]
> tests/test_true_os_18_x86_64_ryzen_7.py ...                              [ 
> 94%]
> tests/test_windows_10_x86_64.py ......                                   [ 
> 96%]
> tests/test_windows_10_x86_64_ryzen_7.py .....                            [ 
> 97%]
> tests/test_windows_8_x86_64.py ......                                    
> [100%]
> 
> =================================== FAILURES 
> ===================================
> _____________________________ TestActual.test_all 
> ______________________________
> 
> self = <test_actual.TestActual testMethod=test_all>
> 
>     def test_all(self):
>       os_type = helpers.get_os_type()
>     
>       if os_type == 'BeOS':
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_registry())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_cpufreq_info())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_lscpu())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_proc_cpuinfo())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_sysctl())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_kstat())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_dmesg())
>               self.assertEqual({}, 
> cpuinfo._get_cpu_info_from_cat_var_run_dmesg_boot())
>               self.assertTrue(len(cpuinfo._get_cpu_info_from_sysinfo()) > 0)
>               #self.assertTrue(len(cpuinfo._get_cpu_info_from_cpuid()) > 0)
>               self.assertTrue(len(cpuinfo.get_cpu_info()) > 0)
>       elif os_type == 'BSD':
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_registry())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_cpufreq_info())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_lscpu())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_proc_cpuinfo())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_sysctl())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_kstat())
> >             self.assertTrue(len(cpuinfo._get_cpu_info_from_dmesg()) > 0)
> E     AssertionError: False is not true
> 
> tests/test_actual.py:38: AssertionError
> _____________________________ TestActual.test_all 
> ______________________________
> 
> self = <test_actual.TestActual testMethod=test_all>
> 
>     def test_all(self):
>       os_type = helpers.get_os_type()
>     
>       if os_type == 'BeOS':
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_registry())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_cpufreq_info())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_lscpu())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_proc_cpuinfo())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_sysctl())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_kstat())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_dmesg())
>               self.assertEqual({}, 
> cpuinfo._get_cpu_info_from_cat_var_run_dmesg_boot())
>               self.assertTrue(len(cpuinfo._get_cpu_info_from_sysinfo()) > 0)
>               #self.assertTrue(len(cpuinfo._get_cpu_info_from_cpuid()) > 0)
>               self.assertTrue(len(cpuinfo.get_cpu_info()) > 0)
>       elif os_type == 'BSD':
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_registry())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_cpufreq_info())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_lscpu())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_proc_cpuinfo())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_sysctl())
>               self.assertEqual({}, cpuinfo._get_cpu_info_from_kstat())
> >             self.assertTrue(len(cpuinfo._get_cpu_info_from_dmesg()) > 0)
> E     AssertionError: False is not true
> 
> tests/test_actual.py:38: AssertionError
> =============== 2 failed, 292 passed, 2 skipped in 46.75 seconds 
> ===============
> *** Error 1 in . (/usr/ports/lang/python/python.port.mk:290 'do-test': @cd 
> /tmp/ports/pobj/py-cpuinfo-8.0.0-python3/py-cpuinfo-8.0.0 && /usr...)
> 

Reply via email to