1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-21 10:52:14 +01:00

7281 Commits

Author SHA1 Message Date
Cristian Maglie
a056a5fdc7
Merge pull request #10844 from per1234/fix-build-system
Fix built-in examples update during build
2020-10-09 12:11:56 +02:00
per1234
5bf14b8b7b Fix built-in examples update during build
Previously, the built-in examples assembly step of the build system set the
`final_folder` parameter of the `unzip` target to the true final
installation location of the examples.

The behavior of the `unzip` target is to only unzip the archive if
`final_folder` doesn't exist. Because that folder will exist any time a
previous build has been done and `ant clean` was not run, the archive will
not be unzipped. This causes the build to fail after an update to the
built-in examples version when it attempts to copy the examples from the
version-dependent extraction staging folder to the final location.

The fix is to set the `final_folder` parameter to the version-dependent
staging folder location, which will cause the extraction to happen every
time the examples version is updated, but to be skipped when there was no
update.
2020-10-08 21:57:16 -07:00
Cristian Maglie
7a9234c304
Merge pull request #10734 from per1234/remove-built-in-examples
Move built-in examples to dedicated repository
2020-09-23 10:24:34 +02:00
Cristian Maglie
2fd5944231
Merge pull request #10747 from cmaglie/fix_mac_ssl_errors
Fix increase in ssl error for MacOS users
2020-09-14 15:21:14 +02:00
Cristian Maglie
20761e5bae Update appbundler to 1.0ea-arduino9 2020-09-10 23:40:23 +02:00
per1234
99d3114168 Move built-in examples to dedicated repository
A dedicated repository for the examples will make it easier for them to be built in to arbitrary development tools. It will make it easier to use them for compilation testing of boards platforms. It provides a dedicated location for issue reports and pull requests that are specific to the examples. It continues the work done by moving the AVR and SAM boards platforms and built-in libraries towards making the arduino/Arduino repository solely a place to host the GUI code of the Arduino IDE.
2020-09-07 04:52:40 -07:00
Martino Facchin
5e30bec235 Update WiFi101-Updater-Plugin to 0.10.12 2020-08-17 12:57:46 +02:00
Cristian Maglie
80dc652ceb
Merge pull request #10541 from cmaglie/board-lib-manager-fixes
Fixed Boards and Libraries Manager "filters" persistence
2020-07-23 15:59:55 +02:00
Cristian Maglie
10bee204e6 Lib manager: added getContribModel() as in Boards manager 2020-07-23 12:10:45 +02:00
Cristian Maglie
851b5b14b1 Lib manager GUI is updated after installing/upgrading library 2020-07-23 12:10:45 +02:00
Cristian Maglie
a81772afc6 Boards Manager: update UI after an install/remove 2020-07-23 12:10:45 +02:00
Cristian Maglie
1361bce6bc Board manager: Update filters UI only if categories changes 2020-07-23 12:10:45 +02:00
Cristian Maglie
4c45ea8ecc Fixed NPE in buildProgrammersMenu
Some platforms may not define directly 'build.core' because it may be defined
through a custom menu.

For example, the arduboy platform has in the boards.txt:

   [...]
   menu.core=Core
   [...]
   # core #
   arduboy-homemade.menu.core.arduboy-core=Arduboy optimized core
   arduboy-homemade.menu.core.arduboy-core.build.core=arduboy
   arduboy-homemade.menu.core.arduino-core=Standard Arduino core
   arduboy-homemade.menu.core.arduino-core.build.core=arduino:arduino
   [...]

the build.core is determined only after applying the submenu options.
2020-07-23 11:00:44 +02:00
Cristian Maglie
bf24880d7c Merge branch 'lib_manager_filters_fix' of https://github.com/cmaglie/Arduino (#10440) 2020-07-15 17:23:02 +02:00
Martino Facchin
a0acb3ebcb Update WiFi101-Updater to 0.10.11 2020-07-13 17:19:12 +02:00
Cristian Maglie
b66ed5e5d7 LibraryManager: correctly apply "type" and "category" filters together
Previously changing "Category" would filter libraries by the selected
category but without applying the "Type" previously selected.
For instance selecting Type="Installed" and Category="Communication"
will display *all* the libraries belonging to "communication" instead of
the installed only.

This commit fix this behavior.
2020-06-29 17:27:11 +02:00
Cristian Maglie
3263967893 Removed unused include and clueless whitespaces 2020-06-29 17:13:43 +02:00
Cristian Maglie
42865229c2 Library manager: update filters combo box only if there are changes
The filters content is unlikely to change, so just prevent it from live
updating it because it has some side effects:

- it's slow
- it changes the selection back to the default and it's very tricky to
  make it re-select the previous selection.

Fixes #10439
2020-06-29 16:58:25 +02:00
Cristian Maglie
ea84e7383a Starting Arduino IDE 1.8.14 2020-06-24 12:48:12 +02:00
Cristian Maglie
5adf408270 update changelog 1.8.13 2020-06-16 11:37:49 +02:00
Martino Facchin
7e0df39c99
Merge pull request #10371 from cmaglie/fix_http_accept_header
Fixed invalid http accept header
2020-06-16 11:31:09 +02:00
Cristian Maglie
43da7400e4 Fixed invalid http accept header
This patch overrides the default JDK accept header that happens to be
invalid, as per RFC 7231.

Real issue: https://bugs.openjdk.java.net/browse/JDK-8163921

Fix https://github.com/arduino/Arduino/issues/10264
2020-06-15 18:14:07 +02:00
Cristian Maglie
5693423bfe Updated translations 2020-06-15 17:29:51 +02:00
Cristian Maglie
606a0dd2a1 Updated changelog 2020-06-15 17:26:09 +02:00
Martino Facchin
7451dc8b1f avr 1.8.3: add missing checksum file 2020-06-12 18:18:42 +02:00
Martino Facchin
7ce3ca382b avr 1.8.3: update package_index_bundled.json 2020-06-12 18:15:53 +02:00
jenkins
a262cf7e72 update arduino-builder to 1.5.4 2020-06-12 18:10:08 +02:00
Martino Facchin
54e751b012 Update avr core to 1.8.3 and toolchain to 7.3.0-atmel3.6.1-arduino7 2020-06-12 12:24:53 +02:00
Martino Facchin
02d844d806
Merge pull request #10357 from cmaglie/jre-fix-2
Updated appbundler to 1.0ea-arduino8 (fix crash on Macosx Catalina + multi monitor setup)
2020-06-12 12:16:12 +02:00
Cristian Maglie
38c9ed4ce4 Updated appbundler to 1.0ea-arduino8 2020-06-11 16:22:35 +02:00
Martino Facchin
bd0e74345a Update jmdns to 3.5.5 2020-06-03 10:21:06 +02:00
Ricardo JL Rufino
b914070c90 Avoid usueless double calls to rescanLibraries()
Previously rescanLibraries() was automatically called internally in
setLibrariesFolder(). This lead to double calls to rescanLibraries()
when setLibrariesFolder() was used in combination with an explicit
call to rescanLibraries().

This commit adds a new method setLibrariesFoldersAndRescan(..) and
removes the internal call to rescanLibraries() from setLibrariesFolder().

The existing setLibrariesFolder()+rescanLibraries() combos have been
replaced with setLibrariesFoldersAndRescan().

