Skip to content

Commit

Permalink
Rollup merge of #100468 - cuviper:lazy-x, r=jyn514
Browse files Browse the repository at this point in the history
Use an extensionless `x` script for non-Windows

#99992 added `x.sh` and `x.ps1`, but this broke my lazy `./xTAB` habit that used to get me to `./x.py`. If we rename `x.sh` to `x`, then I can adjust to `./xSPACE` for the same number of characters typed.

r? `@jyn514`
  • Loading branch information
compiler-errors authored Aug 14, 2022
2 parents 86e1d1e + de8dedb commit 809fc86
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/bootstrap/mk/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ TESTS_IN_MINGW_2 := \
src/test/ui

ci-mingw-subset-1:
$(Q)$(CFG_SRC_DIR)/x.sh test --stage 2 $(TESTS_IN_MINGW_2:%=--exclude %)
$(Q)$(CFG_SRC_DIR)/x test --stage 2 $(TESTS_IN_MINGW_2:%=--exclude %)
ci-mingw-subset-2:
$(Q)$(BOOTSTRAP) test --stage 2 $(TESTS_IN_MINGW_2)

Expand Down
4 changes: 2 additions & 2 deletions src/ci/docker/host-x86_64/x86_64-gnu-llvm-12/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,15 @@ ENV RUST_CONFIGURE_ARGS \
--enable-llvm-link-shared \
--set rust.thin-lto-import-instr-limit=10

# NOTE: intentionally uses all of `x.py`, `x.sh`, and `x.ps1` to make sure they all work on Linux.
# NOTE: intentionally uses all of `x.py`, `x`, and `x.ps1` to make sure they all work on Linux.
ENV SCRIPT ../x.py --stage 2 test --exclude src/tools/tidy && \
# Run the `mir-opt` tests again but this time for a 32-bit target.
# This enforces that tests using `// EMIT_MIR_FOR_EACH_BIT_WIDTH` have
# both 32-bit and 64-bit outputs updated by the PR author, before
# the PR is approved and tested for merging.
# It will also detect tests lacking `// EMIT_MIR_FOR_EACH_BIT_WIDTH`,
# despite having different output on 32-bit vs 64-bit targets.
../x.sh --stage 2 test src/test/mir-opt \
../x --stage 2 test src/test/mir-opt \
--host='' --target=i686-unknown-linux-gnu && \
# Run the UI test suite again, but in `--pass=check` mode
#
Expand Down
2 changes: 1 addition & 1 deletion src/tools/tidy/src/bins.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ mod os_impl {
pub fn check(path: &Path, bad: &mut bool) {
use std::ffi::OsStr;

const ALLOWED: &[&str] = &["configure"];
const ALLOWED: &[&str] = &["configure", "x"];

crate::walk_no_read(
path,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion x.ps1
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env pwsh

# See x.sh for why these scripts exist.
# See ./x for why these scripts exist.

$xpy = Join-Path $PSScriptRoot x.py
# Start-Process for some reason splits arguments on spaces. (Isn't powershell supposed to be simpler than bash?)
Expand Down
2 changes: 1 addition & 1 deletion x.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/env python3
# Some systems don't have `python3` in their PATH. This isn't supported by x.py directly;
# they should use `x.sh` or `x.ps1` instead.
# they should use `x` or `x.ps1` instead.

# This file is only a "symlink" to bootstrap.py, all logic should go there.

Expand Down

0 comments on commit 809fc86

Please sign in to comment.