automated: switch to using ID field for distro
Let's standardadize all test cases to use lowercase distro ID field from
/etc/os-release, instead of the 'pretty' (capitalized) name that we used so far.
This is an invasive change, all test scripts were modified with this command:
$ sed -i -e 's|Debian\(.*\))|debian\1)|g' \
-e 's|Ubuntu\(.*\))|ubuntu\1)|g' \
-e 's|CentOS\(.*\))|centos\1)|g' \
-e 's|Fedora\(.*\))|fedora\1)|g' \
-e 's|Unknown\(.*\))|unknown\1)|g'
And the remaining instances were fixed manually.
dist_name() function was updated to always report lowercase distro name. Also
when /etc/os-release is not available and that we use lsb_release output, we
convert the old capitalized name into the new lowercase ones.
Change-Id: I1f1ce0932ab04476567f0338e902656470267a74
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
diff --git a/automated/linux/apache-apache-bench/apache-bench.sh b/automated/linux/apache-apache-bench/apache-bench.sh
index 551ce7f..2395efc 100755
--- a/automated/linux/apache-apache-bench/apache-bench.sh
+++ b/automated/linux/apache-apache-bench/apache-bench.sh
@@ -35,12 +35,12 @@
dist_name
# shellcheck disable=SC2154
case "${dist}" in
- Debian|Ubuntu)
+ debian|ubuntu)
pkgs="apache2 apache2-utils"
install_deps "${pkgs}"
systemctl restart apache2
;;
- CentOS|Fedora)
+ centos|fedora)
pkgs="httpd httpd-tools"
install_deps "${pkgs}"
systemctl start httpd.service