Skip to content

Conversation

nodakai
Copy link
Contributor

@nodakai nodakai commented Apr 11, 2016

in order to advise contributors to locally test their patches.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

README.md Outdated
We have two automated tests running on [Travis](https://travis-ci.org/rust-lang/libc):

1. `libc-test`
- `cd libc-test && cargo clean && cargo run`
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In theory this should just be cargo run --manifest-path libc-test/Cargo.toml, how come the cargo clean is here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cargo clean is for making sure all.c is regenerated according to the latest code of the libc crate.

$ cd libc-test; cargo build
$ echo 'extern { pub fn xyzzy() -> ::c_int; }' >> ../src/unix/mod.rs
$ cargo run
   Compiling libc v0.2.9 (file:///tmp/libc/libc-test)
   Compiling libc-test v0.1.0 (file:///tmp/libc/libc-test)
     Running `target/debug/libc-test`
RUNNING ALL TESTS
PASSED 6086 tests
$ cargo clean; cargo run                                                                                                                                                                                                                 (git)-master 
   Compiling winapi v0.2.6
   Compiling winapi-build v0.1.1
   Compiling gcc v0.3.25
   Compiling libc v0.2.8
   Compiling unicode-xid v0.0.3
   Compiling bitflags v0.3.3
   Compiling rustc-serialize v0.3.18
   Compiling libc v0.1.12
   Compiling libc v0.2.9 (file:///tmp/libc/libc-test)
   Compiling kernel32-sys v0.2.1
   Compiling term v0.2.14
   Compiling log v0.3.5
   Compiling syntex_syntax v0.19.1
   Compiling ctest v0.1.0 (https://github.com/alexcrichton/ctest#50ac771a)
   Compiling libc-test v0.1.0 (file:///tmp/libc/libc-test)
failed to run custom build command for `libc-test v0.1.0 (file:///tmp/libc/libc-test)`
Process didn't exit successfully: `/tmp/libc/libc-test/target/debug/build/libc-test-475f1c4bf6cbc262/build-script-build` (exit code: 101)
...snip...
--- stderr
/tmp/libc/libc-test/target/debug/build/libc-test-475f1c4bf6cbc262/out/all.c: In function ‘__test_fn_xyzzy’:
/tmp/libc/libc-test/target/debug/build/libc-test-475f1c4bf6cbc262/out/all.c:12758:24: error: ‘xyzzy’ undeclared (first use in this function)
                 return xyzzy;
                        ^
/tmp/libc/libc-test/target/debug/build/libc-test-475f1c4bf6cbc262/out/all.c:12758:24: note: each undeclared identifier is reported only once for each function it appears in
/tmp/libc/libc-test/target/debug/build/libc-test-475f1c4bf6cbc262/out/all.c:12759:13: error: control reaches end of non-void function [-Werror=return-type]
             }
             ^
...snip...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that was fixed in a more recent version of ctest, can you try updating that dependency for ctest?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't it not enough to run rm -rf libc; rm -rf ~/.cargo; git clone https://github.com/rust-lang/libc.git ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nah we check in a lock file here so you'll need to run cargo update

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, confirmed, but

  1. Please update the lock file on your side. In a sense you chose not to release the fix on rerun-if-changed by distributing the lock file.
  2. I found the semantic version of a Git dependency confusing. I filed Versioning of a Git dependency is confusing cargo#2586

@alexcrichton
Copy link
Member

Thanks! Definitely seems like good information to have.

@alexcrichton
Copy link
Member

In a sense you chose not to release the fix on rerun-if-changed by distributing the lock file.

Or rather I chose to have stability over gaining new features asap :)

Do you want to check in the upgrade to Cargo.lock as part of this PR as well?

in order to advise contributors to locally test their patches.

Also update ctest to include a fix on rerun-if-changed so that human
developers doing trial & error can properly test their latest code.

Signed-off-by: NODA, Kai <[email protected]>
@nodakai
Copy link
Contributor Author

nodakai commented Apr 27, 2016

+curl https://static.rust-lang.org/rustup.sh

++rustc --print sysroot

  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current

                                 Dload  Upload   Total   Spent    Left  Speed

  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0+sh -s -- --add-target=x86_64-apple-ios --disable-sudo -y --prefix=/Users/travis/rust

100 60459  100 60459    0     0   107k      0 --:--:-- --:--:-- --:--:--  107k

rustup: assert_nz url is empty!

@alexcrichton
Copy link
Member

@bors: r+ cba130b

@bors
Copy link
Contributor

bors commented Apr 27, 2016

⌛ Testing commit cba130b with merge 012d1e0...

bors added a commit that referenced this pull request Apr 27, 2016
Explain about the automated tests on Travis

in order to advise contributors to locally test their patches.
@bors
Copy link
Contributor

bors commented Apr 27, 2016

💔 Test failed - travis

@alexcrichton
Copy link
Member

@bors: retry

On Tue, Apr 26, 2016 at 11:45 PM, bors [email protected] wrote:

[image: 💔] Test failed - travis
https://travis-ci.org/rust-lang/libc/builds/126025430


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#259 (comment)

@bors
Copy link
Contributor

bors commented Apr 27, 2016

⌛ Testing commit cba130b with merge 58165d4...

bors added a commit that referenced this pull request Apr 27, 2016
Explain about the automated tests on Travis

in order to advise contributors to locally test their patches.
@bors
Copy link
Contributor

bors commented Apr 27, 2016

💔 Test failed - travis

@alexcrichton
Copy link
Member

@bors: retry

On Wednesday, April 27, 2016, bors [email protected] wrote:

[image: 💔] Test failed - travis
https://travis-ci.org/rust-lang/libc/builds/126148305


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#259 (comment)

@bors
Copy link
Contributor

bors commented Apr 28, 2016

⌛ Testing commit cba130b with merge 8025a3e...

bors added a commit that referenced this pull request Apr 28, 2016
Explain about the automated tests on Travis

in order to advise contributors to locally test their patches.
@bors
Copy link
Contributor

bors commented Apr 28, 2016

☀️ Test successful - status-appveyor, travis

@bors bors merged commit cba130b into rust-lang:master Apr 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants