- 10 Oct, 2022 3 commits
-
-
per1234 authored
To ensure functionality on all platforms, the "Test Go" GitHub Actions workflow runs the tests on Windows, Linux, and macOS. This is done via a "job matrix", which runs the three jobs in parallel. By default GitHub Actions uses a "fail fast" behavior for job matrixes, where all in progress or pending jobs of the matrix are immediately canceled upon failure of any job. The benefit of this "fail fast" behavior is efficiency in the case where a failure is universal and those other jobs were certain to eventually fail. However, in other cases a failure is either specific to the configuration of a single job (e.g., a Windows-specific bug), or a spurious result of a transient network outage. In the latter case, canceling the other jobs is very harmful. Running the jobs for the other operating systems would highlight the nature of an OS-specific failure for the contributor. Canceling other jobs due to a transient failure means all those jobs must be reran instead of only the specific job that suffered the failure. The workflow is hereby configured to disable the "fail fast" behavior. All the matrix jobs will now run even if one of them has failed.
-
Cristian Maglie authored
* Factor all compile_part_1 and 2 test setup * Made an object to simplify running of subtests * Moved all subtests in the same file Just moved functions around, no code change. * Reuse installed platform to speedup debug integration tests
-
Cristian Maglie authored
* Integrated 'go.bug.st/testsuite' It doesn't make much sense to keep it separate in a different library * Do not use shared download dir for 'cache clean' command tests * Added method to get cli download dir * Create infra for sharing directories between tests * Slighlty improved test output * Non-parallel testing is no longer required * Add more time to complete tests * Update internal/integrationtest/cache/cache_test.go Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com> Co-authored-by: MatteoPologruto <109663225+MatteoPologruto@users.noreply.github.com>
-
- 07 Oct, 2022 2 commits
-
-
MatteoPologruto authored
* Migrate TestInit from test_config.py to config_test.go * Migrate TestInitWithExistingCustomConfig from test_config.py to config_test.go * Migrate TestInitOverwriteExistingCustomFile from test_config.py to config_test.go * Migrate TestInitDestAbsolutePath from test_config.py to config_test.go * Migrate TestInitDestRelativePath from test_config.py to config_test.go * Migrate TestInitDestFlagWithOverwriteFlag from test_config.py to config_test.go * Migrate TestInitDestAndConfigFileFlags from test_config.py to config_test.go * Migrate TestInitConfigFileFlagAbsolutePath from test_config.py to config_test.go * Migrate TestInitConfigFileFlagWithOverwriteFlag from test_config.py to config_test.go * Migrate TestDump from test_config.py to config_test.go * Migrate TestDumpWithConfigFileFlag from test_config.py to config_test.go * Migrate TestInitConfigFileFlagRelativePath from test_config.py to config_test.go * Migrate TestAddRemoveSetDeleteOnUnexistingKey from test_config.py to config_test.go * Migrate TestAddSingleArgument from test_config.py to config_test.go * Migrate TestAddMultipleArguments from test_config.py to config_test.go * Migrate TestAddOnUnsupportedKey from test_config.py to config_test.go * Migrate TestRemoveSingleArgument from test_config.py to config_test.go * Migrate TestRemoveMultipleArguments from test_config.py to config_test.go * Migrate TestRemoveOnUnsupportedKey from test_config.py to config_test.go * Migrate TestSetSliceWithSingleArgument from test_config.py to config_test.go * Migrate TestSetSliceWithMultipleArguments from test_config.py to config_test.go * Migrate TestSetStringWithSingleArgument from test_config.py to config_test.go * Migrate TestSetStringWithMultipleArguments from test_config.py to config_test.go * Migrate TestSetBoolWithSingleArgument from test_config.py to config_test.go * Migrate TestSetBoolWithMultipleArguments from test_config.py to config_test.go * Migrate TestDelete to config_test.go and delete config_test.py
-
MatteoPologruto authored
* Migrate TestCompileWithOutputDirFlag from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithExportBinariesFlag from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithCustomBuildPath from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithInvalidUrl from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithExportBinariesEnvVar from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithExportBinariesConfig from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithCustomLibraries from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithArchivesAndLongPaths from test_compile_part_2.py to compile_part_2_test.go * Migrate TestCompileWithPrecompileLibrary to compile_part_2_test.go and delete test_compile_part_2.py * Increase lapse before timeout by 5 minutes
-
- 06 Oct, 2022 1 commit
-
-
Cristian Maglie authored
* Download library index as a combined archive+signature * Fixed integration tests
-
- 05 Oct, 2022 2 commits
-
-
Henry Gabryjelski authored
* uniquify configuration arrays in `config add` * Add tests for unique board manager URLs * fix linting * lint: update function name * update config set to uniquify slices
-
Cristian Maglie authored
* Refactored DownloadProgress protocol * Updated integration tests * Do not create overly verbose errors * Updated docs * Update rpc/cc/arduino/cli/commands/v1/commands.proto Co-authored-by: per1234 <accounts@perglass.com> Co-authored-by: per1234 <accounts@perglass.com>
-
- 04 Oct, 2022 5 commits
-
-
Cristian Maglie authored
* Removed real_name field from gRPC Library message * Update docs/UPGRADING.md Co-authored-by: per1234 <accounts@perglass.com> Co-authored-by: per1234 <accounts@perglass.com>
-
Cristian Maglie authored
* Factored function to get search terms * Made 'core search' logic identical to Arduino IDE 1.8.x search dialog * Drastically simplified search algorithm for libs * Fixed SearchTermsFromQueryString function * Moving SearchTermsFromQueryString into proper place
-
per1234 authored
Each Arduino library has a name, which is used as its sole identifier by the user in `arduino-cli lib` commands, and by Arduino CLI when referring to the library in messages displayed to the user. The name is defined by: - "1.5 format" libraries: `name` field in the library.properties metadata file - "1.0 format" (AKA "legacy") libraries: installation folder name The name is resolved when loading the library and stored in the `Name` field of the `github.com/arduino/arduino-cli/arduino/libraries.Library` struct. The name of the library's installation folder is used by Arduino CLI in several other ways, most notably for determining "folder name priority" for use in library dependency resolution. For this reason, the folder name is also stored in the struct when loading the library. Arduino CLI and arduino-builder have been plagued by problems caused by the inappropriate use of this folder name as the identifier for the library instead of the sole correct identifier (which is only the folder name in the case of "1.0 format" libraries. The design of the `github.com/arduino/arduino-cli/arduino/libraries.Library` struct may have been a contributing factor in those bugs, since at the time of their occurrence the folder name was stored in the `Name` field, the metadata-defined name in a `RealName`. In addition to the fact that no one field could be used as a source of the name in all cases, I suspect the ambiguous field names themselves caused confusion to developers. This situation was improved by providing the library identifier via a single field for all library formats. The name provided by this field is the "canonical" name of the library. Inexplicably, at that time the field containing the folder name was renamed "CanonicalName". The string contained by this field is in no way a "canonical" name for the library, so the field name is bound to cause more of the same bugs and confusion the redesign of the struct was intended to prevent. The inappropriately named `github.com/arduino/arduino-cli/arduino/libraries.Library.CanonicalName` field is hereby renamed to the accurate `DirName`.
-
Cristian Maglie authored
* Do not run go integration tests in parallel This is required since the integration tests shares the download folder. Still not ideal, it would be better if the cli could handle concurrent access to the download folder (from multiple cli processes...), but at least allows to run the tests without random failures. * Fixed integration test
-
Cristian Maglie authored
`board listall` (in json/machine readable output) return boards sorted with the same order as in the original `boards.txt` (#1903) * Simplified internal boards menu maps construction * Redesign boards build loop to iterate following boards.txt boards order * Return board list with the same ordering as in original boards.txt * Added integration test
-
- 03 Oct, 2022 1 commit
-
-
per1234 authored
* [skip changelog] Use correct markup for PR template headings This repository uses a pull request template in order to provide a standardized structure for pull request messages. The template imposes a framework for the organization of the pull request message by providing a section to contain each of the distinct types of important information to be included in the pull request. As should be obvious, the only correct formatting for section headings is heading markup, yet somehow list markup was chosen instead. This collides with the appropriate use of lists within the sections. The template is hereby changed to use the correct markup for headings. * [skip changelog] Move contributor guide link to appropriate section of PR template This repository uses a pull request template in order to provide a standardized structure for pull request messages. The template includes a link to the project's contributor guide. Previously, this link was at the bottom of the template, separated from the other content by a horizontal rule. One of the unfortunate ambiguities of the Markdown syntax is that the horizontal rule syntax is the same as the "setext" H2 heading syntax, with the differentiation depending on whether the prior line is empty. This results in text intended to be part of the "Other information" section of the PR message instead being formatted as an H2 heading if the contributor does not add an empty line at the end of the "Other information" section. Moving the link to the section of the template that contains a checklist for the PR requirements makes the relevant information readily accessible to the contributor while also avoiding the creation of a formatting trap.
-
- 29 Sep, 2022 1 commit
-
-
MatteoPologruto authored
* Use a matrix create parallel builds for each os Using a matrix to run each build task greatly improves performances, since they can all start concurrently. The finishing time of the job will be equal to the one of the longer task to build, instead of being the sum of each individual task's finishing time. * Calculate checksums during release creation Checksums of the output files where previously calculated during the initial creation of the artifacts, during the notarization process and, finally, at the release creation's step. The whole process has been simplified and checksums are now computed only during the creation of the release. * Set condition to create changelog once The changelog is the same for each OS. It does not make sense to generate it more than once. * Disable s3 push for testing * Upload nightly artifacts for testing * Fix linux_arm_6 typo * Stop uploading nigthly artifacts * Enable s3 pushing * Upload build artifacts separately Previously, the different builds were firstly uploaded using a single artifact, which was then downloaded to create different ones and eventually deleted. Now, since builds are created concurrently, the same matrix can be used to directly upload an artifact for each build. It's necessary to use a second job to calculate the checksum related to each build and save them all in a single .txt file.
-
- 28 Sep, 2022 1 commit
-
-
Cristian Maglie authored
-
- 27 Sep, 2022 1 commit
-
-
MatteoPologruto authored
* Set test environment directory as CLI WorkingDir By default, the working directory is the one containing the test.go file. This causes problems when executing commands that have to create files specifically in the working directory, because they either must be deleted manually or the user has to be aware of it and defer a deleting instruction. Furthermore, it messes with tests using relative paths. Setting the environment directory as the CLI's WorkingDir prevents the above mentioned issues from occurring. * Fix errors related to the change of the working directory * Use absolute path to create daemon environment
-
- 26 Sep, 2022 1 commit
-
-
MatteoPologruto authored
* Migrate TestCompileWithoutFqbn from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileErrorMessage from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithSimpleSketch from test_compile_part_1.py to compile_part_1_test.go * Migrate TestOutputFlagDefaultPath from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithSketchWithSymlinkSelfloop from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileBlacklistedSketchname from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithoutPrecompiledLibraries from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithBuildPropertiesFlag from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithBuildPropertyContainingQuotes from test_compile_part_1.py to compile_part_1_test.go * Migrate TestCompileWithMultipleBuildPropertyFlags to compile_part_1_test.go and delete test_compile_part_1.py * Shorten testsuite ProjectName and DataDir to prevent errors on Windows runner Long paths caused certain commands to fail on the Windows runner. Reducing their lengths prevents those errors from occurring.
-
- 21 Sep, 2022 2 commits
-
-
Cristian Maglie authored
* Do not treat custom menu items without label as 'malformed' * Fixed tests
-
Cristian Maglie authored
* Removed LibraryAlternatives object in favor of libraries.List * Use RealName instead of (dir) Name as key in librarymanager.Library map * Refactored some librarymanager functions to query libraries list * Simplified librariesmanager.Install It does not require installLocation since it can be obtained with libPath.Parent() * Added checks for multiple library installation * Added test to check that the cli is able to handle multiple lib installations * Renamed fields in Library structure: Name->CanonicalName; RealName->Name * Use Name instead of CanonicalName in LibraryList This fixes also `lib list` and `lib examples`. * Use `Name` field where appropriate instead of `CanonicalName` * Updated documentation * Update arduino/libraries/librarieslist.go Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com> * Improved integration test Co-authored-by: Umberto Baldi <34278123+umbynos@users.noreply.github.com>
-
- 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>
-