* Move the presets tests to integration tests.
These tests aren't true 'unit' tests by definition, so moving them to
integration.
Also, added include and CMakePresets/CMakeUserPresets tests.
* add inheritance and expansion and override tests
* fix formatting of test file
* fix linter issues
* fix lint issues
* fix path
* make tests better across platform
* fix lint
* gcc.ts: Replace single regex pattern with array
* CHANGELOG.md: Add GCC parsing fix
* Change parser from gnuLD to gcc for linker error diagnostics unit test
* Fix GNU LD diagnostics parser not being enabled due to inconsistency in config and in build.ts by_source strings
* Improve GCC and GNU LD diagnostics parsers
* Remove obsolete french linker error unit test
* Add gcc and gnuld diagnostics unit tests
* Clean up regexes, add unit tests
* Make gcc and gnuld parsers execution order agnostic
* Share the RegexPattern interface and the MatchType interface rather than doubly defining it
* Remove C++ template compiler error detection from gnu-ld, move common data types to util.ts
* fix extra line
* update changelog
* Remove obsolete return statement
* Add comments
---------
Co-authored-by: 0xemgy <0xemgy>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
* renamed to end-to-end-tests and moved backend unit tests to unit-tests folder
* create folder for kits code, refactor imports to use @cmt and @test
* move variants into the kits folder
* refactor into better folder structure, still more to go
* Initial refactor making presets validation unit testing possible.
This seems to work well so far, I have v1-v3 presets tested, with some
more refactors regarding error reporting to come. However, the
design/infrastructure refactor seems to be allowing us to unit test
validation.
* implemented Presets version validation automated testing
* Added version testing for presets v1-9.
This adds testing for our version validation for all Presets versions
currently supported.
It creates presets on the fly and ensures that we correctly get errors,
or don't, depending on the setup and what fields are present with what
versions.
* fix workflows
* Ensure that we correctly initialize the presetsParser class
* refactor imports
* refactor imports
* more import fixes
* imports in projectStatus
* missed one
* workflow imports
* added comment about definite assignment
* add comments
* fix launch file to make sure breakpoints happen
* fix syntax error
* xml2js cg
* update tests as well
* try update partial
* switch kit?
* ninja is added to path so it should work, still investigating
* update action version with same tool versions
* changes to test
* test output
* more testing
* test macos-13
* remove logging
* remove logging
* try explicit macos-14
* go back to macos-13
* remove static version of vscode
* need to use 13
* comment
* fix
* analyze user presets first because it's the base if it exists
* more updates to fix include files and telemetry, still needs work and testing
* ensure telemetry and other uses of 'all..Presets' is right
* more fixes
* ensure we don't duplicate cmakepresets in userpresets includes
* remove unnecessary return
* unionWith consistency
* add test
* Making configure precondition handler return a boolean helps to differentiate the successful recovery cases
* Fix pre-condition handler prototype errors in tests
* Experiment with prototypes to fix linter errors
* Add setting for building whole build dir when clean configure
* Remove anything related to deleteBuildDirOnCleanConfigure since it's in a different PR. Keep proper promise<bool> prototype for pre-configure handler return and fix appropriately compilation and lint errors in tests.
* Forgot one file to remove deleteBuildDirOnCleanConfigure from
* Remove forgotten comment
* Add changelog entry
* remove changes not needed
* removing more bad changes
* add logic to regenerate the driver after selecting cmakelists
* remove unused imports
* keep sanity check in _beforeConfigureOrBuild
* only ensure we set the variable so that on retry, it works
* switch return
* erroneous update
* fix
---------
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
* Fix GitHub 1401, diagnostics relative to workspace folder
- relative diagnostics files are searched in build_dir and src_dir,
first existing file is returned
- defaults to old behavior : `path.resolve(build_dir, file)`
- `resolveDiagnostics` has been made async to not slow down IDE when
testing files
* update ChangeLog for #1401
* fix relative file resolution diagnostics test
- diagnostics paths always use POSIX separators (see `normalizePath` in
[src/util.ts](src/util.ts))
---------
Co-authored-by: Sylvain Fargier <sylvain.fargier@cern.ch>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
This change changes the way we do preset file expansion. Expansion now occurs upfront on file open or save, and if there are no errors, the expanded presets will be cached so repeated expansion is not necessary every time getAll{type of preset}Presets() is called.
The only time expansion will happen again is on set preset, which will then also apply the VS developer environment as needed. This is avoided on the initial expansion for performance.
If there are errors in expansion, the errors are shown in the problems panel per file. The presets file will also be set to undefined, which will invalidate that file and not allow any presets in that file to be recognized/selected as valid presets. This is in line with the CMake command line experience.
Some notes:
- The ${generator} macro should not work for packagePresets, but should now expand correctly for all other presets and evaluate conditions correctly
- Tertiary preset cache was added (really its just the original presets cache but used in a new way) to account for included json files that wouldnt be in the original presets files
* committing state, no progress, just thinking through
* fix how we apply and override devenv to ensure we don't accidentally delete preset environment modifications from user
* check if ninja exists and it's the generator, use that to determine if we should add vs devenv as well
* currently broken, but saving state for adding a setting
* this works well, but I need to add back code that prohibits repeated devenv searching with where.exe
* finalize implementation of the setting for useVsDeveloperEnvironment
* minimize branches
* fix import
* update comments
* fix comment
* remove unnecessary comment
* fallback to better architecture/toolset
* update devenv vars and tests
* fix test for mac
* fix tests
* update changelog
* fix test expand and where.exe env
* update test to explicitly test architecture unit test
---------
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
* Add setting for deleting whole build dir when clean configuring
* Remove unnecessary tag in new setting in package.json
* Add changelog entry. Remove unnecessary | null from new boolean setting.
---------
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
* Implement treeview for tests using test suite delimiter
* Support regular expressions for delimiters
* Improve UI string
* Improve UI string
* Address CR comments
* Fix spacing
* make sure to pass entry point through
---------
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
Co-authored-by: Garrett Campbell <86264750+gcampbell-msft@users.noreply.github.com>
* Draft incomplete - does not compile
* Remaining functionality, needs more cleanup and testing
* More bug fixes, not much cleanup
* More bug fixes and stabilization
* fix indentation issues, unused variables, etc.
* Implement first round of code review feedback
* Fix more subtle and complex merge conflicts
* Fix linter issues
* Forgot to dispose of package event subscription
* PR review round two
* Incomplete status bar support for V6 presets. Don't clear output when in workflow mode, regardless of cleanOutputBeforeBuild setting. More cleanup.
* Finish status bar UI support for package and workflow presets
* Add validation of presets structure (applies to all). Fix some bugs.
* Skip expanding strings when not necessary. Remember more presets associations in the workspace state when reseting configure preset. More cleanup.
---------
Co-authored-by: Garrett Campbell <gcampbell@microsoft.com>
* Add initial setting and use in runCTest
There is still work to be done to ensure that we cover all
cases/scenarios and code locations to ensure that our integration with
the test explorer doesn't happen based on this setting
* Hide commands, handle TestController state.
Hide the commands based on the Test Explorer when the testExplorer
integration is disabled. Ensure the TestController gets disposed when
the setting is dynamically changed.
* attempt to refresh the tests when re-enabling integration
* add changelog
* only dispose if needed
* Make popup only show up when necessary and reasonable.
Modify the return value of the configure method so that we can better
evaluate whether we should be showing the "Configure failed. Configure
with debugger?" popup.
* add ability to not show again and have it controlled by a setting
* fix tests
* more test fixes
* more testing fixes
* more testing fixes
* more testing fixes
* another fix attempt
* semantic error
* revert slightly to investigate
* test
* test fix
* test
* test
* only return the result for the command API
* fix test
* try deep equal in driver-test
* update changelog
---------
Co-authored-by: snehara99 <113148726+snehara99@users.noreply.github.com>
* updated notification and settings descriptions
* added comment to not replace text between () for one setting description; it's a link
* changed setting name from cmake.status to cmake.options and updated notification
* initial commit updating settings (not working yet)
* fixed status bar
* project status view working (needs more testing tho)
* fixed check errors
* standardized tooltip capitalization in psv
* added button to open visibility settings and changed 'default' to 'visible' in psv and sb visibility settings
* added close issue reason on stale bots (might not work due to action bug), added a notification for the options moving, and fixed some visibility settings and strings
* updated notification
* updated test
* updated test and config.ts
* allowed a way to run jobs in parallel
* updated changelog
* fixed extra command and description
* addressed Ben's comments (changelog linking to issue and setting scope to resource)
* fix per folder provide browse configuration
We were returning the most recent stored browse configuration, which may be incorrect.
Rather, we should return null if we don't have the browseConfiguration for the requested URI.
* fix test types
* edit changelog
* both sidebar and statusbar visible
* toggle is working
* updated description
* renamed sideBar.ts to projectStatus.ts
* changed name of projectOutlineProvider.ts to projectOutline.ts to match
* removed unused icons
* updated sidebar to use displayName whenever possible
* fixed issue with build/debug/launch presets when no kit is selected
* addressed some comments and fixed loc
* selecting kit refreshed all nodes
* fixed build error (unused variable)
* simplified code calling useProjectStatusView
* updated changelog
* updated changelog
* Need better multiroot
* Multi-root
* Show all projects path on init, and fix issues related to multi-proj folder
* Workaround test failures
---------
Co-authored-by: Ben McMorran <bemcmorr@microsoft.com>