Commit graph

37 commits

Author SHA1 Message Date
Alex Crichton 4abf27e7b5 Bootstrap cargo with cargo 2014-07-25 21:20:28 -07:00
Alex Crichton 93c2d0d4ff Allow omitting part of the output of a process
Sometimes it's a pain to match the *exact* output of a process, so this adds a
placeholder where `[..]` indicates "any more input on this line". It can in
theory be used multiple times in a input string.
2014-07-23 12:52:18 -07:00
bors 91453d1ffa auto merge of #238 : alexcrichton/cargo/cstr-builder, r=wycats
At the same time, remove a bunch of `path.display().to_string()` and friends.
2014-07-22 15:44:51 +00:00
bors 6ff9baed25 auto merge of #235 : rust-lang/cargo/better-test-output, r=alexcrichton
@alexcrichton r?
2014-07-22 05:22:22 +00:00
Alex Crichton 73049b3868 Move git macros to using arg() 2014-07-21 19:34:17 -07:00
Christoph Burgdorf c0d2b79ef1 kill unnecessary lifetime annotations
This commit removes lifetime annotations
that are now automatically inferred by
the compiler.
2014-07-22 00:08:06 +02:00
Yehuda Katz 51432d488a Improve test output 2014-07-21 12:23:01 -07:00
Yehuda Katz 4e6c3bd10a Improve error message on failed compile 2014-07-21 10:38:31 -07:00
Brian Koropoff 895f541192 Add regression test for running cargo test twice 2014-07-20 17:33:08 -07:00
Alex Crichton aaaf9dbf1e Update to master 2014-07-18 07:40:15 -07:00
Alex Crichton 835e5ac1ac Fix inferred name of src/main.rs
The crate name should be the package name, not `main`.

Closes #207
2014-07-16 18:44:30 -07:00
Alex Crichton 3608fd4892 Update toml-rs
TOML recently grew multiline string literals as well as literal strings with no
escaping, which can be used instead of the hokey escape_path() function.
2014-07-16 08:08:55 -07:00
Alex Crichton 685f2b4ee7 Add some simple tests for cross compilation 2014-07-11 09:08:51 -07:00
Michael Gehring 139e81ea82 ToStr::to_str -> ToString::to_string
Conflicts:
	src/cargo/core/resolver.rs
	src/cargo/ops/cargo_rustc.rs
2014-07-10 08:37:57 -07:00
Alex Crichton 558e75347e Fix --release not compiling upstream deps with -O3
This touches up the filtering logic to ensure that upstream dependencies as well
as local dependencies are built with optimizations when `cargo build --release`
is used.
2014-07-09 13:55:00 -07:00
Joshua DeSeno 0025dbde64 cargo clean. resolves #51 2014-07-08 21:54:15 +09:00
Tom Jakubowski f488174208 fingerprint: Recover from fs::stat errors
Fingerprinting will fail at an fs::stat() call if there is a broken
symlink in a package's directory.  This commit recovers from fs::stat()
errors on broken symlinks by treating them as having mtime 0, which
should not affect the overall fingerprint.

Fix #135
2014-07-07 15:33:40 -07:00
bors aa8986ffc4 auto merge of #87 : alexcrichton/cargo/toml-warnings, r=wycats
Closes #27
2014-06-30 20:00:09 +00:00
Alex Crichton a2aa2bf938 Warn about unused TOML keys
Closes #27
2014-06-28 15:18:44 -07:00
Alex Crichton 0ccb2fa2e2 Use a custom rm_rf to paper over windows git funkiness 2014-06-28 12:28:36 -07:00
bors c919f2f646 auto merge of #70 : alexcrichton/cargo/buildbot, r=wycats
* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.
2014-06-27 03:36:24 +00:00
Alex Crichton ad19a31d9b Prepare for buildbot automation
* The installation script was modified to recognize when its running on windows,
  as well as tweaking how it downloads and installs snapshots. The goal here was
  to make the script runnable on buildbot for mac/linux/windows with 32/64 bit
  options on mac/linux.

