Commit Graph

6 Commits

Author SHA1 Message Date
Joshua Nelson c8cac2a2c1 Choose the version of python at runtime (portable version)
- Try `py -3` first for windows compatibility
- Fall back to `python3` if `py` doesn't work
2021-01-14 21:00:42 -05:00
Mark Rousskov 2a663555dd Remove licenses 2018-12-25 21:08:33 -07:00
Titus Barik 04e4d426a1 Rename os variable in bootstrap.py to avoid shadowing os module. 2017-04-30 16:10:31 -04:00
Vadim Petrochenkov 11adac350b bootstrap.py: Report build status
Move some code from x.py to bootstrap.py
2017-03-04 21:38:26 +03:00
Abhishek Chanda b7cd840dd7 Handle Ctrl+C in the build script 2016-12-11 15:25:31 +00:00
Alex Crichton a270b8014c rustbuild: Rewrite user-facing interface
This commit is a rewrite of the user-facing interface to the rustbuild build
system. The intention here is to make it much easier to compile/test the project
without having to remember weird rule names and such. An overall view of the new
interface is:

    # build everything
    ./x.py build

    # document everyting
    ./x.py doc

    # test everything
    ./x.py test

    # test libstd
    ./x.py test src/libstd

    # build libcore stage0
    ./x.py build src/libcore --stage 0

    # run stage1 run-pass tests
    ./x.py test src/test/run-pass --stage 1

The `src/bootstrap/bootstrap.py` script is now aliased as a top-level `x.py`
script. This `x` was chosen to be both short and easily tab-completable (no
collisions in that namespace!). The build system now accepts a "subcommand" of
what to do next, the main ones being build/doc/test.

Each subcommand then receives an optional list of arguments. These arguments are
paths in the source repo of what to work with. That is, if you want to test a
directory, you just pass that directory as an argument.

The purpose of this rewrite is to do away with all of the arcane renames like
"rpass" is the "run-pass" suite, "cfail" is the "compile-fail" suite, etc. By
simply working with directories and files it's much more intuitive of how to run
a test (just pass it as an argument).

The rustbuild step/dependency management was also rewritten along the way to
make this easy to work with and define, but that's largely just a refactoring of
what was there before.

The *intention* is that this support is extended for arbitrary files (e.g.
`src/test/run-pass/my-test-case.rs`), but that isn't quite implemented just yet.
Instead directories work for now but we can follow up with stricter path
filtering logic to plumb through all the arguments.
2016-11-02 17:57:28 -07:00