Commit Graph

355 Commits

Author SHA1 Message Date
Marvin Löbel
06d1dccf95 Turned extra::getopts functions into methods
Some minor api and doc adjustments
2013-09-19 12:32:18 +02:00
blake2-ppc
b5d560a9e0 std: Remove {float,f64,f32}::from_str in favor of from_str
Like issue #9209, remove float::{from_str, from_str_radix} in favor of
the two corresponding traits. The same for modules f64 and f32.

New usage is

	from_str::<float>("1.2e34")
2013-09-18 04:02:42 +02:00
Erick Tryzelaar
45c62c08f9 std: rename Option::unwrap_or_default() to unwrap_or() 2013-09-12 18:54:11 -07:00
Florian Hahn
de39874801 Rename str::from_bytes to str::from_utf8, closes #8985 2013-09-05 14:17:24 +02:00
Felix S. Klock II
7f834c5c07 Update clients of path.rs to use new API.
In most cases this involved removing a ~str allocations or clones
(yay), or coercing a ~str to a slice.  In a few places, I had to bind
an intermediate Path (e.g. path.pop() return values), so that it would
live long enough to support the borrowed &str.

And in a few places, where the code was actively using the property
that the old API returned ~str's, I had to put in to_owned() or
clone(); but in those cases, we're trading an allocation within the
path.rs code for one in the client code, so they neutralize each
other.
2013-09-04 13:10:32 +02:00
bors
64ff315584 auto merge of #8950 : sanxiyn/rust/cross-xfail, r=brson 2013-09-03 23:15:56 -07:00
Seo Sanghyeon
877e7f3463 Correctly determine OS to xfail in cross build 2013-09-03 19:34:23 +09:00
Alex Crichton
aeb2f88a48 Raise the file descriptor limits when running compiletest
We already do this for libstd tests automatically, and compiletest runs into the
same problems where when forking lots of processes lots of file descriptors are
created. On OSX we can use specific syscalls to raise the limits, in this
situation, though.

Closes #8904
2013-09-02 21:50:50 -07:00
bors
6a225951e3 auto merge of #8886 : cmr/rust/test-restructure, r=cmr 2013-08-30 14:00:43 -07:00
Corey Richardson
f585767fba Revert "Teach compiletest to use multiple --src-base's"
This reverts commit 8a07f57081.
2013-08-30 16:17:32 -04:00
Corey Richardson
fdcc415957 Revert "Teach the makefile to use multiple src-base's"
This reverts commit 43f851d2cb.
2013-08-30 16:17:29 -04:00
bors
974f854bb5 auto merge of #8839 : sanxiyn/rust/env, r=thestinger 2013-08-30 00:15:47 -07:00
bors
7c6c7519a7 auto merge of #8458 : cmr/rust/test-restructure, r=brson
This should make benchmarks easier to understand. But, it doesn't work.
BENCH_RS in mk/tests.mk has everything, from what I can tell in remake, but
only those that are direct children of src/test/bench get build and run.
@graydon, can you lend your expertise? I can't make heads or tails of this
makefile.
2013-08-29 18:45:47 -07:00
Brian Anderson
3c5a43e5b6 Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, r=brson"
This reverts commit b8d1fa3994, reversing
changes made to f22b4b1698.

Conflicts:
	mk/rt.mk
	src/libuv
2013-08-29 14:23:44 -07:00
Seo Sanghyeon
97b542bd84 Android: Pass the environment when running tests 2013-08-28 21:44:55 +09:00
Seo Sanghyeon
fcce7e82db Remove --newrt option 2013-08-28 21:25:12 +09:00
Corey Richardson
43f851d2cb Teach the makefile to use multiple src-base's 2013-08-28 08:16:21 -04:00
Corey Richardson
8a07f57081 Teach compiletest to use multiple --src-base's 2013-08-28 08:16:19 -04:00
Alex Crichton
b89e1c000e Implement process bindings to libuv
Closes #6436
2013-08-27 20:46:43 -07:00
Vadim Chugunov
a903f741b0 Since we assume that GDB output is UTF-8, make sure it is so on all platforms.
Otherwise it'll choose some "appropriate" platform-specific default (e.g. CP1252 on Windows).
2013-08-26 01:23:17 -07:00
Graydon Hoare
2fb5c49abb test: add support for sharding testsuite by passing --test-shard=a.b 2013-08-23 15:30:23 -07:00
Graydon Hoare
610b2b58ec compiletest: do not run tests in sub-threads if on valgrind. 2013-08-19 15:09:20 -07:00
bors
8ac17731eb auto merge of #8531 : brson/rust/test-waitpid-workaround, r=graydon
...er

