JeremyYao commented on issue #1290: URL: https://github.com/apache/daffodil-vscode/issues/1290#issuecomment-3113226264
### Progress updates #### Following the guide (Set up and Run Tests) Following https://developers.redhat.com/blog/2019/11/18/new-tools-for-automating-end-to-end-tests-for-vs-code-extensions, it guides you to an all-in-one CLI vscode-extension-tester command (https://github.com/redhat-developer/vscode-extension-tester/wiki/Test-Setup#set-up-and-run-tests). Adapting it to this extension results in the new yarn script inserted in package.json. ` "test:ui": "extest setup-and-run ./out/tests/suite/ui-test/*.js --yarn",` However, the tests do not run and results in the following console output ```powershell PS C:\Users\USERNAME\repos\daffodil-vscode> yarn test:ui yarn run v1.22.22 warning [email protected]: The engine "vscode" appears to be invalid. $ extest setup-and-run ./out/tests/suite/ui-test/*.js --yarn Warning: You are using the untested NodeJS version '22.14.0'. The latest supported version is '20.x.x'. We recommend to use tested version to have ExTester working properly. Downloading VS Code: 1.102.2 / stable Downloading VS Code from: https://update.code.visualstudio.com/latest/win32-x64-archive/stable progress: 0/158 (0%) progress: 56016252/155975766 (35%) progress: 136131037/155975766 (87%) progress: 155975766/155975766 (100%) Downloaded VS Code into C:\Users\USERNAME\AppData\Local\Temp\test-resources\1.102.2-stable.zip Unpacking VS Code into C:\Users\USERNAME\AppData\Local\Temp\test-resources Success! ChromeDriver 134.0.6998.165 exists in local cache, skipping download Error: Extension entrypoint(s) missing. Make sure these files exist and aren't ignored by '.vscodeignore': extension/dist/ext/extension.js at LaunchEntryPointProcessor.onEnd (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\node_modules\@vscode\vsce\out\package.js:780:19) at C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\node_modules\@vscode\vsce\out\package.js:1284:58 at Object.sequence (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\node_modules\@vscode\vsce\out\util.js:133:15) at async pack (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\node_modules\@vscode\vsce\out\package.js:1404:19) at async packageCommand (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\node_modules\@vscode\vsce\out\package.js:1461:36) at async CodeUtil.packageExtension (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\util\codeUtil.js:265:9) at async ExTester.installVsix (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\extester.js:138:13) at async ExTester.setupRequirements (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\extester.js:210:13) at async ExTester.setupAndRunTests (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\extester.js:227:9) at async C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\cli.js:147:5 at async Command.<anonymous> (C:\Users\USERNAME\repos\daffodil-vscode\node_modules\vscode-extension-tester\out\cli.js:163:13) error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` I attempted to remedy the issue by changing the following line in package.json from ` "main": "./dist/ext/extension.js", ` to ` "main": "./dist/package/dist/ext/extension.js",`. The extension tester seems to use VSCE for packaging extensions The resulting console output is as follows: ```PowerShell PS C:\Users\USERNAME\repos\daffodil-vscode> yarn test:ui yarn run v1.22.22 warning [email protected]: The engine "vscode" appears to be invalid. $ extest setup-and-run ./out/tests/suite/ui-test/*.js --yarn Warning: You are using the untested NodeJS version '22.14.0'. The latest supported version is '20.x.x'. We recommend to use tested version to have ExTester working properly. Downloading VS Code: 1.102.2 / stable VS Code exists in local cache, skipping download ChromeDriver 134.0.6998.165 exists in local cache, skipping download WARNING This extension consists of 29334 files, out of which 13352 are JavaScript files. For performance reasons, you should bundle your extension: https://aka.ms/vscode-bundle-extension. You should also exclude unnecessary files by adding them to your .vscodeignore: https://aka.ms/vscode-vscodeignore. INFO Files included in the VSIX: apache-daffodil-vscode-1.4.2-SNAPSHOT.vsix ├─ [Content_Types].xml ├─ extension.vsixmanifest └─ extension/ ├─ .asf.yaml [1.33 KB] ├─ .git-blame-ignore-revs [0.09 KB] ├─ .prettierignore [0.83 KB] ├─ .scalafmt.conf [0.98 KB] ├─ LICENSE.txt [35.65 KB] ├─ NOTICE [0.35 KB] ├─ VERSION [0.02 KB] ├─ build.sbt [9.2 KB] ├─ generate_file.py [1.33 KB] ├─ list.txt [120.64 KB] ├─ package.json [32.72 KB] ├─ readme.md [5.49 KB] ├─ tdmltest.tdml [0.59 KB] ├─ tsconfig.json [2.01 KB] ├─ .github/ (6 files) [17.82 KB] ├─ .metals/ (3 files) [181.99 KB] ├─ debugger/ (353 files) [58.31 MB] ├─ dist/ (28834 files) [376.15 MB] ├─ doc/ (1 file) [3.4 KB] ├─ images/ (3 files) [120.38 KB] ├─ language/ (5 files) [20.55 KB] ├─ project/ (75 files) [512.89 KB] ├─ target/ (36 files) [462.57 KB] └─ webpack/ (2 files) [9.74 KB] => Run vsce ls --tree to see all included files. ERROR Error occurred while scanning secrets (files): Error: EBUSY: resource busy or locked, read at async readFileHandle (node:internal/fs/promises:554:24) at async createRawSource (file:///C:/Users/USERNAME/repos/daffodil-vscode/node_modules/@secretlint/source-creator/module/index.js:16:21) at async lintFile (file:///C:/Users/USERNAME/repos/daffodil-vscode/node_modules/@secretlint/node/module/index.js:15:23) at async mapper (file:///C:/Users/USERNAME/repos/daffodil-vscode/node_modules/@secretlint/node/module/index.js:63:24) at async file:///C:/Users/USERNAME/repos/daffodil-vscode/node_modules/p-map/index.js:121:20 { errno: -4082, code: 'EBUSY', syscall: 'read' } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` It didn't seem to resolve the issue and this breaks `yarn package` Doing some further investigation, I attempted the following to turn off the VSCE's secret scanning functionality as it may potentially be locking the files. I had to use `yarn add --dev cross-env` to install a OS-agnostic command line tool. `"test:ui": "cross-env VSCODE_VSCE_NO_SECRETS=true extest setup-and-run out/tests/ui-test/*.js --yarn"` and the console output is similar to the above output -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
