- 20 Sep, 2022 1 commit
-
-
MatteoPologruto authored
* Migrate TestCompileWithProfiles from test_profiles.py to profiles_test.go * Migrate TestBuilderDidNotCatchLibsFromUnusedPlatforms to profiles_test.go and delete test_profiles.py
-
- 19 Sep, 2022 1 commit
-
-
MatteoPologruto authored
CopySketch is a function that copies a sketch present in the "testdata" folder and copies it into the testing environment.
-
- 15 Sep, 2022 1 commit
-
-
Cristian Maglie authored
-
- 12 Sep, 2022 1 commit
-
-
Cristian Maglie authored
* Fixed NPE on 'lib upgrade' command * Added tests
-
- 09 Sep, 2022 2 commits
-
-
Cristian Maglie authored
-
Cristian Maglie authored
* Added flag to skip 3rd party package_index in UpdateIndex gRPC API Fix #1788 * UpdateIndex gRPC call does not stop at the first error * Updated docs * Fixed integration tests * Ensure that a 'Completed' download progress is always sent * UpdateIndex: Fixed a wrong success report and added test. * Improved test error messages
-
- 06 Sep, 2022 3 commits
-
-
Cristian Maglie authored
-
Cristian Maglie authored
-
Cristian Maglie authored
* Proper handling of stdout/stderr copy in subprocess * Apply suggestions from code review Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com> Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
-
- 02 Sep, 2022 8 commits
-
-
MatteoPologruto authored
* Migrated TestUpgrade from test_upgrade.py to upgrade_test.go * Migrated TestUpgradeUsingLibraryWithInvalidVersion from test_upgrade.py to upgrade_test.go * Migrated TestUpgradeUnusedCoreToolsAreRemoved to upgrade_test.go and deleted test_upgrade.py
-
MatteoPologruto authored
* Migrated TestOutdated from test_outdated.py to outdated_test.go * Migrated TestOutdatedUsingLibraryWithInvalidVersion to outdated_test.go and deleted test_outdated.py
-
github-actions[bot] authored
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
Cristian Maglie authored
* Added methods to obtain specific monitor settings for a board * Updated documentation * Implementaion of board-specific monitor settings * Allow submenu properties to override monitor settings * Apply code review changes to docs * Apply suggestions from code review Co-authored-by: per1234 <accounts@perglass.com> Co-authored-by: per1234 <accounts@perglass.com>
-
MatteoPologruto authored
* Migrated TestDebuggerStarts from test_debug.py to debug_test.go * Migrated TestDebuggerWithPdeSketchStarts to debug_test.go and deleted test_debug.py
-
Cristian Maglie authored
* Simplified gRPC streams helpers * Moved FeedStreamTo and ConsumeStreamFrom into deamon package and mde them private
-
Cristian Maglie authored
[breaking] Remove auto detection of Arduino IDE built-in libraries and tools / Allow gRPC install of built-in libraries (#1817) * Removed IDE-bundle autodetection * Do not return bundled tools folder with HardwarePaths * Created configuration functions to obtain data dir and downloads dir * Bundled libraries configuration is now considere a single directory * Allow library installation on bundled libs dir via gRPC * Added integration test for library install in bundled directory * Fixed nil pointer exception in build options extraction * Updated docs * Removed useless custom env bindings * Applied code review changes Co-authored-by: per1234 <accounts@perglass.com> * Set builtin libraries dir by default when running as a daemon * Added test for regression See https://github.com/arduino/arduino-cli/pull/1817#pullrequestreview-1092021620 * Fixed regression: 'lib uninstall' must operate only on user dir Co-authored-by: per1234 <accounts@perglass.com>
-
MatteoPologruto authored
* Migrated TestCompletionNoArgs from test_completion.py to completion_test.go * Migrated TestCompletionBash from test_completion.py to completion_test.go * Migrated TestCompletionZsh from test_completion.py to completion_test.go * Migrated TestCompletionFish from test_completion.py to completion_test.go * Migrated TestCompletionPowershell from test_completion.py to completion_test.go * Migrated TestCompletionBashNoDesc from test_completion.py to completion_test.go * Migrated TestCompletionZshNoDesc from test_completion.py to completion_test.go * Migrated TestCompletionFishNoDesc from test_completion.py to completion_test.go * Migrated TestCompletionPowershellNoDesc from test_completion.py to completion_test.go * Migrated TestStaticCompletions from test_completion.py to completion_test.go * Migrated TestConfigCompletion from test_completion.py to completion_test.go * Migrated TestLibCompletion from test_completion.py to completion_test.go * Migrated TestCoreCompletion to completion_test.go and deleted test_completion.py
-
- 01 Sep, 2022 1 commit
-
-
Cristian Maglie authored
-
- 30 Aug, 2022 1 commit
-
-
Cristian Maglie authored
* Added Category field to Platform gRPC struct * Renamed gRPC response from Category string to Type []string
-
- 27 Aug, 2022 1 commit
-
-
MatteoPologruto authored
* testsuite: added functions to setup arduino-cli integration tests * Moved 'requiredjson' library in his own package * Modified tests in cache_test.go to use the new arduino-cli setup * Modified tests in main_test.go to use the new arduino-cli setup Co-authored-by: Cristian Maglie <c.maglie@arduino.cc>
-
- 26 Aug, 2022 2 commits
-
-
Cristian Maglie authored
-
Cristian Maglie authored
* legacy: Removed ToolsLoader step It has been splitted and merged into HardwareLoader and TargetBoardResolver that are more appropriate. * Fixed some function comments * Thread-safe protect access to instances map * Removed state-altering methods from PackageManager They have been moved into a Builder object that has the ability to build a new PackageManager. This allows to clearly separate subrotuines that actually change the status of the PackageManager from subroutines that just need to query it. * Created packagemanager.Explorer to query PackageManager data The Explorer object can be see as a read-only "view" to the underlying PackageManager: we may ask the PackageManager to create an Explorer on itself. The returned explorer will held a read-lock on the PackageManager until it's disposed. This architecture should prevent unwanted changes on the PackageManager while it's being used, and viceversa, when the PackageManager is updated it should be guaranteed that no Explorers are reading it. * PlatformInstall/Uninstall must release PackageManager.Explorer before calling commands.Init Otherwise, since Init will try to take a write-lock, it will block indefinitely. * Moved commands.InstanceContainer -> rpc.InstanceCommand * Created a coreInstancesContainer This container will handle all the atomic access to the instances map. * Made CoreInstance.PackageManager field private * Moved the reminder of PackageManager functions to Explorer or Builder * Now GetPackageManager accepts an rpc.InstanceCommand It has also been deprecated in favor of GetPackageManagerExplorer. * Now GetLibraryManager accepts an rpc.InstanceCommand * Refactored automatic builtin-tool installation * Added gRPC LibraryUpgrade call and fixed 'lib upgrade' command * Explorer and Builder should not extend PackageManager Previuosly the methods PackageManager.NewBuilder and PackageManager.NewExplorer were available also on Builder and Explorer. Now Builder and Explorer does not inherith these methods anymore, avoiding trivial errors like the one fixed in this commit in the builder_utils package. * Updated documentation * Apply suggestions from code review Co-authored-by: per1234 <accounts@perglass.com>
-
- 24 Aug, 2022 3 commits
-
-
Cristian Maglie authored
-
per1234 authored
The `--dump-profile` flag causes Arduino CLI to print the board and sketch dependencies of that compilation as a YAML document. This could be copied into a "sketch project file" for later use as a "build profile" specified via the `--profile` flag. A typo in the `profiles` key name caused the generated "build profile" entry to not be recognized when added to a "sketch project file". The key name is hereby corrected.
-
Cristian Maglie authored
-
- 22 Aug, 2022 1 commit
-
-
MatteoPologruto authored
-
- 16 Aug, 2022 1 commit
-
-
per1234 authored
Arduino CLI has been translated to 12 languages. The localization process follows the following steps: 1. An English language source string is defined in the Arduino CLI codebase 2. The source string is pushed to Transifex 3. Community translators localize the string 4. The localization data is pulled into the Arduino CLI repository 5. The localization data is incorporated into the Arduino CLI distribution Experience with maintenance of the Arduino IDE 1.x project indicates that the data files generated at step (4) can appear to be the appropriate place to make edits for casual contributors not familiar with the project's sophisticated internationalization infrastructure. Since those files are generated by automated systems, any edits made there would only be overwritten, so it is important to clearly communicate the correct way to make enhancements or corrections to these strings. This is accomplished by a local readme file most likely to be seen by those working in the folder containing these files, which supplements the existing information about translation in the project's CONTRIBUTING.md.
-
- 12 Aug, 2022 1 commit
-
-
MatteoPologruto authored
* Migrated TestHelp from test_main.py to main_test.go * Migrated TestVersion from test_main.py to main_test.go * Migrated TestInventoryCreation from test_main.py to main_test.go * Migrated TestLogOptions to main_test.go and deleted test_main.py
-
- 11 Aug, 2022 1 commit
-
-
per1234 authored
* [skip changelog] Remove unused link reference definitions in docs Parts of the documentation use reference links, where the inline markup uses a label, which matches to a link reference definition elsewhere in the documentation. The major disadvantage of this approach is that unused link reference definitions are often left behind after the referencing text is removed, cluttering up the documentation and increasing the maintenance burden. That was the case here. The unused link reference definitions are hereby removed. * [skip changelog] Fix broken links in documentation Some of the documentation links no longer reached their intended target. These were not caught by the Markdown link check for one of two reasons: - Redirects to a useless generic page instead of the moved specific target page - Links in non-Markdown files * [skip changelog] Update documentation links that depend on redirects Some of the links in the documentation used URLs that were redirecting to the new location of the target page. Even though these links still took the reader to the intended place eventually, it is safest to not rely on them continuing to work for the long term, so is best to update to point directly to the target.
-
- 10 Aug, 2022 3 commits
-
-
Cristian Maglie authored
* Improved streaming of pluggable-discoveries events (WIP) Now the DiscoveryManager is able to start the discoveries and add/remove them in a thread-safe way. Also the watchers may connect and disconnect seamlessly at any time, the incoming events from the discovery are broadcasted correctly to each active watcher. This refactoring dramatically simplifies the DiscoveryManager design. * Added discovery id in discovery.Event struct * Cache active ports and transmit them when a new watcher connects * Correctly handle discovery cleanup * Fixed wrong test * Correctly handle discovery cleanup and re-add * Added some doc comments in the source code * Move Unlock under defer * Factored subrotuine into a function it will be useful in the next commits. * Do not cache ports in the DiscoveryClient there is already a cache in the DiscoveryManager there is no need to duplicate it. * Discovery: eventChan must be protected by mutex when doing START_SYNC otherwise the discovery may send some events before the eventChan is setup (and those events will be lost) * Increased error level for logging watchers that lags * Updated discvoery_client to the latest API * Report discovery start errors * Update arduino/discovery/discovery_client/main.go Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com> Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
-
Abirdcfly authored
Signed-off-by: Abirdcfly <fp544037857@gmail.com>
-
github-actions[bot] authored
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
-
- 09 Aug, 2022 3 commits
-
-
Cristian Maglie authored
* Added test for issue #1823 * Do not assume that version in platforms.txt is correct semver * When parsing version in platform.txt perform a variable replace * Update internal/integrationtest/core/testdata/issue_1823/DxCore-dev/megaavr/README.md * Update internal/integrationtest/core/core_list_test.go Co-authored-by: per1234 <accounts@perglass.com>
-
Cristian Maglie authored
* testsuite: Added helper functions to handle test envs * testsuite: Added helper functions to run arduino-cli * testsuite: Added colored output to arduino-cli Run helper * testsuite: Pass cli config through env variables * testsuite: added env commands to download and extract files * testsuite: added commands to start cli daemon and run some gRPC calls * testsuite: moved test harness inside 'internal' package * testsuite: added first daemon test for gRPC board watch * testsuite: added http server helper * testsuite: added JSON helpers * testsuite: Added possibility to use shared download staging folder * testsuite: Converted a core_test.py test (WIP) * REMOVEME: Deactivate daemon integration test for now * testsuite: force colored output * testsuite: moved all generic subroutines into their own library * testsuite: moved daemon test in his own dir * fixed typo * testsuite: added some helpers to improve daemon testing * testsuite: added test for #1614 * Removed converted test * testsuite: perform build before test Otherwise people running the task locally will have a bad time when the test either fails due to the missing executable, or far worse when they get incorrect test results because they don't realize it is using whichever random executable happened to be sitting around from the last time they did a build. * Added missing comment * Renamed test file * Skip failing tests * Updated licensed cache * re-enable test for fixed bug * testsuite: disable postinstall Otherwise Windows CI will get stuck. * Removed useless startDaemon * Renamed inst -> grpcInst * Close daemon gRPC connection on test cleanup * Added comment * Apply suggestions from code review Co-authored-by: per1234 <accounts@perglass.com> * Update internal/integrationtest/arduino-cli.go Co-authored-by: per1234 <accounts@perglass.com> Co-authored-by: per1234 <accounts@perglass.com>
-
per1234 authored
`github.com/arduino/arduino-cli/i18n.Tr` provides a `fmt.Printf`-style interface, where the first argument may serve as a template filled by subsequent arguments according to its format verbs. This call contains a subsequent argument, but no verb in the format string to use it. This generates some cryptic content in the error message. For example: Error during install: Error downloading tool arduino:bossac@1.7.0-arduino3: no versions available for the current OS%!(EXTRA *cores.ToolRelease=arduino:bossac@1.7.0-arduino3) The tool name is already provided in the correctly configured `Message` field of the error, so there is no need to include it in the `Cause` field as well, so the spurious argument can be removed entirely rather than the alternative fix of adjusting the format string argument. I suspect the spurious argument was simply the result of a copy/paste error.
-
- 08 Aug, 2022 1 commit
-
-
Cristian Maglie authored
* Made PackageManager.TempDir private * Merged InstallToolRelease function into the proper packagemanager method * Moved uninstallToolRelease into the proper packagamanger method * Moved uninstallPlatformRelease into the proper packagamanger method * Moved downloadToolRelease into the proper packagamanger method * Merged downloadTool with the proper packagamanger method * Merged downloadPlatform with the proper packagamanger method * Moved installPlatform into a packagamanger method * Moved upgradePlatform into a packagamanger method * Made PackageManager.Log field private * Removed the massive code duplication in the 'upgrade' command * Removed the massive code duplication in the 'outdated' command * Updated docs * Update arduino/cores/packagemanager/install_uninstall.go Co-authored-by: per1234 <accounts@perglass.com> * Update arduino/cores/packagemanager/install_uninstall.go Co-authored-by: per1234 <accounts@perglass.com> Co-authored-by: per1234 <accounts@perglass.com>
-
- 05 Aug, 2022 1 commit
-
-
Cristian Maglie authored
-
- 02 Aug, 2022 1 commit
-
-
Cristian Maglie authored
* Bugfix: do not overwrite board properies during compile Fix #1614 * Removed AddBuildPropertyIfMissinc 'legacy' (inlined in other functions) * Increase code coverage
-
- 01 Aug, 2022 1 commit
-
-
per1234 authored
Versions of the `codecov/codecov-action` GitHub Actions action prior to 1.0.6 required the use of a token provided by Codecov in order to upload data to Codecov. This token was stored in secret in the Arduino CLI repository and used in the test workflow. For security reasons, secrets are not accessible when a workflow is triggered by an event generated by a fork of the repository. This meant that it was impossible to upload coverage data for the test runs triggered by PRs from forks. A conditional was added to the upload step of the workflow to cause it to only run on `push` event triggers, which effectively prevented its failure for runs on PRs from forks. The token requirement was removed in the 1.0.6 release of `codecov/codecov-action`, but the now pointless conditional was never removed from the workflow. This prevented PRs from forks from receiving the automated code coverage report comments that would otherwise encourage those contributors to resolve coverage deficiencies and facilitate the review process. The harmful conditional is hereby removed from the coverage data upload steps of the workflow and PRs from forks will now receive coverage report comments, just as PRs from branches do already.
-
- 26 Jul, 2022 1 commit
-
-
Cristian Maglie authored
* Added tests for #1669 * Fixed regession in discoveries startup Fix #1669
-