Update Vagrant Windows support (#17205)
* Update Vagrantfile with Hyper-V support * Correction to name. * Exclude files in Vagrant provision testspull/17419/head
parent
0dd3640c78
commit
f23708ce6f
|
@ -13,4 +13,12 @@ Vagrant.configure(2) do |config|
|
||||||
vb.cpus = 2
|
vb.cpus = 2
|
||||||
vb.customize ['modifyvm', :id, '--memory', '1024']
|
vb.customize ['modifyvm', :id, '--memory', '1024']
|
||||||
end
|
end
|
||||||
|
config.vm.provider :hyperv do |h, override|
|
||||||
|
override.vm.box = "generic/debian9"
|
||||||
|
override.vm.hostname = "contrib-stretch"
|
||||||
|
h.vmname = "home-assistant"
|
||||||
|
h.cpus = 2
|
||||||
|
h.memory = 1024
|
||||||
|
h.maxmemory = 1024
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -0,0 +1,50 @@
|
||||||
|
@echo off
|
||||||
|
call:main %*
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:usage
|
||||||
|
echo.############################################################
|
||||||
|
echo.
|
||||||
|
echo.Use `./provision.bat` to interact with HASS. E.g:
|
||||||
|
echo.
|
||||||
|
echo.- setup the environment: `./provision.bat start`
|
||||||
|
echo.- restart HASS process: `./provision.bat restart`
|
||||||
|
echo.- run test suit: `./provision.bat tests`
|
||||||
|
echo.- destroy the host and start anew: `./provision.bat recreate`
|
||||||
|
echo.
|
||||||
|
echo.Official documentation at https://home-assistant.io/docs/installation/vagrant/
|
||||||
|
echo.
|
||||||
|
echo.############################################################'
|
||||||
|
goto:eof
|
||||||
|
|
||||||
|
:main
|
||||||
|
if "%*"=="setup" (
|
||||||
|
if exist setup_done del setup_done
|
||||||
|
vagrant up --provision
|
||||||
|
copy /y nul setup_done
|
||||||
|
) else (
|
||||||
|
if "%*"=="tests" (
|
||||||
|
copy /y nul run_tests
|
||||||
|
vagrant provision
|
||||||
|
) else (
|
||||||
|
if "%*"=="restart" (
|
||||||
|
copy /y nul restart
|
||||||
|
vagrant provision
|
||||||
|
) else (
|
||||||
|
if "%*"=="start" (
|
||||||
|
vagrant up --provision
|
||||||
|
) else (
|
||||||
|
if "%*"=="stop" (
|
||||||
|
vagrant halt
|
||||||
|
) else (
|
||||||
|
if "%*"=="destroy" (
|
||||||
|
vagrant destroy -f
|
||||||
|
) else (
|
||||||
|
if "%*"=="recreate" (
|
||||||
|
if exist setup_done del setup_done
|
||||||
|
if exist restart del restart
|
||||||
|
vagrant destroy -f
|
||||||
|
vagrant up --provision
|
||||||
|
) else (
|
||||||
|
call:usage
|
||||||
|
)))))))
|
|
@ -76,6 +76,10 @@ run_tests() {
|
||||||
rsync -a --delete \
|
rsync -a --delete \
|
||||||
--exclude='*.tox' \
|
--exclude='*.tox' \
|
||||||
--exclude='*.git' \
|
--exclude='*.git' \
|
||||||
|
--exclude='.vagrant' \
|
||||||
|
--exclude='lib64' \
|
||||||
|
--exclude='bin/python' \
|
||||||
|
--exclude='bin/python3' \
|
||||||
/home-assistant/ /home-assistant-tests/
|
/home-assistant/ /home-assistant-tests/
|
||||||
cd /home-assistant-tests && tox || true
|
cd /home-assistant-tests && tox || true
|
||||||
echo '############################################################'
|
echo '############################################################'
|
||||||
|
|
Loading…
Reference in New Issue