* The installation script now install rustc to `rustc/bin` in the local
  directory to have parallel builds on buildbot.

* The tests now store all their temporary state locally in the build directory
  to enable parallel builds on buildbot.

* A shell test is ignored which assumed the presence of a TTY output.
2014-06-26 20:25:30 -07:00
Tim Carey-Smith 13eb123213 Add cargo test 2014-06-26 16:47:27 -07:00
Alex Crichton c3ec9999cb Ignore \r in output matching
Windows occasionally has \r\n while everywhere else has \n. Instead of worrying
about the difference, just replace all instances of \r with nothing and rely on
matching against \n.
2014-06-25 11:15:04 -07:00
Alex Crichton 80a81334f6 Fix lots of windows tests
* Add a convenience method bin() for generating the name of a binary. On windows
  this remembers to append `.exe`.

* Stop executing relative paths to binaries and relying on PATH. This is
  suffering from rust-lang/rust#15149 and failing to spawn processes on windows.
  Additionally, this allows the tests to work with a pre-installed cargo becuase
  the freshly built executables are precisely specified.

* A new function, escape_path(), was added for tests. When generated source
  files with paths, this function needs to be called to properly escape the
  \-character that appears in windows path names. Without this function we would
  be generating invalid TOML and rust.
2014-06-25 11:15:04 -07:00
Alex Crichton 06d19011db Fix rm_rf on windows
Apparently git checkouts have objects in the database with permissions 444 which
need to be changed to something with a write permission before removal.
2014-06-25 11:12:56 -07:00
Yehuda Katz 19bea0ad0c Thread the shell through more of the system 2014-06-21 22:22:56 -07:00
Yehuda Katz 687035657d Terminal colors 2014-06-21 18:53:07 -07:00
Alex Crichton e05b4dc838 Don't rebuild dependencies if they haven't changed
This commit adds support for recognizing "fingerprints" of upstream
dependencies. When a dependency's fingerprint change, it must be rebuilt.
Currently the fingerprint unconditionally includes the version of the compiler
you're using as well as a specialized version depending on the type of source
you're compiling from:

  - git sources return their fingerprint as the current SHA. This will
    disregard any local changes.
  - path sources return their fingerprint as the maximum mtime of any file found
    at the location. This is a little too coarse and may rebuild packages too
    often (due to sub-packages), but this should get the job done for now.

When executing `cargo compile`, dependencies are not rebuilt if their
fingerprint remained constant.
2014-06-19 21:55:37 -07:00
Alex Crichton 64ff29ff86 Update to rust style guidelines
* 80 char line limit highly recommended
* /// and //! for doc comments
2014-06-19 17:02:21 -07:00
Alex Crichton a9d8d2c62a Run tests in parallel
Give each test is own root inside of the shared root to ensure that the tests
are still isolated from one another.
2014-06-19 11:52:51 -07:00
Alex Crichton fbfa8bdeca Make CARGO_BIN_PATH optional for tests
This allows easier use of running tests by hand.
2014-06-19 11:52:51 -07:00
Alex Crichton 3433a01eba Allow custom precompile commands
This commit enables support for custom precompilation commands to be triggered
before a package builds via rustc. The current interface is to have
`build = "foo"` in the `[project]` section of Cargo.toml and cargo will just
execute the exact command given.
2014-06-19 11:52:51 -07:00
Yehuda Katz 8c72add4f5 Squelch warnings and minor cleanup 2014-06-19 01:21:24 -07:00
Yehuda Katz 3e09f70259 Initial pass at boxed errors
The next step is to clean up the error handling in general so that
failure cases produce good errors.
2014-06-19 00:57:12 -07:00
Carl Lerche + Yehuda Katz 512ec4b794 Fix tests 2014-06-13 14:19:06 -07:00
Carl Lerche + Yehuda Katz 35e21c7600 Smoke test for git support 2014-06-12 15:51:16 -07:00