You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if it's empty, or contains any empty components, compiletest adds " -L " to the target_rustcflags, without anything after it.
Part of the problem here is that std::env::split_paths("") is not an empty sequence [], but has one empty element [""] (Playground example). So a workaround is needed for that.
$ cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.03s
Running target/debug/deps/image-2fef4cbf6d86ba78
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/runtests-d1b0a6cde5f3e413
running 1 test
test compile_test ... FAILED
failures:
---- compile_test stdout ----
thread 'compile_test' panicked at 'Cannot link to dependencies. Problem with env var 'DYLD_LIBRARY_PATH': NotPresent', /Users/jorendorff/.cargo/registry/src/github.com-1ecc6299db9ec823/compiletest_rs-0.5.0/src/common.rs:254:13
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
compile_test
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out
error: test failed, to rerun pass '--test runtests'
$ DYLD_LIBRARY_PATH= cargo test
Finished test [unoptimized + debuginfo] target(s) in 0.05s
Running target/debug/deps/image-2fef4cbf6d86ba78
running 0 tests
test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out
Running target/debug/deps/runtests-d1b0a6cde5f3e413
running 1 test
running 8 tests
test [compile-fail] asynchronous/future-not-send-dyn.rs ... FAILED
test [compile-fail] asynchronous/future-lifetime.rs ... FAILED
test [compile-fail] asynchronous/async-block-return-type.rs ... FAILED
test [compile-fail] asynchronous/future-not-send-rc.rs ... FAILED
test [compile-fail] asynchronous/async-fn-not-unpin.rs ... FAILED
test [compile-fail] asynchronous/wrong_mutex.rs ... FAILED
test [compile-fail] asynchronous/fake-read-to-string.rs ... FAILED
test [compile-fail] asynchronous/left-or-right.rs ... FAILED
failures:
failures:
[compile-fail] asynchronous/async-block-return-type.rs
[compile-fail] asynchronous/async-fn-not-unpin.rs
[compile-fail] asynchronous/fake-read-to-string.rs
[compile-fail] asynchronous/future-lifetime.rs
[compile-fail] asynchronous/future-not-send-dyn.rs
[compile-fail] asynchronous/future-not-send-rc.rs
[compile-fail] asynchronous/left-or-right.rs
[compile-fail] asynchronous/wrong_mutex.rs
test result: FAILED. 0 passed; 8 failed; 0 ignored; 0 measured; 0 filtered out
test compile_test ... FAILED
failures:
---- compile_test stdout ----
error: asynchronous/future-lifetime.rs:44: expected error not found: `host` does not live long enough
error: asynchronous/async-block-return-type.rs:48: expected note not found: consider giving `future` a type
error:
error: asynchronous/future-lifetime.rs:44: expected error not found: `path` does not live long enough
asynchronous/async-block-return-type.rs:53: expected error not found: type annotations needed
error: 0 unexpected errors found, 2 expected errors not found
status: exit code: 1
command: "rustc" "asynchronous/future-lifetime.rs" "-L" "/var/folders/2f/vxcscyq11kg3439lb05pmj8c0000gn/T/" "--target=x86_64-apple-darwin" "--error-format" "json" "-C" "prefer-dynamic" "-o" "/var/folders/2f/vxcscyq11kg3439lb05pmj8c0000gn/T/future-lifetime.stage-id" "-A" "unused" "--edition" "2018" "--extern" "image" "-L" "-L" "/var/folders/2f/vxcscyq11kg3439lb05pmj8c0000gn/T/future-lifetime.stage-id.aux"
...
Note the "-L" "-L" "/var/..." at the end of the rustc command. The first -L is added by Config::link_deps, because the environment variable is empty. If I do LD_LIBRARY_PATH=banana cargo test, tests run normally.
The text was updated successfully, but these errors were encountered:
Two separate bugs here. Full output below, but in short:
DYLD_LIBRARY_PATH
is not set,compiletest
fails inConfig::link_deps
: https://github.com/laumann/compiletest-rs/blob/master/src/common.rs#L253-L255compiletest
adds" -L "
to thetarget_rustcflags
, without anything after it.Part of the problem here is that
std::env::split_paths("")
is not an empty sequence[]
, but has one empty element[""]
(Playground example). So a workaround is needed for that.Note the
"-L" "-L" "/var/..."
at the end of the rustc command. The first-L
is added byConfig::link_deps
, because the environment variable is empty. If I doLD_LIBRARY_PATH=banana cargo test
, tests run normally.The text was updated successfully, but these errors were encountered: