From 33c82eb591fdb0fae1b89135ff931bc65094a100 Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Thu, 23 Apr 2020 21:03:18 +0200 Subject: [PATCH 1/3] GPII-4195: Add 1909 and LTSC Windows 10 version to Vagrantfile --- Vagrantfile | 36 ++++++++++++++---------------------- provisioning/Chocolatey.ps1 | 4 ++-- 2 files changed, 16 insertions(+), 24 deletions(-) diff --git a/Vagrantfile b/Vagrantfile index 60508370e..336d8c000 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -10,30 +10,22 @@ ram = ENV["VM_RAM"] || 2048 Vagrant.configure(2) do |config| - config.vm.box = "inclusivedesign/windows10-eval-x64-Apps" - config.vm.guest = :windows - - config.vm.communicator = "winrm" - config.winrm.username = "vagrant" - config.winrm.password = "vagrant" - config.vm.network :forwarded_port, guest: 3389, host: 3389, id: "rdp", auto_correct:true - config.vm.network :forwarded_port, guest: 5985, host: 5985, id: "rdp", auto_correct:true - - config.vm.provider :virtualbox do |vm| - vm.gui = true - vm.customize ["modifyvm", :id, "--memory", ram] - vm.customize ["modifyvm", :id, "--cpus", cpus] - vm.customize ["modifyvm", :id, "--vram", "256"] - vm.customize ["modifyvm", :id, "--accelerate3d", "off"] - vm.customize ["modifyvm", :id, "--audio", "null", "--audiocontroller", "hda"] - vm.customize ["modifyvm", :id, "--ioapic", "on"] - vm.customize ["setextradata", "global", "GUI/SuppressMessages", "all"] + ["LTSC", "1909"].each do |flavour| + config.vm.define "#{flavour}" do |latest| + latest.vm.box = "gpii-ops/windows10-#{flavour}-eval-x64-universal" + latest.vm.provider :virtualbox do |vm| + vm.gui = true + vm.customize ["modifyvm", :id, "--memory", ram] + vm.customize ["modifyvm", :id, "--cpus", cpus] + vm.customize ["modifyvm", :id, "--vram", "256"] + vm.customize ["modifyvm", :id, "--accelerate3d", "off"] + vm.customize ["modifyvm", :id, "--audio", "null", "--audiocontroller", "hda"] + vm.customize ["modifyvm", :id, "--ioapic", "on"] + vm.customize ["setextradata", "global", "GUI/SuppressMessages", "all"] + end + end end - config.vm.provision "shell", inline: <<-SHELL - choco upgrade firefox googlechrome -y - SHELL - # Provide original script path for use in relative paths, since vagrant copies the script to a temporary location config.vm.provision "shell", path: "provisioning/Chocolatey.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" config.vm.provision "shell", path: "provisioning/CouchDB.ps1", args: "-originalBuildScriptPath \"C:\\vagrant\\provisioning\\\"" diff --git a/provisioning/Chocolatey.ps1 b/provisioning/Chocolatey.ps1 index b01ac70c7..17b5db9cf 100644 --- a/provisioning/Chocolatey.ps1 +++ b/provisioning/Chocolatey.ps1 @@ -16,7 +16,7 @@ $chocolatey = "$env:ChocolateyInstall\bin\choco.exe" -f $env:SystemDrive $nodePath = "C:\Program Files (x86)\nodejs" $nodeVersion = "10.11.0" -Invoke-Command $chocolatey "install nodejs.install --version $($nodeVersion) --forcex86 -y" +Invoke-Command $chocolatey "install nodejs.install --version $($nodeVersion) --forcex86 -y --no-progress" # TODO: Correct path and automatically added is this one # C:\Users\vagrant\AppData\Roaming\npm review it. #Add-Path $nodePath $true @@ -26,7 +26,7 @@ Invoke-Environment (Join-Path $nodePath "nodevars.bat") refreshenv $python2Path = "C:\tools\python2" -Invoke-Command $chocolatey "install python2 -y" +Invoke-Command $chocolatey "install python2 -y --no-progress" Add-Path $python2Path $true refreshenv From f95ef6f1e29f5c478bc516387c56c73053df45fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javier=20Hern=C3=A1ndez?= Date: Mon, 27 Apr 2020 19:33:42 +0200 Subject: [PATCH 2/3] GPII-4195: Updated languageTests to support testing on LTSC and postLTSC --- .../gpii-localisation/test/testLanguage.js | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/gpii/node_modules/gpii-localisation/test/testLanguage.js b/gpii/node_modules/gpii-localisation/test/testLanguage.js index 1b060b4f3..3b7996fc5 100644 --- a/gpii/node_modules/gpii-localisation/test/testLanguage.js +++ b/gpii/node_modules/gpii-localisation/test/testLanguage.js @@ -18,10 +18,18 @@ "use strict"; -var fluid = require("gpii-universal"); +var fluid = require("gpii-universal"), + os = require("os"), + semver = require("semver"); + var jqUnit = fluid.require("node-jqunit"); var gpii = fluid.registerNamespace("gpii"); +// We determine whether this is a postLTSC version of Windows 10. +// Windows 10 LTSC Version 1809 (OS build 17763), see: +// https://docs.microsoft.com/en-us/windows/release-information/ +var postLTSC = semver.gt(os.release(), "10.0.17763")? true: false; + require("../src/language.js"); fluid.registerNamespace("gpii.tests.windows.language"); @@ -177,7 +185,7 @@ gpii.tests.windows.language.nameTests = fluid.freezeRecursive([ "bg-GB": { "english": "Bulgarian (bg-GB)", "local": "Bulgarian (bg-GB)", - "native": "български (bg-GB)", + "native": (postLTSC? "български (bg-GB)": ""), "code": "bg-GB" }, "ta-LK": { @@ -195,7 +203,7 @@ gpii.tests.windows.language.nameTests = fluid.freezeRecursive([ "en-xyz": { "english": "English (en-xyz)", "local": "English (en-xyz)", - "native": "English (en-xyz)", + "native": (postLTSC? "English (en-xyz)": ""), "code": "en-xyz" } } From e4e405509326dd51caa587378d6ad69a3d3239c3 Mon Sep 17 00:00:00 2001 From: Alfredo Matas Date: Wed, 6 May 2020 13:13:21 +0200 Subject: [PATCH 3/3] GPII-4195: Speed up the VM creation --- Vagrantfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Vagrantfile b/Vagrantfile index 336d8c000..bfc9187fb 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -15,6 +15,7 @@ Vagrant.configure(2) do |config| latest.vm.box = "gpii-ops/windows10-#{flavour}-eval-x64-universal" latest.vm.provider :virtualbox do |vm| vm.gui = true + vm.linked_clone = true vm.customize ["modifyvm", :id, "--memory", ram] vm.customize ["modifyvm", :id, "--cpus", cpus] vm.customize ["modifyvm", :id, "--vram", "256"]