Skip to content

Commit f2d411e

Browse files
committed
Merge branch 'master' into GPII-1318
* master: GPII-1557: Fixes typo GPII-1557: Specifies minimum Vagrant version requirement GPII-1557: Updates path and builds framework as part of provisioning process GPII-1557: Adds files required for creating test VMs
2 parents 61cb716 + f0d2b57 commit f2d411e

File tree

5 files changed

+61
-0
lines changed

5 files changed

+61
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,16 @@ will be withdrawn soon. You can operate these as follows:
3737
* `build.cmd` will check out GPII's universal project https://github.com/GPII/universal in a subdirectory.
3838
* `start.cmd` will run the GPII personalisation system
3939

40+
# Test VM
4041

42+
It is possible to provision a Windows VM for testing purposes. Please ensure you have met [these VM requirements](https://github.com/GPII/qi-development-environments/#requirements) before proceeding. After that you can use the ``vagrant up`` command to create an instance of a [Windows 10 Evaluation VM](https://github.com/idi-ops/packer-windows) which will boot an instance of the Windows 10 VM, pull in the GPII Framework's npm dependencies, and then build it.
43+
44+
If this is your first time creating this VM a 6.5GB download will take place. The downloaded image will be valid for 90 days after which the Windows installation will no longer be useable. To remove an expired image you can use the ``vagrant box remove "inclusivedesign/windows10-eval"`` command.
45+
46+
Once the VM has finished booting up you can open a command prompt window and use the following commands to test the framework:
47+
48+
```
49+
cd c:\vagrant
50+
node tests\UnitTests.js
51+
node tests\AcceptanceTests.js builtIn
52+
```

Vagrantfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
Vagrant.require_version ">= 1.8.0"
5+
6+
# By default this VM will use 2 processor cores and 2GB of RAM. The 'VM_CPUS' and
7+
# "VM_RAM" environment variables can be used to change that behaviour.
8+
cpus = ENV["VM_CPUS"] || 2
9+
ram = ENV["VM_RAM"] || 2048
10+
11+
Vagrant.configure(2) do |config|
12+
13+
config.vm.box = "inclusivedesign/windows10-eval"
14+
config.vm.guest = :windows
15+
16+
config.vm.communicator = "winrm"
17+
config.winrm.username = "vagrant"
18+
config.winrm.password = "vagrant"
19+
config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct:true
20+
config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "rdp", auto_correct:true
21+
22+
config.vm.provider :virtualbox do |vm|
23+
vm.gui = true
24+
vm.customize ["modifyvm", :id, "--memory", ram]
25+
vm.customize ["modifyvm", :id, "--cpus", cpus]
26+
vm.customize ["modifyvm", :id, "--vram", "128"]
27+
vm.customize ["modifyvm", :id, "--accelerate3d", "on"]
28+
vm.customize ["modifyvm", :id, "--audio", "null", "--audiocontroller", "hda"]
29+
vm.customize ["modifyvm", :id, "--ioapic", "on"]
30+
vm.customize ["setextradata", "global", "GUI/SuppressMessages", "all"]
31+
end
32+
33+
config.vm.provision "shell", inline: <<-SHELL
34+
choco upgrade firefox googlechrome -y
35+
SHELL
36+
37+
config.vm.provision "shell", path: "provisioning/chocolatey-packages.bat"
38+
config.vm.provision "shell", path: "provisioning/npm-packages.bat"
39+
config.vm.provision "shell", path: "provisioning/build.bat"
40+
41+
end

provisioning/build.bat

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
cd c:\vagrant
2+
npm install --ignore-scripts=true
3+
grunt build
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
choco install nodejs -version 0.10.36 --forcex86 -y
2+
choco install nodejs.install -version 0.10.36 --forcex86 -y
3+
setx /M PATH "%PATH%;c:\programdata\chocolatey\lib\nodejs.commandline\tools;c:\users\vagrant\appdata\roaming\npm"

provisioning/npm-packages.bat

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
call npm install grunt-cli -g
2+
call npm install testem -g

0 commit comments

Comments
 (0)