I believe the calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.

Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.

This should have a pretty good impact on cycle times.

cc @toddaaro
2013-08-17 00:22:05 -07:00
Brian Anderson
15fca2dad7 compiletest: Run tests in their own thread to avoid blocking the scheduler
The calls to waitpid are interacting badly with the message passing that goes
on between schedulers and causing us to have very little parallelism in
the test suite. I don't fully understand the sequence of events that causes
the problem here but clearly blocking on waitpid is something that a
well-behaved task should not be doing.

Unfortunately this adds quite a bit of overhead to each test: one thread, two
tasks, three stacks, so there's a tradeoff. The time to execute run-pass on
my 4-core machine goes from ~750s to ~300s.
2013-08-14 23:41:31 -07:00
Tim Chevalier
cf4694e73b std: Change ProcessOptions struct to have an option of a ~ vector
This is a workaround for #8498
2013-08-14 16:52:05 -07:00
Erick Tryzelaar
f9dee04aaa std: Iterator.len_ -> .len 2013-08-10 07:33:22 -07:00
Erick Tryzelaar
68f40d215e std: Rename Iterator.transform -> .map
cc #5898
2013-08-10 07:33:21 -07:00
blake2-ppc
8523f6d643 rustc: Fix for-range loops that can use iterators
Transform range loops that can be regular iterator loops.
2013-08-07 22:39:57 -04:00
Erick Tryzelaar
1e490813b0 core: option.map_consume -> option.map_move 2013-08-07 08:52:09 -07:00
Erick Tryzelaar
5c08237456 option.get -> option.unwrap 2013-08-07 08:16:37 -07:00
bors
3dfb55ab09 auto merge of #8313 : msullivan/rust/cleanup, r=catamorphism 2013-08-06 08:44:05 -07:00
Marvin Löbel
0ac7a219f0 Updated std::Option, std::Either and std::Result
- Made naming schemes consistent between Option, Result and Either
- Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None)
- Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-05 22:42:21 +02:00
Michael Sullivan
7dbc5ae79f Get rid of some NOTEs. 2013-08-05 12:30:28 -07:00
Daniel Micay
1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay
b3ad685f7f replace all remaining for with foreach or do 2013-08-03 03:00:42 -04:00
Daniel Micay
234acad404 replace range with an external iterator 2013-08-02 00:51:14 -04:00
Daniel Micay
1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
Jordi Boggiano
f7ebab4403 Do not enforce two newlines after the options 2013-07-30 18:40:01 +02:00
bors
63c9b112b5 auto merge of #8003 : crnobog/rust/case-insensitive-error-prefix, r=cmr
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main on win32
2013-07-29 07:31:24 -07:00
bors
5c4cd30f80 auto merge of #7979 : crnobog/rust/auxfiles-path-windows, r=cmr 2013-07-26 17:49:40 -07:00
Daniel Micay
254339fd39 fix fmt! usage 2013-07-24 09:45:20 -04:00
crnobog
6f4e2b2147 Compare file:line prefix case-insensitively on win32
Paths are case insensitive on windows and rustc and compiletest may disagree on casing.
Fixes test compile-fail/circular_modules_main
2013-07-23 19:24:54 +01:00
crnobog
46394758aa Change libaux directory to fix aux crate tests on Windows 2013-07-22 23:15:20 +01:00
Gareth Smith
a6263694ff Remove what appears to be redundant indirection from
os::list_dir_path.
2013-07-21 18:33:29 +01:00
Patrick Walton
d300a64520 compiletest: Remove stray copies. 2013-07-17 18:03:48 -07:00
Patrick Walton
dc4bf173f8 test: Fix tests. 2013-07-17 14:57:55 -07:00
Patrick Walton
2dbb3c3887 test: Fix tests. 2013-07-17 14:57:54 -07:00
Patrick Walton
99b33f7219 librustc: Remove all uses of "copy". 2013-07-17 14:57:51 -07:00
Graydon Hoare
bc4c89c10a compiletest: Add support for metrics and ratchet modes. 2013-07-16 09:33:54 -07:00
Graydon Hoare
bbdbd3c69d extra: add explicit ratchet-noise-percent option to benchmark ratchet, plus a few test breaking fixes. 2013-07-11 15:16:11 -07:00