-
Notifications
You must be signed in to change notification settings - Fork 192
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: React Native Windows E2E test app (#726)
- Loading branch information
Showing
32 changed files
with
4,600 additions
and
3,811 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 0 additions & 14 deletions
14
fixtures/react_native_windows_e2e_app/patches/react-native-windows+0.60.0-vnext.16.patch
This file was deleted.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
fixtures/react_native_windows_e2e_app/patches/react-native-windows+0.61.8.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
diff --git a/node_modules/react-native-windows/local-cli/runWindows/utils/deploy.js b/node_modules/react-native-windows/local-cli/runWindows/utils/deploy.js | ||
index 5bddc23..b04cc32 100644 | ||
--- a/node_modules/react-native-windows/local-cli/runWindows/utils/deploy.js | ||
+++ b/node_modules/react-native-windows/local-cli/runWindows/utils/deploy.js | ||
@@ -80,7 +80,9 @@ function getAppxManifest(options) { | ||
const configuration = getBuildConfiguration(options); | ||
const appxManifestGlob = `windows/{*/bin/${ | ||
options.arch | ||
- }/${configuration},${configuration}/*}/AppxManifest.xml`; | ||
+ }/${configuration},${ | ||
+ options.arch | ||
+ }/${configuration}/*}/AppxManifest.xml`; | ||
const appxPath = glob.sync(path.join(options.root, appxManifestGlob))[0]; | ||
|
||
if (!appxPath) { |
108 changes: 108 additions & 0 deletions
108
fixtures/react_native_windows_e2e_app/scripts/Install-VSFeatures.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
param ( | ||
[Parameter(Mandatory=$true)] | ||
[string[]] $Components, | ||
|
||
[uri] $InstallerUri = "https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe", | ||
|
||
[string] $VsInstaller = "${env:System_DefaultWorkingDirectory}\vs_Enterprise.exe", | ||
|
||
[string] $VsInstallOutputDir = "${env:System_DefaultWorkingDirectory}\vs", | ||
|
||
[System.IO.FileInfo] $VsInstallPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\2019\Enterprise", | ||
|
||
[System.IO.FileInfo] $VsInstallerPath = "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer", | ||
|
||
[switch] $Collect = $false, | ||
|
||
[switch] $Cleanup = $false, | ||
|
||
[switch] $UseWebInstaller = $false | ||
) | ||
|
||
$Components | ForEach-Object { | ||
$componentList += '--add', $_ | ||
} | ||
|
||
$LocalVsInstaller = "$VsInstallerPath\vs_installershell.exe" | ||
|
||
$UseWebInstaller = $UseWebInstaller -or -not (Test-Path -Path "$LocalVsInstaller") | ||
|
||
if ($UseWebInstaller) { | ||
Write-Host "Downloading web installer..." | ||
|
||
Invoke-WebRequest -Method Get ` | ||
-Uri $InstallerUri ` | ||
-OutFile $VsInstaller | ||
|
||
New-Item -ItemType directory -Path $VsInstallOutputDir | ||
|
||
Write-Host "Running web installer to download requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$VsInstaller" ` | ||
-ArgumentList ( ` | ||
'--layout', "$VsInstallOutputDir", | ||
'--wait', | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-PassThru | ||
|
||
Write-Host "Running downloaded VS installer to add requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$VsInstallOutputDir\vs_Enterprise.exe" ` | ||
-ArgumentList ( | ||
'modify', | ||
'--installPath', "`"$VsInstallPath`"" , | ||
'--wait', | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-PassThru ` | ||
-OutVariable returnCode | ||
|
||
if ($Cleanup) { | ||
Write-Host "Cleaning up..." | ||
|
||
Remove-Item -Path $VsInstaller | ||
Remove-Item -Path $VsInstallOutputDir -Recurse | ||
} | ||
|
||
} else { | ||
Write-Host "Running local installer to add requested components..." | ||
|
||
Start-Process ` | ||
-FilePath "$LocalVsInstaller" ` | ||
-ArgumentList ( | ||
'modify', | ||
'--installPath', "`"$VsInstallPath`"" , | ||
'--norestart', | ||
'--quiet' + ` | ||
$componentList | ||
) ` | ||
-Wait ` | ||
-OutVariable returnCode | ||
} | ||
|
||
if ($Collect) { | ||
Invoke-WebRequest -Method Get ` | ||
-Uri 'https://download.microsoft.com/download/8/3/4/834E83F6-C377-4DCE-A757-69A418B6C6DF/Collect.exe' ` | ||
-OutFile ${env:System_DefaultWorkingDirectory}\Collect.exe | ||
|
||
# Should generate ${env:Temp}\vslogs.zip | ||
Start-Process ` | ||
-FilePath "${env:System_DefaultWorkingDirectory}\Collect.exe" ` | ||
-Wait ` | ||
-PassThru | ||
|
||
New-Item -ItemType Directory -Force ${env:System_DefaultWorkingDirectory}\vslogs | ||
Expand-Archive -Path ${env:TEMP}\vslogs.zip -DestinationPath ${env:System_DefaultWorkingDirectory}\vslogs\ | ||
|
||
Write-Host "VC versions after installation:" | ||
Get-ChildItem -Name "$VsInstallPath\VC\Tools\MSVC\" | ||
} |
25 changes: 25 additions & 0 deletions
25
fixtures/react_native_windows_e2e_app/scripts/VSComponentList.ps1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
$dir = $env:temp | ||
if ($env:Agent_TempDirectory -ne $null) | ||
{ | ||
$dir = $env:Agent_TempDirectory | ||
} | ||
|
||
$installerPath = 'C:\Program Files (x86)\Microsoft Visual Studio\Installer\' | ||
$installationPath = . $installerPath\vswhere.exe -latest -property installationPath | ||
$vsconfig = "$dir\vsconfig" | ||
Write-Host "VSConfig will be at $vsconfig" | ||
|
||
Invoke-WebRequest -Uri 'https://download.visualstudio.microsoft.com/download/pr/c4fef23e-cc45-4836-9544-70e213134bc8/1ee5717e9a1e05015756dff77eb27d554a79a6db91f2716d836df368381af9a1/vs_Enterprise.exe' -OutFile $dir\vs_enterprise.exe | ||
$p = Start-Process -PassThru $dir\vs_enterprise.exe -RedirectStandardError $dir\err -RedirectStandardOutput $dir\out -ArgumentList "export --installpath `"$installationPath`" --quiet --config $vsconfig" | ||
$p.WaitForExit() | ||
$x = [Datetime]::Now.AddSeconds(60) | ||
|
||
do | ||
{ | ||
Write-Host "Waiting for vsconfig file..." | ||
Sleep 5 | ||
} while (!(Test-Path $vsconfig) -and ([datetime]::Now -lt $x)) | ||
|
||
Get-Content $dir\err | ||
Get-Content $dir\out | ||
Get-Content $vsconfig |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -86,3 +86,7 @@ packages/ | |
*.DotSettings | ||
.vs/ | ||
*project.lock.json | ||
|
||
#Files generated by the VS build | ||
**/Generated Files/** | ||
|
Oops, something went wrong.