Run DevStack in the gate
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.5KB

  1. #!/bin/bash
  2. # Licensed under the Apache License, Version 2.0 (the "License");
  3. # you may not use this file except in compliance with the License.
  4. # You may obtain a copy of the License at
  5. #
  6. # http://www.apache.org/licenses/LICENSE-2.0
  7. #
  8. # Unless required by applicable law or agreed to in writing, software
  9. # distributed under the License is distributed on an "AS IS" BASIS,
  10. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
  11. # implied.
  12. #
  13. # See the License for the specific language governing permissions and
  14. # limitations under the License.
  15. ERRORS=0
  16. TEMPEST_FULL_MASTER="n-api,n-api-meta,n-cpu,n-sch,n-cond,n-novnc,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,etcd3,tempest,placement-api"
  17. TEMPEST_NEUTRON_MASTER="n-api,n-api-meta,n-cpu,n-sch,n-cond,n-novnc,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,etcd3,tempest,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-metering,placement-api"
  18. TEMPEST_HEAT_SLOW_MASTER="n-api,n-api-meta,n-cpu,n-sch,n-cond,n-novnc,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,etcd3,tempest,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-metering,placement-api"
  19. GRENADE_NEW_MASTER="n-api,n-api-meta,n-cpu,n-sch,n-cond,n-novnc,g-api,g-reg,key,c-api,c-vol,c-sch,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,tempest,placement-api"
  20. GRENADE_SUBNODE_MASTER="n-api-meta,n-cpu,g-api,c-vol,dstat,placement-client"
  21. # Utility function for tests
  22. function assert_list_equal {
  23. local source
  24. local target
  25. source=$(echo $1 | awk 'BEGIN{RS=",";} {print $1}' | sort -V | xargs echo)
  26. target=$(echo $2 | awk 'BEGIN{RS=",";} {print $1}' | sort -V | xargs echo)
  27. if [[ "$target" != "$source" ]]; then
  28. echo -n `caller 0 | awk '{print $2}'`
  29. echo -e " - ERROR\n $target \n != $source"
  30. ERRORS=1
  31. else
  32. # simple backtrace progress detector
  33. echo -n `caller 0 | awk '{print $2}'`
  34. echo " - ok"
  35. fi
  36. }
  37. function test_full_master {
  38. local results
  39. results=$(DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  40. assert_list_equal $TEMPEST_FULL_MASTER $results
  41. }
  42. function test_full_feature_ec {
  43. local results
  44. results=$(DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n -b feature/ec)
  45. assert_list_equal $TEMPEST_FULL_MASTER $results
  46. }
  47. function test_neutron_master {
  48. local results
  49. results=$(DEVSTACK_GATE_NEUTRON=1 DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  50. assert_list_equal $TEMPEST_NEUTRON_MASTER $results
  51. }
  52. function test_heat_slow_master {
  53. local results
  54. results=$(DEVSTACK_GATE_TEMPEST_HEAT_SLOW=1 DEVSTACK_GATE_NEUTRON=1 DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  55. assert_list_equal $TEMPEST_HEAT_SLOW_MASTER $results
  56. }
  57. function test_grenade_new_master {
  58. local results
  59. results=$(DEVSTACK_GATE_TEMPEST_HEAT_SLOW=1 DEVSTACK_GATE_GRENADE=pullup DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  60. assert_list_equal $GRENADE_NEW_MASTER $results
  61. }
  62. function test_grenade_subnode_master {
  63. local results
  64. results=$(DEVSTACK_GATE_GRENADE=pullup DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n -r subnode)
  65. assert_list_equal $GRENADE_SUBNODE_MASTER $results
  66. }
  67. test_full_master
  68. test_full_feature_ec
  69. test_neutron_master
  70. test_heat_slow_master
  71. test_grenade_new_master
  72. test_grenade_subnode_master
  73. if [[ "$ERRORS" -ne 0 ]]; then
  74. echo "Errors detected, job failed"
  75. exit 1
  76. fi