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

Fix multiple --sensor tags and provide tests #10

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

onkobu
Copy link
Contributor

@onkobu onkobu commented Feb 10, 2021

  • multiple --sensor parameters yielded repeated output in message and/ or performance metrics
  • added tests-infrastructure, purely Bash-driven
  • outlined a few terms in README (device, sensor, adapter), also subtle issue with repeated sensor names
  • hints on writing tests in README
  • merged with upstream master
  • new version 1.3, also in HISTORY

- with multiple sensors in one command their output got multiplied/ repeated
- a tests folder with some (Bash-) scripts was added to avoid errors re-occur in the future
- README.md with clarification what a sensor actually is (and a device is not a sensor)
@onkobu
Copy link
Contributor Author

onkobu commented Feb 10, 2021

It was a feeling of uncomfortable insecurity @shakalandy's questions left behind. I made some tests and indeed multiple --sensor-parameters yielded repeated outputs of the same sensor.

I'm also able to explain my initial issue more clearly: First of all I mixed up sensor and device. That's why I added the small section about sensors to the README. In turn my hardware has multiple devices that all use the same sensor-name temp1. That's why I had issues with the simple combination of sensors | awk.

The -n switch introduced with my first PR mitigates this by invoking sensors <sensor> | awk instead. But now --sensor is the device the sensor belongs to – I officially ask for a better idea based on this second PR.

Finally I added some test infrastructure I (and hopefully others) don't break it again with "just a minor change". It is also a good method of collecting sample invocations without possessing the hardware.

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

Successfully merging this pull request may close these issues.

1 participant