Fix #10228
2020-05-25 17:09:20 +02:00
Ricardo JL Rufino
cc65234582
[IDE] Title of sketch is misaligned on Linux (#10210)
Fix #10209
2020-05-20 11:29:31 +02:00
jenkins
02a2e22649 update arduino-builder to 1.5.3 2020-05-14 17:36:14 +02:00
Cristian Maglie
15089f0c54 Update CONTRIBUTING.md
Co-authored-by: per1234 <accounts@perglass.com>
2020-05-12 16:27:18 +02:00
Gabriel Staples
3aad31489e fix minor error in readme, & explain what is markdown code fencing 2020-05-12 16:27:18 +02:00
Matthijs Kooijman
6d3ad183ab Handle CR without NL printed in EditorConsole
Previously, any CR without NL was treated just like a NL. For tools that
used single CRs to update a progress bar (such as dfu-util), this would
end up printing the subsequent versions of the progress bar below each
other, instead of updating a single line as intended. Additionally,
since ConsoleOutputStream only scrolled the view on \n, these updates
would end up outside of the main view, making the upload progress quite
unclear.

This commit makes EditorConsole support lone CRs by resetting the insert
position to the start of the current line, so subsequent writes
overwrite existing content. If subsequent lines are shorter than an
earlier line, only part of the earlier line will be overwritten (this
mimics what terminal emulators do).
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
fa267da74b EditorConsole: Set up System.out/err redirection in setCurrentEditorConsole
Previously, the redirection would be triggered in the EditorConsole
constructor. However, this was problematic for unittests, which do not
need this redirection.

Since the redirection really is not useful intul there is a current
EditorConsole anyway, it can just be delayed a bit until
setCurrentEditorConsole is called.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
3e3f54c3ca EditorConsole: Allow base to be null
This allows testing this class without going to a full initialization.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
922661930d EditorConsole: Do not trim getText() result
Not trimming makes this method usable for unittesting. Since this method
is not currently used anywhere, it should not affect any behaviour.
2020-05-12 10:36:45 +02:00
Matthijs Kooijman
07b3b9036a AbstractWithPreferencesTest: Disable update checks
This prevents the Arduino instance in tests from checking for updates. I
have not seen any problems resulting from this, but disabling network
requests is generally a good idea in tests (to prevent external factors
from influencing the test results).

In addition to update checks, there is also the CloudBoardResolver that
could do network requests, but there does not seem to be a preference
for disabling that.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
7bc6efa27e HittingEscapeOnCloseConfirmationDialogTest: Match dialog by title
This would match the "Close" dialog, by looking for any JDialog on
screen. However, in some cases, there could be a second dialog (I have
seen a "Install this package to use your xxx board" popup because I
happened to have an Arduino Zero connected, presumably an "Updates are
available" popup could cause this as well).

By matching not just the type of the dialog, but also the title, only
one dialog is matched and the testcase runs more reliably.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
af8e1e6dc4 Tests: Do not read system user's data
The tests would initialize Base, PreferencesData with default settings
and/or run the arduino executable, without specifying any settings to
use. In practice, this would read settings from e.g. `~/.arduino15`,
load libraries from the user's sketchbook, etc.

This is not a good idea, since this can be influence the test. For
example, the presence of invalid libraries would cause extra output to
be generated, which breaks the `--version` test. Or having the "Use
external editor" setting set would break tests that try to edit a
sketch.

This commit fixes this. The core of this commit is in
`AbstractWithPreferencesTest`, which sets up a clean settings dir (to
replace `~/.arduino15`) with a sketchbook and `preferences.txt` file
inside before every test (and removes it again after the test.

For some tests, this is enough, but some tests create an instance of
`Base`, which again initializes everything, including preferences, from
the default location. To prevent that, `--preferences-file` is passed to
the `Base` constructor, loading the previously set up preferences. This
is handled by the new `AbstractWithPreferencesTest.createBase()` method.

Furthermore, CommandLineTest calls the actual Arduino executable, which
has the same problem. This is fixed by passing the same
`--preferences-file` option on the commandline (generated by
`AbstractWithPreferencesTest.getBaseArgs()`).

This should prevent all tests from reading the the default settings
files, fixing some tests on my system and even speeding up the tests
somewhat (due less libraries and cores to load, probably).
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
149aa529e7 PreferencesData: Recreate PreferencesMap in init
Normally, init is only called once during startup, so this does not add
anything. However, when running the testsuite, PreferencesData could be
initialized multiple times in a single test run. To prevent preferences
from a previous test from interfering with subsequent tests, always
start with a clean slate when calling init.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
0e4c900252 AbstractWithPreferencesTest: Clean up files after every test
Previously, this used the DeleteFilesOnShutdown class and a shutdown
hook, which would delete the files only after shutdown. However, the
shutdown handler would be re-added for every testcase, potentially
leading to a lot of threads trying to delete the same files.

This uses an alternative: Just keep a list of files to delete inside the
testcase and use an @After handler to delete the files directly after
each usecase.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
5700d2b539 AbstractGUITest: Make a subclass of AbstractWithPreferencesTest
Both classes contained some duplicate code, so unify that by making one
a subclass of the other. This also prepares for further additions that
should be inherited by both.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
2bd7be07fe CommandLineTest: Print commands being ran
This makes the test output a bit more easier to read.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
2c679f2cf4 CommandLineTest: Produce less verbose output
In one test, `--get-pref` is passed on the commandline to prevent
starting the full GUI. When ran without arguments, `--get-pref` causes
*all* preferences to be printed. Using `--version` achieves the same (no
GUI is started) with just a single line of output.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
514c4bae57 CommandLineTest: Add runArduino helper
This abstracts some the common code (running Arduino, copying
output, waiting for completion, checking result) from all testcases into
a single method. This simplifies each testcase, but also prepares for
adding more common arguments to all runs in a subsequent commit.
2020-05-11 17:13:17 +02:00
Matthijs Kooijman
fc0478eaa9 CommandLineTest: Run findBuildPaths only once
Previously, it was ran before each test, but just running it once before
all tests is sufficient. So switch from @Before to @BeforeClass and make
the its result variable static.
2020-05-11 17:13:17 +02:00