1. #!/bin/bash
  2. export DEVSTACK_IP=172.18.10.87
  3. export DEVSTACK_DEMO_PASS=demo
  4. git clone http://github.com/openstack/horizon
  5. git clone http://github.com/openstack/sahara-dashboard
  6. cd horizon
  7. export horizon_dir=`pwd`
  8. git fetch https://review.openstack.org/openstack/horizon refs/changes/08/253608/6 && git checkout FETCH_HEAD
  9. #git review -d 253608,6
  10. cd ../sahara-dashboard
  11. export sahara_dir=`pwd`
  12. git fetch https://review.openstack.org/openstack/sahara-dashboard refs/changes/53/253653/4 && git checkout FETCH_HEAD
  13. #git review -d 253653,4
  14. cp sahara_dashboard/enabled/_18*.py ../horizon/openstack_dashboard/local/enabled/
  15. python tools/install_venv.py
  16. rm -rf .venv/src/horizon/
  17. ln -s $horizon_dir .venv/src/horizon
  18. cd ../horizon
  19. python tools/install_venv.py
  20. cp openstack_dashboard/local/local_settings.py.example openstack_dashboard/local/local_settings.py
  21. sed -i "/OPENSTACK_HOST = \"127.0.0.1\"/c\OPENSTACK_HOST = '$DEVSTACK_IP'" openstack_dashboard/local/local_settings.py
  22. echo 'COMPRESS_OFFLINE = True' >> openstack_dashboard/local/local_settings.py
  23. sed -i "/import sys/a\sys.path.append('$sahara_dir')" manage.py
  24. tools/with_venv.sh ./manage.py collectstatic --noinput --clear && tools/with_venv.sh ./manage.py compress
  25. screen -S django-horizon -d -m tools/with_venv.sh ./manage.py runserver
  26. cd ../sahara-dashboard
  27. export conf_file=sahara_dashboard/test/integration_tests/horizon.conf
  28. sed -i '/dashboard_url=http:\/\/localhost\/dashboard\//c\dashboard_url=http://localhost:8000' $conf_file
  29. sed -i '/login_url=http:\/\/localhost\/dashboard\/auth\/login\//c\login_url=http://localhost:8000/auth/login/' $conf_file
  30. sed -i "/password=pass/c\password=$DEVSTACK_DEMO_PASS" $conf_file
  31. tools/with_venv.sh ./run_tests.sh -N --integration