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.

test-features.sh 4.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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-obj,n-cpu,n-sch,n-cond,n-novnc,n-cauth,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,peakmem_tracker,etcd3,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,n-net,placement-api"
  17. TEMPEST_NEUTRON_MASTER="n-api,n-api-meta,n-obj,n-cpu,n-sch,n-cond,n-novnc,n-cauth,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,peakmem_tracker,etcd3,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,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-obj,n-cpu,n-sch,n-cond,n-novnc,n-cauth,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,peakmem_tracker,etcd3,tempest,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,q-svc,q-agt,q-dhcp,q-l3,q-meta,q-metering,placement-api"
  19. GRENADE_NEW_MASTER="n-api,n-api-meta,n-obj,n-cpu,n-sch,n-cond,n-novnc,n-cauth,g-api,g-reg,key,c-api,c-vol,c-sch,c-bak,cinder,s-proxy,s-account,s-container,s-object,mysql,rabbit,dstat,peakmem_tracker,etcd3,tempest,n-net,ceilometer-acompute,ceilometer-acentral,ceilometer-collector,ceilometer-api,ceilometer-alarm-notifier,ceilometer-alarm-evaluator,ceilometer-anotification,placement-api"
  20. # Utility function for tests
  21. function assert_list_equal {
  22. local source
  23. local target
  24. source=$(echo $1 | awk 'BEGIN{RS=",";} {print $1}' | sort -V | xargs echo)
  25. target=$(echo $2 | awk 'BEGIN{RS=",";} {print $1}' | sort -V | xargs echo)
  26. if [[ "$target" != "$source" ]]; then
  27. echo -n `caller 0 | awk '{print $2}'`
  28. echo -e " - ERROR\n $target \n != $source"
  29. ERRORS=1
  30. else
  31. # simple backtrace progress detector
  32. echo -n `caller 0 | awk '{print $2}'`
  33. echo " - ok"
  34. fi
  35. }
  36. function test_full_master {
  37. local results
  38. results=$(DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  39. assert_list_equal $TEMPEST_FULL_MASTER $results
  40. }
  41. function test_full_feature_ec {
  42. local results
  43. results=$(DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n -b feature/ec)
  44. assert_list_equal $TEMPEST_FULL_MASTER $results
  45. }
  46. function test_neutron_master {
  47. local results
  48. results=$(DEVSTACK_GATE_NEUTRON=1 DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  49. assert_list_equal $TEMPEST_NEUTRON_MASTER $results
  50. }
  51. function test_heat_slow_master {
  52. local results
  53. results=$(DEVSTACK_GATE_TEMPEST_HEAT_SLOW=1 DEVSTACK_GATE_NEUTRON=1 DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  54. assert_list_equal $TEMPEST_HEAT_SLOW_MASTER $results
  55. }
  56. function test_grenade_new_master {
  57. local results
  58. results=$(DEVSTACK_GATE_TEMPEST_HEAT_SLOW=1 DEVSTACK_GATE_GRENADE=pullup DEVSTACK_GATE_TEMPEST=1 ./roles/test-matrix/library/test_matrix.py -n)
  59. assert_list_equal $GRENADE_NEW_MASTER $results
  60. }
  61. test_full_master
  62. test_full_feature_ec
  63. test_neutron_master
  64. test_heat_slow_master
  65. test_grenade_new_master
  66. if [[ "$ERRORS" -ne 0 ]]; then
  67. echo "Errors detected, job failed"
  68. exit 1
  69. fi