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.
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.
This also lets ant print a message pointing to this artifact and
explaining the files inside briefly. To make sure this is only printed
inside the github action, an extra `-D` option is passed to `ant test`
from the workflow file.
To allow `if` / `unless` on the echo element, this adds some namespace
definitions (this allows them on *any* element, not just the ones that
explicitly allow it). See https://ant.apache.org/manual/ifunless.html
This ensures that all code is (re)built when running a test. Previously,
only the app code was built (because that's where the tests live),
requiring a manual full build when changing something in arduino-core.
This could lead to confusing situations, where you would changes
something but it was not always automatically recompiled.
This allows running an individual test class by specifying
-Dsingle-test-class=path.to.Classs and methods within the specified
class by specifying -Dsingle-test-methods=testMethod1,testMethod2.
Additionally, this improves the error output, but not showing full
stderr/stdout output when running the full test suite, and by generating
a browsable HTML report with test results (including stdout/stderr
output). When single-test-class is used, detailed output (including
stdout/stderr) is still printed directly.
This also moves the test result XML files into a subdirectory for
clarity, which is removed before starting a testrun (so the HTML report
does not include older test results).
In commit 067d7e925 (Delete builtin libraries sources) all the libraries
in there were removed, since they are all now automatically downloaded
during the build. To keep the repository clean, remove the empty
directory as well as the build rule that was used to copy libraries from
this (now empty) directory into the build result.