From 9d7be09fa9fcf3960c79faac30aaa2b0707c6007 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Thu, 5 Oct 2017 19:32:31 +0000 Subject: [PATCH] Use = for string comparisons Change I384e4c376076051e7a4a8b2d704107cbe3ac08ad introduced comparisons of $DEVSTACK_PROJECT_FROM_GIT against a couple of hardcoded string values in a bash [[ ]] expression, but incorrectly used the -eq integer comparison operator. This seems to work under normal circumstances, but actually breaks if the string value of the variable contains a "." since the equivalence test tries to fail early if it detects what it thinks is a float value (because it's intended only for integers). Instead of -eq use = for string comparisons here, because that's what the POSIX test(1) utility mandates. Change-Id: If33d7aea9142e650b57c0f58c14e2a4434e30bf0 --- devstack-vm-gate-wrap.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/devstack-vm-gate-wrap.sh b/devstack-vm-gate-wrap.sh index 1cb11c93..8430ae30 100755 --- a/devstack-vm-gate-wrap.sh +++ b/devstack-vm-gate-wrap.sh @@ -72,7 +72,7 @@ PROJECTS="openstack/glance $PROJECTS" PROJECTS="openstack/heat $PROJECTS" PROJECTS="openstack/heat-cfntools $PROJECTS" PROJECTS="openstack/heat-templates $PROJECTS" -if [[ "$DEVSTACK_GATE_HORIZON" -eq "1" || "$DEVSTACK_PROJECT_FROM_GIT" -eq "django_openstack_auth" || "$DEVSTACK_PROJECT_FROM_GIT" -eq "manila-ui" ]] ; then +if [[ "$DEVSTACK_GATE_HORIZON" -eq "1" || "$DEVSTACK_PROJECT_FROM_GIT" = "django_openstack_auth" || "$DEVSTACK_PROJECT_FROM_GIT" = "manila-ui" ]] ; then PROJECTS="openstack/horizon $PROJECTS" PROJECTS="openstack/django_openstack_auth $PROJECTS" PROJECTS="openstack/manila-ui $PROJECTS"