Open
Description
OS
Linux
Operating System version
Ubuntu 24.04
Visual Studio Code version
1.99.3
ESP-IDF version
5.3.1
Python version
3.12.3
Doctor command output
Extension
No response
Description
When using the Testrunner under the "Testing" Tab, clicking on the Play button for the first time will copy the unity-app again. This behaviour is not desirable, as it overwrites changes without warning. This will only happen the first time the Play button is clicked until the Window is Reloaded.
Steps to reproduce:
- Open unit_test example
- Create unity-app by calling
ESP-IDF: Building unit test app and flashing
- Change something in created unity-app
- Go to testing tab and click "Run Test" (play button)
- Changes to unity-app will be overwritten
- Change something in unity-app again
- Go to testing tab and click "Run Test" (play button)
- Changes to unity-app will remain
Possible Solution
The runHandler in adapter.ts will always call configurePyTestUnitApp() if unitTestAppUri is not set, which will copyTestAppProject() everytime. I suppose the uri will be set after the first run.
if (!this.unitTestAppUri) {
const workspaceFolder = workspace.workspaceFolders
? workspace.workspaceFolders[0]
: undefined;
if (!workspaceFolder) {
return;
}
this.unitTestAppUri = await configurePyTestUnitApp(
workspaceFolder.uri,
this.testComponents,
cancelToken
);
}
Maybe a test for the existance of the unity-app should be added to the adapter runHandler or directly to the copy function.
Debug Message
none
Other Steps to Reproduce
No response
I have checked existing issues, online documentation and the Troubleshooting Guide
- I confirm I have checked existing issues, online documentation and Troubleshooting guide.