HorlogeSkynet / archey4

:computer: Maintained fork of the original Archey (Linux) system tool
https://git.io/archey4
GNU General Public License v3.0
291 stars 37 forks source link

Add support for FreeBSD #114

Closed sbz closed 2 years ago

sbz commented 2 years ago

Hi,

I created a new port sysutils/archey4 in our FreeBSD catalog ports tree. It contains all the patches I wrote to add support for the FreeBSD operating systems.

Description

I added the 3 commits to solve the entries detection for the following:

Reason and / or context

Missing entries not detected before these patches

How has this been tested ?

FreeBSD 14.0-CURRENT (development release) and FreeBSD 13.1-RELEASE (latest stable release)

Types of changes :

Checklist :

HorlogeSkynet commented 2 years ago

Many thanks for this upstream patches submission @sbz :pray:

Three things :

  1. Please see my (quick) reviews above ;
  2. Don't forget to fill the checklist in PR OP ;
  3. Do you think we could write some unit tests for your outputs ? Would it be relevant ?

Merci, @++ :wave:

sbz commented 2 years ago

For the reviews, I will reply inline to your comments. Sure, I plan to complete the checklist.

For the unit tests, let me think what we can do 🤝

HorlogeSkynet commented 2 years ago

Up @sbz ! :slightly_smiling_face:


I'm OK to write down the test cases if you give me new command outputs :pray:

sbz commented 2 years ago

Up @sbz ! 🙂

I'm OK to write down the test cases if you give me new command outputs 🙏

@HorlogeSkynet My bad, I've been very busy lately, I will resume that and have look again. I'll try to find some free cycles this week

sbz commented 2 years ago

@HorlogeSkynet I push the tests part. Tests suite are looking ok. I tested them using the following command:

$ python setup.py test
...

----------------------------------------------------------------------
Ran 162 tests in 3.332s

OK

$ python setup.py test 2>&1|egrep --color "sysctl_mem|freebsd_model|sysctl_cpu"
test_parse_sysctl_cpu_model (archey.test.entries.test_archey_cpu.TestCPUEntry)
Check `_parse_sysctl_cpu_model` behavior ... ok
test_fetch_freebsd_model (archey.test.entries.test_archey_model.TestModelEntry)
Test `_fetch_freebsd_model` static method ... ok
test_run_sysctl_mem (archey.test.entries.test_archey_ram.TestRAMEntry)
Test _run_sysctl_mem() ... ok

Feel free to update whatever you want. At this point, it should be good to merge IMHO if it looks good to you.

sbz commented 2 years ago

@HorlogeSkynet Anything missing to merge? I think you can go ahead and do the whitespaces fixes to merge it.