Skip to content

Commit 01aec90

Browse files
committed
Debug freebsd error
1 parent 8bbba5b commit 01aec90

File tree

5 files changed

+20
-13
lines changed

5 files changed

+20
-13
lines changed

ci/run.bash

+12-11
Original file line numberDiff line numberDiff line change
@@ -53,17 +53,18 @@ run_download_pkg_test() {
5353
}
5454

5555
if [ -z "$SKIP_TESTS" ]; then
56-
cargo run --locked --release --target "$TARGET" "${FEATURES[@]}" -- --dump-testament
57-
run_download_pkg_test
58-
runtest --bin rustup-init
59-
runtest --lib --all
60-
runtest --doc --all
56+
runtest --test cli-rustup -- recursive_cargo
57+
# cargo run --locked --release --target "$TARGET" "${FEATURES[@]}" -- --dump-testament
58+
# run_download_pkg_test
59+
# runtest --bin rustup-init
60+
# runtest --lib --all
61+
# runtest --doc --all
6162

62-
runtest --test dist -- --test-threads 1
63+
# runtest --test dist -- --test-threads 1
6364

64-
find tests -maxdepth 1 -type f ! -path '*/dist.rs' -name '*.rs' \
65-
| sed -e 's@^tests/@@;s@\.rs$@@g' \
66-
| while read -r test; do
67-
runtest --test "${test}"
68-
done
65+
# find tests -maxdepth 1 -type f ! -path '*/dist.rs' -name '*.rs' \
66+
# | sed -e 's@^tests/@@;s@\.rs$@@g' \
67+
# | while read -r test; do
68+
# runtest --test "${test}"
69+
# done
6970
fi

src/test.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ macro_rules! for_host {
136136
};
137137
}
138138

139-
#[derive(Clone)]
139+
#[derive(Debug, Clone)]
140140
/// The smallest form of test isolation: an isolated RUSTUP_HOME, for codepaths
141141
/// that read and write config files but do not invoke processes, download data
142142
/// etc.

tests/cli-rustup.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -570,6 +570,7 @@ fn fallback_cargo_calls_correct_rustc() {
570570
#[test]
571571
fn recursive_cargo() {
572572
setup(&|config| {
573+
eprintln!("{:#?}", config);
573574
expect_ok(config, &["rustup", "default", "nightly"]);
574575

575576
// We need an intermediary to run cargo itself.
@@ -583,8 +584,11 @@ fn recursive_cargo() {
583584
let real_mock_cargo = output.stdout.trim();
584585
let cargo_bin_path = config.cargodir.join("bin");
585586
let cargo_subcommand = cargo_bin_path.join(format!("cargo-foo{}", EXE_SUFFIX));
587+
eprintln!("real_mock_carg={real_mock_cargo:?}");
588+
eprintln!("cargo_bin_path={cargo_bin_path:?}");
589+
eprintln!("cargo_subcommand={cargo_subcommand:?}");
586590
fs::create_dir_all(&cargo_bin_path).unwrap();
587-
fs::hard_link(&real_mock_cargo, &cargo_subcommand).unwrap();
591+
fs::copy(&real_mock_cargo, &cargo_subcommand).unwrap();
588592

589593
expect_stdout_ok(
590594
config,

tests/mock/clitools.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use crate::mock::topical_doc_data;
2828
use crate::mock::{MockComponentBuilder, MockFile, MockInstallerBuilder};
2929

3030
/// The configuration used by the tests in this module
31+
#[derive(Debug)]
3132
pub struct Config {
3233
/// Where we put the rustup / rustc / cargo bins
3334
pub exedir: PathBuf,

tests/mock/mock_bin_src.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ fn main() {
1111
let me = env::current_exe().unwrap();
1212
let mut version_file = PathBuf::from(format!("{}.version", me.display()));
1313
let mut hash_file = PathBuf::from(format!("{}.version-hash", me.display()));
14+
eprintln!("{version_file:?}");
1415
if !version_file.exists() {
1516
// There's a "MAJOR HACKS" statement in `toolchain.rs` right
1617
// now where custom toolchains use a `cargo.exe` that's

0 commit comments

Comments
 (0)