about summary refs log tree commit diff
path: root/src/bootstrap/bootstrap_test.py
AgeCommit message (Collapse)AuthorLines
2025-03-17change config.toml to bootstrap.toml for bootstrap modulebit-aloo-3/+3
2024-12-04Reformat Python code with `ruff`Jakub Beránek-13/+29
2024-11-12test(configure): cover `parse_args` in `src/bootstrap/configure.py`ismailarilik-0/+47
2024-06-14fix python bootstrap tests requiring a downloaded stage0Pietro Albini-0/+19
2023-11-09chore(bootstrap): capitalize {error, warning, info, note} tagsonur-ozkan-1/+1
This should enhance the readability. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-24remove change-id assertion in bootstrap testonur-ozkan-1/+0
In the bootstrap test, the assertion of the change-id fails whenever we update the change-id next to a breaking change in build configurations. This commit removes the assertion, as it's not critical or useful to have. Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-10-23Improve android-ndk property interfacePeter Collingbourne-1/+1
PR #105716 added support for NDK r25b, and removed support for r15. Since the switch to r25b would have broken existing r15 users anyway, let's take the opportunity to make the interface more user friendly. Firstly move the android-ndk property to [build] instead of the targets. This is possible now that the NDK has obsoleted the concept of target-specific toolchains. Also make the property take the NDK root directory instead of the "toolchains/llvm/prebuilt/<host tag>" subdirectory.
2023-10-01implement major change tracking for the bootstrap configurationonur-ozkan-1/+1
Signed-off-by: onur-ozkan <work@onurozkan.dev>
2023-08-02Fix recent python linting errorsTrevor Gross-5/+14
- Remove unneeded imports in 'fuscia-test-runner.py' - Add explicit stacklevel to 'x.py' - Fix mutable types as default args in `bootstrap.py` and `bootstrap_test.py`
2023-07-01Don't pass --test-args to `python -m unitest`jyn-3/+12
The args for unittest and cargo test are mutually incompatible. Suggest that people use `python -m unittest ...` manually instead. This also changes `bootstrap_test.py` to be easier to run standalone; see the commit for details.
2023-06-26bootstrap: rename 'user' profile to 'dist'clubby789-1/+1
2023-06-25fix some bugsjyn-0/+1
- fix tests when `--build` is set - don't leak `config.example.toml` fd - don't crash if `config.toml` doesn't exist yet
2023-06-23Test color/verbose/warnings properlyjyn-7/+6
These weren't being passed in to bootstrap consistently before; in particular `serialize_and_parse` forgot to pass them in.
2023-06-23Test cargo arguments passed by bootstrap.pyjyn-24/+52
This moves a lot of code around, but the logic itself is not too terribly complicated. - Move almost all logic in `def bootstrap` to the `RustBuild` class, to avoid mixing setting configuration with running commands - Update various doctests to the new (more complete) RustBuild config. In particular, don't pretend that `bin_root` supports `build` being unset. - Change `parse_args` not to use a global, to allow testing it - Set BUILD_DIR appropriately so bootstrap.py doesn't panic because cargo isn't found
2023-06-23Allow passing arguments to `bootstrap_test.py`jyn-13/+3
Previous, it used the built-in test runner, which doesn't support options unless they're manually passed in the script.
2023-04-27fix bug in set argsyukang-0/+2
2023-04-27add testyukang-0/+6
2023-04-19configure: Set `profile = user` by defaultjyn-0/+1
2023-04-19configure: Fix bug in `configure_top_level_key`jyn-4/+3
Before, it only worked for numbers, not strings.
2023-03-17Use python3.11 in CI to make sure toml is validatedJoshua Nelson-2/+1
This also fixes a regression from https://github.com/rust-lang/rust/pull/106085 which stopped testing that we support python2 in PR CI.
2023-03-17Add tests for configure.pyJoshua Nelson-0/+40
- Separate out functions so that each unit test doesn't create a file on disk - Add a few unit tests Notably, verifying that we generate valid toml relies on python 3.11 so we can use `tomllib`.
2022-01-14Typos fixMaxwase-2/+2
2021-08-26pin the stage0 hashes in src/stage0.jsonPietro Albini-5/+4
2021-08-26switch stage0.txt to stage0.json and add a tool to generate itPietro Albini-20/+0
2020-12-27Don't use `self.date` unconditionally for `program_out_of_date()`Joshua Nelson-5/+6
This avoids unnecessary cache invalidations for programs not affected by the stage0 version (which is everything except the stage0 compiler itself). The redundant invalidations weren't noticed until now because they only showed up on stage0 bumps, at which point people are used to rebuilding everything anyway. I noticed it because I wasn't adding `self.date` to the stamp file (because I didn't realize it was necessary). Rather than adding self.date I thought it was better to remove it from the cache key.
2019-12-21bootstrap.py fetches rustfmt.Adam Perry-2/+2
Co-Authored-By: Mark Rousskov <mark.simulacrum@gmail.com>
2018-12-25Remove licensesMark Rousskov-10/+0
2017-10-09Add __future__ imports to increase compatibility with Python 3. Derive ↵johnthagen-0/+1
Option from object to make it a new-style class for Python 3 compatibility.
2017-09-02Remove invalid doctest from bootstrap.py.kennytm-2/+4
Make sure that if the test is failed, the CI will stop the build.
2017-07-25bootstrap: Major refactoringMilton Mazzarri-0/+114
This commit includes the following: * Fix syntax errors in Python 3 * Include more docstrings in classes, methods, and functions * Include unit tests using `unittest` * Merge implementation of `{rustc,cargo}_out_of_date` * Merge implementation of `RustBuild.{cargo,rustc}` * Remove unnecessary source code * Move all the attributes defined outside of `__init__` * Remove remaining `%s` from print function * Remove `WindowsError` reference on non-windows systems * Rename some variables to be more explicit avoid their meaning * Run bootstrap tests in the CI process * Remove non-pythonic getters * Remove duplicate code in `download_stage0` method * Reduce the number of branches in `build_bootstrap` method * Re-raise exception when we cannot execute uname in non-windows systems * Avoid long lines