* Imported the new argparse overlay module and added the setup code for the DSL.
* Converted the CMake generator flags to use the new builder DSL.
* Converted the assertions argument group to use the new builder DSL.
* Converted the LLVM-specific settings argument group to use the new builder DSL.
* Converted the Android build settings argument group to use the new builder DSL.
* Removed unused action aliases from the builder DSL setup section to appease the flake8 gods.
* Fixed small typo in help message for --eclipse option.
* Moved top-level arguments into a single clump, rather than interlacing them with other argument groups.
* Re-formatted string literals to use single quotes rather than double in order to remain consistent in style throughout the build_swift module.
* Moved all argument help messages to the last kwarg position to remain consistent and more readable.
* Re-ordered arguments when adding a new option to always have the option strings first and then the action (if applicable).
* Re-arranged kwarg order when creating new parser options to remain consistent.
* Fixed the --enable-tsan-runtime option, which was modified recently.
* Implemented a wrapper module around the standard argparse package, exposing the same interface with some extras on top, including a new builder type with expressive DSL for constructing complex argument parsers.
* Fixed imports in build_swift/argparse/__init__.py to make flake8 happy.
* More re-formmating to meet the exacting standards of the python_lint script.
* Added doc-strings to all the modules in the build_swift argparse overlay.
* Implemented a new BoolType for the argparse module which handles boolean-like values and replaces the hard-coded boolean values in the _ToggleAction class.
* Fixed the mess of imports in the tests sub-package to favor relative imports, so now the unit-tests will actually run as expected. The README has also been updated with a better command for executing the unit-test suite.
* Updated the add_positional method on the ArgumentParser builder class to only take a single action or default to the store action.
* Cleaned up the set_defaults method.
* Added validation test to run the build_swift unit-tests.
* Updated validation-test for the build_swift unit-test suite to use %utils.
* Fixed hard-coded default values in the expected_options module used for generating argument parser tests.
* Updated the comment in the Python validation test to run the build_swift unit-tests.
* Moved argument-defaults logic that should be determined outside the actual parser back into the build-script. This logic will be relocated again at a later date to a more suitable module with testing.
* Moved test-paths argument default logic into build-script until it can find a better home in the future.
* Removed old default value for stdlib_deployment_targets from the expected options.
* Updated the argument-parsing test suite to use a more declarative set of Option classes and included a new test for exhaustiveness which should assure that we are always testing every possible option available in the parser.
* Added a new test to check that all the expected options have default values.
* Converted default values to use the defaults module where appropriate to make the test suite more portable since the original hard-coded values were gathered from my development machine.
I recently broke the out of tree build by mistake [its fixed now ; )]. This
inspired me to make it easy to test this behavior by adding support to
build-script/cmake/etc for running an external benchmark build via
AddExternalProjects.
Now I can just call build-script with --build-external-benchmarks and thats it!
It should just work! It already helped me to avoid breaking the external build
twice!
I hope that eventually we get this on a bot to make sure it keeps working [or
even added to the smoke tests ; )].
*NOTE* This is disabled by default so it will not affect normal builds.
*NOTE* This just builds the external benchmarks. There is an rpath issue that
prevents you from running them (the benchmarks have the rpath set as if they are
next to the stdlib, but they are not. This can be fixed in a few different ways,
but I do not have time to finish implementing it = (. But this commit is a good
first step and at least detects build errors.
Sometimes it's useful to be able to run tests located in specific
directories and/or files, let's enable this in `utils/build-script`
using `--test-paths` option which accepts a list of viable test locations.
Resolves: rdar://problem/32004487
* Added new OptionalTrueAction and OptionalFalseAction classes to the arguments module.
* Fixed missing return statement in help-test generator.
* Renamed all the `skip_build_*` names to the more simple and affirmative `build_*`.
* Renamed all the `skip_test_*` names to the more simple and affirmative `test_*`.
* Added documentation to the OptionalTrueAction and OptionalFalseAction classes.
* Implemented a (mostly) comprehensive test suite for the argument parser (ab)using metaclasses to dynamically generate unit-tests for each valid argument and preset.
* Fixed failing defaults test for build_ninja.
* Added new HelpOption and IgnoreOption classes for generating tests.
* Converted default value test into individual generated tests which should give better output in case the default tests fail.
* Added a new defaults module for configurable constant values used by the argument parser to configure the default build behavior.
* Re-ordered imports in order to satisfy python linter.
* Moved the default argument application logic to the new driver_arguments module in preparation for the larger argument parsing refactor.
* Re-ordered imports in order to satisfy python linter.