Skip to content

Instantly share code, notes, and snippets.

@carols10cents
Last active September 11, 2016 18:58
Show Gist options
  • Save carols10cents/4683ffcdca1e66495f02bca7bf6071ef to your computer and use it in GitHub Desktop.
Save carols10cents/4683ffcdca1e66495f02bca7bf6071ef to your computer and use it in GitHub Desktop.
Test output when using rustup.rs and running cargo's tests
$ make test
sh tests/check-style.sh
checking for lines over 100 characters...
ok
find $(git ls-files) -type f \
\( -perm -u+x -or -perm -g+x -or -perm -o+x \) \
-not -name configure -not -name '*.sh' -not -name '*.rs' \
-not -name '*.py' -not -wholename "*/rust-installer/*" | \
grep '.*' \
&& exit 1 || exit 0
target/snapshot/bin/cargo test --target x86_64-apple-darwin
Compiling num-traits v0.1.34
Compiling bufstream v0.1.2
Compiling num-integer v0.1.32
Compiling num-complex v0.1.33
Compiling num-iter v0.1.32
Compiling num-bigint v0.1.33
Compiling num-rational v0.1.32
Compiling num v0.1.34
Compiling hamcrest v0.1.0
Compiling cargotest v0.1.0 (file:///Users/carolnichols/rust/cargo/tests/cargotest)
Compiling cargo v0.13.0 (file:///Users/carolnichols/rust/cargo)
warning: function is never used: `all_features_flag_enables_all_features`, #[warn(dead_code)] on by default
--> tests/features.rs:965:1
|
965 | fn all_features_flag_enables_all_features() {
| ^
warning: unused attribute, #[warn(unused_attributes)] on by default
--> tests/features.rs:964:1
|
964 | #[test]
| ^^^^^^^
Running target/x86_64-apple-darwin/debug/bad_config-c1e6c1e64f307831
running 33 tests
test bad2 ... ok
test bad3 ... ok
test bad1 ... FAILED
test bad4 ... ok
test bad5 ... ok
test bad_cargo_config_jobs ... ok
test bad_cargo_lock ... ok
test bad_crate_type ... FAILED
test bad_dependency_in_lockfile ... ok
test bad_git_dependency ... ok
test bad_source_config1 ... ok
test bad_source_config2 ... ok
test bad_source_config3 ... ok
test bad_source_config4 ... ok
test bad_source_config5 ... ok
test bad_source_config6 ... ok
test bad_source_config7 ... ok
test ambiguous_git_reference ... ok
test bad_source_in_cargo_lock ... ok
test duplicate_bench_names ... ok
test duplicate_binary_names ... ok
test default_cargo_config_jobs ... FAILED
test duplicate_deps ... ok
test duplicate_example_names ... ok
test duplicate_packages_in_cargo_lock ... ok
test good_cargo_config_jobs ... FAILED
test ignored_git_revision ... ok
test empty_dependencies ... FAILED
test invalid_global_config ... ok
test malformed_override ... ok
test invalid_toml_historically_allowed_is_warned ... FAILED
test both_git_and_path_specified ... ok
test unused_keys ... FAILED
failures:
---- bad1 stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build -v --target=nonexistent-target`
thread 'bad1' panicked at '
Expected: execs
but: differences:
0 - |error: expected table for configuration key `target.nonexistent-target`, but found string in [..]config|
+ |error: Process didn't exit successfully: `rustc -vV` (exit code: 1)|
1 -
+ |--- stderr|
2 -
+ |error: no default toolchain configured|
3 -
+ ||
other output:
``', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
note: Run with `RUST_BACKTRACE=1` for a backtrace.
---- bad_crate_type stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build -v`
thread 'bad_crate_type' panicked at '
Expected: execs
but: differences:
0 - |error: failed to run `rustc` to learn about target-specific information|
+ |error: Process didn't exit successfully: `rustc -vV` (exit code: 1)|
other output:
``', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
---- default_cargo_config_jobs stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build -v`
thread 'default_cargo_config_jobs' panicked at '
Expected: execs
but: exited with exit code: 101
--- stdout
--- stderr
error: Process didn't exit successfully: `rustc -vV` (exit code: 1)
--- stderr
error: no default toolchain configured
', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
---- good_cargo_config_jobs stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build -v`
thread 'good_cargo_config_jobs' panicked at '
Expected: execs
but: exited with exit code: 101
--- stdout
--- stderr
error: Process didn't exit successfully: `rustc -vV` (exit code: 1)
--- stderr
error: no default toolchain configured
', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
---- empty_dependencies stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build`
thread 'empty_dependencies' panicked at '
Expected: execs
but: exited with exit code: 101
--- stdout
--- stderr
warning: dependency (foo) specified without providing a local path, Git repository, or version to use. This will be considered an error in future versions
Updating registry `file:///Users/carolnichols/rust/cargo/target/cit/t26/registry`
error: An unknown error occurred
To learn more, run the command again with --verbose.
', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
---- invalid_toml_historically_allowed_is_warned stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build`
thread 'invalid_toml_historically_allowed_is_warned' panicked at '
Expected: execs
but: exited with exit code: 101
--- stdout
--- stderr
warning: TOML file found which contains invalid syntax and will soon not parse
at `/Users/carolnichols/rust/cargo/target/cit/t30/empty_deps/.cargo/config`.
The TOML spec requires newlines after table definitions (e.g. `[a] b = 1` is
invalid), but this file has a table header which does not have a newline after
it. A newline needs to be added and this warning will soon become a hard error
in the future.
error: An unknown error occurred
To learn more, run the command again with --verbose.
', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
---- unused_keys stdout ----
running `/Users/carolnichols/rust/cargo/target/x86_64-apple-darwin/debug/cargo build`
thread 'unused_keys' panicked at '
Expected: execs
but: exited with exit code: 101
--- stdout
--- stderr
warning: unused manifest key: target.foo.bar
error: An unknown error occurred
To learn more, run the command again with --verbose.
', /Users/carolnichols/.cargo/registry/src/github.com-88ac128001ac3a9a/hamcrest-0.1.0/src/core.rs:22
failures:
bad1
bad_crate_type
default_cargo_config_jobs
empty_dependencies
good_cargo_config_jobs
invalid_toml_historically_allowed_is_warned
unused_keys
test result: FAILED. 26 passed; 7 failed; 0 ignored; 0 measured
error: test failed
make: *** [test-unit-x86_64-apple-darwin] Error 101
With ~/.cargo/bin in my PATH:
$ ./configure --disable-cross-tests --disable-optimize
configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: found cmake
configure: found curl
configure: recreating config.tmp
configure:
configure: processing ./configure args
configure:
configure: CFG_DISABLE_OPTIMIZE := 1
configure: CFG_DISABLE_CROSS_TESTS := 1
configure: CFG_PREFIX := /usr/local
configure: CFG_LOCAL_RUST_ROOT :=
configure: CFG_RUSTC := /Users/carolnichols/.cargo/bin/rust ...
configure: CFG_BUILD := x86_64-apple-darwin
configure: CFG_HOST := x86_64-apple-darwin
configure: CFG_TARGET := x86_64-apple-darwin
configure: CFG_LOCALSTATEDIR := /var/lib
configure: CFG_SYSCONFDIR := /etc
configure: CFG_DATADIR := /usr/local/share
configure: CFG_INFODIR := /usr/local/share/info
configure: CFG_DOCDIR := /usr/local/share/doc/cargo
configure: CFG_MANDIR := /usr/local/share/man
configure: CFG_LIBDIR := /usr/local/lib
configure: CFG_LOCAL_CARGO :=
configure:
configure: validating ./configure args
configure:
configure:
configure: looking for build programs
configure:
configure: CFG_CURLORWGET := /usr/bin/curl (curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5)
configure: CFG_PYTHON := /usr/local/bin/python2.7
configure: CFG_CC := /usr/bin/cc (Apple LLVM version 7.3.0 (clang-703.0.31))
configure: CFG_RUSTDOC := /Users/carolnichols/.cargo/bin/rust ...
configure:
configure: writing configuration
configure:
configure: CFG_SRC_DIR := /Users/carolnichols/rust/cargo/
configure: CFG_BUILD_DIR := /Users/carolnichols/rust/cargo/
configure: CFG_CONFIGURE_ARGS := --disable-cross-tests --disable-opt ...
configure: CFG_PREFIX := /usr/local
configure: CFG_BUILD := x86_64-apple-darwin
configure: CFG_HOST := x86_64-apple-darwin
configure: CFG_TARGET := x86_64-apple-darwin
configure: CFG_DATADIR := /share
configure: CFG_DOCDIR := /share/doc/cargo
configure: CFG_INFODIR := /share/info
configure: CFG_MANDIR := /share/man
configure: CFG_LIBDIR := /lib
configure: CFG_RUSTC := /Users/carolnichols/.cargo/bin/rust ...
configure: CFG_RUSTDOC := /Users/carolnichols/.cargo/bin/rust ...
configure:
configure: leaving ./Makefile unchanged
configure: leaving config.mk unchanged
configure:
configure: complete
configure:
configure:
WITHOUT ~/.cargo/bin in my PATH:
$ ./configure --disable-cross-tests --disable-optimize
configure: looking for configure programs
configure: found cmp
configure: found mkdir
configure: found printf
configure: found cut
configure: found head
configure: found grep
configure: found xargs
configure: found cp
configure: found find
configure: found uname
configure: found date
configure: found tr
configure: found sed
configure: found cmake
configure: found curl
configure: recreating config.tmp
configure:
configure: processing ./configure args
configure:
configure: CFG_DISABLE_OPTIMIZE := 1
configure: CFG_DISABLE_CROSS_TESTS := 1
configure: CFG_PREFIX := /usr/local
configure: CFG_LOCAL_RUST_ROOT :=
configure: CFG_RUSTC := /usr/local/bin/rustc (rustc 1.13.0-dev (1fca1ab0e 2016-09-10))
configure: CFG_BUILD := x86_64-apple-darwin
configure: CFG_HOST := x86_64-apple-darwin
configure: CFG_TARGET := x86_64-apple-darwin
configure: CFG_LOCALSTATEDIR := /var/lib
configure: CFG_SYSCONFDIR := /etc
configure: CFG_DATADIR := /usr/local/share
configure: CFG_INFODIR := /usr/local/share/info
configure: CFG_DOCDIR := /usr/local/share/doc/cargo
configure: CFG_MANDIR := /usr/local/share/man
configure: CFG_LIBDIR := /usr/local/lib
configure: CFG_LOCAL_CARGO :=
configure:
configure: validating ./configure args
configure:
configure:
configure: looking for build programs
configure:
configure: CFG_CURLORWGET := /usr/bin/curl (curl 7.43.0 (x86_64-apple-darwin15.0) libcurl/7.43.0 SecureTransport zlib/1.2.5)
configure: CFG_PYTHON := /usr/local/bin/python2.7
configure: CFG_CC := /usr/bin/cc (Apple LLVM version 7.3.0 (clang-703.0.31))
configure: CFG_RUSTDOC := /usr/local/bin/rustdoc (rustdoc 1.13.0-dev (1fca1ab0e 2016-09-10))
configure:
configure: writing configuration
configure:
configure: CFG_SRC_DIR := /Users/carolnichols/rust/cargo/
configure: CFG_BUILD_DIR := /Users/carolnichols/rust/cargo/
configure: CFG_CONFIGURE_ARGS := --disable-cross-tests --disable-opt ...
configure: CFG_PREFIX := /usr/local
configure: CFG_BUILD := x86_64-apple-darwin
configure: CFG_HOST := x86_64-apple-darwin
configure: CFG_TARGET := x86_64-apple-darwin
configure: CFG_DATADIR := /share
configure: CFG_DOCDIR := /share/doc/cargo
configure: CFG_INFODIR := /share/info
configure: CFG_MANDIR := /share/man
configure: CFG_LIBDIR := /lib
configure: CFG_RUSTC := /usr/local/bin/rustc
configure: CFG_RUSTDOC := /usr/local/bin/rustdoc
configure:
configure: leaving ./Makefile unchanged
configure: mv config.tmp config.mk
configure:
configure: complete
configure:
configure:

Makefile.in has:

export PATH := $(dir $(CFG_RUSTC)):$(PATH)

If I change Makefile.in to be this, to see what the path is when we're running tests:

test-unit-$(1): $$(CARGO)
	@mkdir -p target/$(1)/cit
    $(info PATH is $(PATH))
	$$(CARGO) test --target $(1) $$(CARGOFLAGS) $$(VERBOSE_FLAG) $$(only)
endef
$(foreach target,$(CFG_TARGET),$(eval $(call CARGO_TARGET,$(target))))

Then run:

$ ./configure --disable-cross-tests --disable-optimize
$ make test-unit-x86_64-apple-darwin

I get:

PATH is /Users/carolnichols/.cargo/bin/:/Users/carolnichols/.cargo/bin:bin:/Users/carolnichols/.rvm/gems/ruby-2.3.0/bin:/Users/carolnichols/.rvm/gems/ruby-2.3.0@global/bin:/Users/carolnichols/.rvm/rubies/ruby-2.3.0/bin:/usr/local/heroku/bin:/Users/carolnichols/bin:/usr/local/bin:/usr/local/heroku/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/Users/carolnichols/.rvm/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/npm/bin:./node_modules/.bin:/Users/carolnichols/.rvm/bin
target/snapshot/bin/cargo test --target x86_64-apple-darwin
     Running target/x86_64-apple-darwin/debug/bad_config-c1e6c1e64f307831

running 33 tests
test bad2 ... ok
test bad3 ... ok
test bad1 ... FAILED
... etc

So rustup's path is in my PATH twice.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment