@@ -26,7 +26,7 @@ import { installDependenciesLinux, installDependenciesWindows, validateDependenc
2626import { calculateSha1 , getAsBooleanFromENV , getFromENV , getPackageManagerExecCommand } from '../../utils' ;
2727import { wrapInASCIIBox } from '../utils/ascii' ;
2828import { debugLogger } from '../utils/debugLogger' ;
29- import { hostPlatform , isOfficiallySupportedPlatform } from '../utils/hostPlatform' ;
29+ import { shortPlatform , hostPlatform , isOfficiallySupportedPlatform } from '../utils/hostPlatform' ;
3030import { fetchData , NET_DEFAULT_TIMEOUT } from '../utils/network' ;
3131import { spawnAsync } from '../utils/spawnAsync' ;
3232import { getEmbedderName } from '../utils/userAgent' ;
@@ -60,34 +60,68 @@ if (process.env.PW_TEST_CDN_THAT_SHOULD_WORK) {
6060
6161const EXECUTABLE_PATHS = {
6262 'chromium' : {
63- 'linux' : [ 'chrome-linux' , 'chrome' ] ,
64- 'mac' : [ 'chrome-mac' , 'Chromium.app' , 'Contents' , 'MacOS' , 'Chromium' ] ,
65- 'win' : [ 'chrome-win' , 'chrome.exe' ] ,
63+ '<unknown>' : undefined ,
64+ 'linux-x64' : [ 'chrome-linux' , 'chrome' ] ,
65+ 'linux-arm64' : [ 'chrome-linux' , 'chrome' ] ,
66+ 'mac-x64' : [ 'chrome-mac' , 'Chromium.app' , 'Contents' , 'MacOS' , 'Chromium' ] ,
67+ 'mac-arm64' : [ 'chrome-mac' , 'Chromium.app' , 'Contents' , 'MacOS' , 'Chromium' ] ,
68+ 'win-x64' : [ 'chrome-win' , 'chrome.exe' ] ,
6669 } ,
6770 'chromium-headless-shell' : {
68- 'linux' : [ 'chrome-linux' , 'headless_shell' ] ,
69- 'mac' : [ 'chrome-mac' , 'headless_shell' ] ,
70- 'win' : [ 'chrome-win' , 'headless_shell.exe' ] ,
71+ '<unknown>' : undefined ,
72+ 'linux-x64' : [ 'chrome-linux' , 'headless_shell' ] ,
73+ 'linux-arm64' : [ 'chrome-linux' , 'headless_shell' ] ,
74+ 'mac-x64' : [ 'chrome-mac' , 'headless_shell' ] ,
75+ 'mac-arm64' : [ 'chrome-mac' , 'headless_shell' ] ,
76+ 'win-x64' : [ 'chrome-win' , 'headless_shell.exe' ] ,
77+ } ,
78+ 'chromium-tip-of-tree' : {
79+ '<unknown>' : undefined ,
80+ 'linux-x64' : [ 'chrome-linux64' , 'chrome' ] ,
81+ 'linux-arm64' : [ 'chrome-linux' , 'chrome' ] , // non-cft build
82+ 'mac-x64' : [ 'chrome-mac-x64' , 'Google Chrome for Testing.app' , 'Contents' , 'MacOS' , 'Google Chrome for Testing' ] ,
83+ 'mac-arm64' : [ 'chrome-mac-arm64' , 'Google Chrome for Testing.app' , 'Contents' , 'MacOS' , 'Google Chrome for Testing' ] ,
84+ 'win-x64' : [ 'chrome-win64' , 'chrome.exe' ] ,
85+ } ,
86+ 'chromium-tip-of-tree-headless-shell' : {
87+ '<unknown>' : undefined ,
88+ 'linux-x64' : [ 'chrome-headless-shell-linux64' , 'chrome-headless-shell' ] ,
89+ 'linux-arm64' : [ 'chrome-linux' , 'chrome' ] , // non-cft build
90+ 'mac-x64' : [ 'chrome-headless-shell-mac-x64' , 'chrome-headless-shell' ] ,
91+ 'mac-arm64' : [ 'chrome-headless-shell-mac-arm64' , 'chrome-headless-shell' ] ,
92+ 'win-x64' : [ 'chrome-headless-shell-win64' , 'chrome-headless-shell.exe' ] ,
7193 } ,
7294 'firefox' : {
73- 'linux' : [ 'firefox' , 'firefox' ] ,
74- 'mac' : [ 'firefox' , 'Nightly.app' , 'Contents' , 'MacOS' , 'firefox' ] ,
75- 'win' : [ 'firefox' , 'firefox.exe' ] ,
95+ '<unknown>' : undefined ,
96+ 'linux-x64' : [ 'firefox' , 'firefox' ] ,
97+ 'linux-arm64' : [ 'firefox' , 'firefox' ] ,
98+ 'mac-x64' : [ 'firefox' , 'Nightly.app' , 'Contents' , 'MacOS' , 'firefox' ] ,
99+ 'mac-arm64' : [ 'firefox' , 'Nightly.app' , 'Contents' , 'MacOS' , 'firefox' ] ,
100+ 'win-x64' : [ 'firefox' , 'firefox.exe' ] ,
76101 } ,
77102 'webkit' : {
78- 'linux' : [ 'pw_run.sh' ] ,
79- 'mac' : [ 'pw_run.sh' ] ,
80- 'win' : [ 'Playwright.exe' ] ,
103+ '<unknown>' : undefined ,
104+ 'linux-x64' : [ 'pw_run.sh' ] ,
105+ 'linux-arm64' : [ 'pw_run.sh' ] ,
106+ 'mac-x64' : [ 'pw_run.sh' ] ,
107+ 'mac-arm64' : [ 'pw_run.sh' ] ,
108+ 'win-x64' : [ 'Playwright.exe' ] ,
81109 } ,
82110 'ffmpeg' : {
83- 'linux' : [ 'ffmpeg-linux' ] ,
84- 'mac' : [ 'ffmpeg-mac' ] ,
85- 'win' : [ 'ffmpeg-win64.exe' ] ,
111+ '<unknown>' : undefined ,
112+ 'linux-x64' : [ 'ffmpeg-linux' ] ,
113+ 'linux-arm64' : [ 'ffmpeg-linux' ] ,
114+ 'mac-x64' : [ 'ffmpeg-mac' ] ,
115+ 'mac-arm64' : [ 'ffmpeg-mac' ] ,
116+ 'win-x64' : [ 'ffmpeg-win64.exe' ] ,
86117 } ,
87118 'winldd' : {
88- 'linux' : undefined ,
89- 'mac' : undefined ,
90- 'win' : [ 'PrintDeps.exe' ] ,
119+ '<unknown>' : undefined ,
120+ 'linux-x64' : undefined ,
121+ 'linux-arm64' : undefined ,
122+ 'mac-x64' : undefined ,
123+ 'mac-arm64' : undefined ,
124+ 'win-x64' : [ 'PrintDeps.exe' ] ,
91125 } ,
92126} ;
93127
@@ -529,13 +563,7 @@ export class Registry {
529563 constructor ( browsersJSON : BrowsersJSON ) {
530564 const descriptors = readDescriptors ( browsersJSON ) ;
531565 const findExecutablePath = ( dir : string , name : keyof typeof EXECUTABLE_PATHS ) => {
532- let tokens = undefined ;
533- if ( process . platform === 'linux' )
534- tokens = EXECUTABLE_PATHS [ name ] [ 'linux' ] ;
535- else if ( process . platform === 'darwin' )
536- tokens = EXECUTABLE_PATHS [ name ] [ 'mac' ] ;
537- else if ( process . platform === 'win32' )
538- tokens = EXECUTABLE_PATHS [ name ] [ 'win' ] ;
566+ const tokens = EXECUTABLE_PATHS [ name ] [ shortPlatform ] ;
539567 return tokens ? path . join ( dir , ...tokens ) : undefined ;
540568 } ;
541569 const executablePathOrDie = ( name : string , e : string | undefined , installByDefault : boolean , sdkLanguage : string ) => {
@@ -604,7 +632,7 @@ export class Registry {
604632 } ) ;
605633
606634 const chromiumTipOfTreeHeadlessShell = descriptors . find ( d => d . name === 'chromium-tip-of-tree-headless-shell' ) ! ;
607- const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath ( chromiumTipOfTreeHeadlessShell . dir , 'chromium-headless-shell' ) ;
635+ const chromiumTipOfTreeHeadlessShellExecutable = findExecutablePath ( chromiumTipOfTreeHeadlessShell . dir , 'chromium-tip-of-tree- headless-shell' ) ;
608636 this . _executables . push ( {
609637 type : 'channel' ,
610638 name : 'chromium-tip-of-tree-headless-shell' ,
@@ -622,7 +650,7 @@ export class Registry {
622650 } ) ;
623651
624652 const chromiumTipOfTree = descriptors . find ( d => d . name === 'chromium-tip-of-tree' ) ! ;
625- const chromiumTipOfTreeExecutable = findExecutablePath ( chromiumTipOfTree . dir , 'chromium' ) ;
653+ const chromiumTipOfTreeExecutable = findExecutablePath ( chromiumTipOfTree . dir , 'chromium-tip-of-tree ' ) ;
626654 this . _executables . push ( {
627655 type : 'tool' ,
628656 name : 'chromium-tip-of-tree' ,
0 commit comments