diff options
author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2017-01-25 12:07:08 +0100 |
---|---|---|
committer | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2017-01-25 12:35:23 +0100 |
commit | b7e3876bb33cdd55f645c2f55f5c9bb57d051eac (patch) | |
tree | d864d552f426abed427b568c7f4288e37f9a9dd0 /automated/linux/sysbench/sysbench.sh | |
parent | 14c77d935aa059e9cad906f996885c163ed17f3f (diff) |
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>
Diffstat (limited to 'automated/linux/sysbench/sysbench.sh')
-rwxr-xr-x | automated/linux/sysbench/sysbench.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/automated/linux/sysbench/sysbench.sh b/automated/linux/sysbench/sysbench.sh index 6c54a84..9aa420d 100755 --- a/automated/linux/sysbench/sysbench.sh +++ b/automated/linux/sysbench/sysbench.sh @@ -56,7 +56,7 @@ else dist_name # shellcheck disable=SC2154 case "${dist}" in - Debian|Ubuntu) + debian|ubuntu) install_deps "git build-essential automake libtool" if echo "${TESTS}" | grep "oltp"; then install_deps "libmysqlclient-dev mysql-server" @@ -66,7 +66,7 @@ else install_sysbench "--without-mysql" fi ;; - Fedora|CentOS) + fedora|centos) install_deps "git gcc make automake libtool" if echo "${TESTS}" | grep "oltp"; then install_deps "mysql-devel mariadb-server mariadb" @@ -76,7 +76,7 @@ else install_sysbench "--without-mysql" fi ;; - Unknown) + unknown) warn_msg "Unsupported distro: package install skipped" ;; esac |