A really simple tool to log battery life tests in linux systems, written in bash.
Ensure that you have the upower or acpi package installed, depending on what your distro supports:
For Debian/Ubuntu:
# upower
sudo apt-get install upower
# acpi
sudo apt-get install acpi
For Fedora:
# upower
sudo dnf install upower
# acpi
sudo dnf install acpi
Give the appropriate permissions to the file:
sudo chmod +x test.sh
Run with:
./test.sh