Skip to content

Commit 535ec7f

Browse files
committed
GPII-1557: Adds files required for creating test VMs
1 parent 69f5321 commit 535ec7f

File tree

4 files changed

+57
-0
lines changed

4 files changed

+57
-0
lines changed

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,18 @@ 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).
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 build and test the framework:
47+
48+
```
49+
cd c:\vagrant
50+
npm install --ignore-scripts=true
51+
grunt build
52+
node tests\UnitTests.js
53+
node AcceptanceTests.js builtIn
54+
```

Vagrantfile

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

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)