about summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2013-11-06Add make check support(arm-linux-androideabi debuginfo)sh8281.kim-22/+148
2013-11-04Move io::file to io::fs and fns out of FileAlex Crichton-32/+7
This renames the `file` module to `fs` because that more accurately describes its current purpose (manipulating the filesystem, not just files). Additionally, this adds an UnstableFileStat structure as a nested structure of FileStat to signify that the fields should not be depended on. The structure is currently flagged with #[unstable], but it's unlikely that it has much meaning. Closes #10241
2013-11-03Fill out the remaining functionality in io::fileAlex Crichton-8/+9
This adds bindings to the remaining functions provided by libuv, all of which are useful operations on files which need to get exposed somehow. Some highlights: * Dropped `FileReader` and `FileWriter` and `FileStream` for one `File` type * Moved all file-related methods to be static methods under `File` * All directory related methods are still top-level functions * Created `io::FilePermission` types (backed by u32) that are what you'd expect * Created `io::FileType` and refactored `FileStat` to use FileType and FilePermission * Removed the expanding matrix of `FileMode` operations. The mode of reading a file will not have the O_CREAT flag, but a write mode will always have the O_CREAT flag. Closes #10130 Closes #10131 Closes #10121
2013-11-03Remove all blocking std::os blocking functionsAlex Crichton-20/+16
This commit moves all thread-blocking I/O functions from the std::os module. Their replacements can be found in either std::rt::io::file or in a hidden "old_os" module inside of native::file. I didn't want to outright delete these functions because they have a lot of special casing learned over time for each OS/platform, and I imagine that these will someday get integrated into a blocking implementation of IoFactory. For now, they're moved to a private module to prevent bitrot and still have tests to ensure that they work. I've also expanded the extensions to a few more methods defined on Path, most of which were previously defined in std::os but now have non-thread-blocking implementations as part of using the current IoFactory. The api of io::file is in flux, but I plan on changing it in the next commit as well. Closes #10057
2013-10-30auto merge of #9613 : jld/rust/enum-discrim-size.r0, r=alexcrichtonbors-2/+25
Allows an enum with a discriminant to use any of the primitive integer types to store it. By default the smallest usable type is chosen, but this can be overridden with an attribute: `#[repr(int)]` etc., or `#[repr(C)]` to match the target's C ABI for the equivalent C enum. Also adds a lint pass for using non-FFI safe enums in extern declarations, checks that specified discriminants can be stored in the specified type if any, and fixes assorted code that was assuming int.
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-3/+3
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-29Unbreak the debuginfo tests.Jed Davis-2/+25
The variant used in debug-info/method-on-enum.rs had its layout changed by the smaller discriminant, so that the `u32` no longer overlaps both of the `u16`s, and thus the debugger is printing partially uninitialized data when it prints the wrong variant. Thus, the test runner is modified to accept wildcards (using a string that should be unlikely to occur literally), to allow for this.
2013-10-28Remove the extension traits for Readers/WritersAlex Crichton-1/+1
These methods are all excellent candidates for default methods, so there's no need to require extra imports of various traits.
2013-10-24Remove even more of std::ioAlex Crichton-29/+26
Big fish fried here: extra::json most of the compiler extra::io_util removed extra::fileinput removed Fish left to fry extra::ebml
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-22/+22
Who doesn't like a massive renaming?
2013-10-16path2: Update for latest masterKevin Ballard-3/+3
Also fix some issues that crept into earlier commits during the conflict resoution for the rebase.
2013-10-16path2: Remove some API functionsKevin Ballard-3/+11
Delete the following API functions: - set_dirname() - with_dirname() - set_filestem() - with_filestem() - add_extension() - file_path() Also change pop() to return a boolean instead of an owned copy of the old filename.
2013-10-16path2: Update based on more review feedbackKevin Ballard-3/+3
Standardize the is_sep() functions to be the same in both posix and windows, and re-export from path. Update extra::glob to use this. Remove the usage of either, as it's going away. Move the WindowsPath-specific methods out of WindowsPath and make them top-level functions of path::windows instead. This way you cannot accidentally write code that will fail to compile on non-windows architectures without typing ::windows anywhere. Remove GenericPath::from_c_str() and just impl BytesContainer for CString instead. Remove .join_path() and .push_path() and just implement BytesContainer for Path instead. Remove FilenameDisplay and add a boolean flag to Display instead. Remove .each_parent(). It only had one caller, so just inline its definition there.
2013-10-15path2: Remove .with_display_str and friendsKevin Ballard-1/+1
Rewrite these methods as methods on Display and FilenameDisplay. This turns do path.with_display_str |s| { ... } into do path.display().with_str |s| { ... }
2013-10-15path2: Adjust the API to remove all the _str mutation methodsKevin Ballard-23/+23
Add a new trait BytesContainer that is implemented for both byte vectors and strings. Convert Path::from_vec and ::from_str to one function, Path::new(). Remove all the _str-suffixed mutation methods (push, join, with_*, set_*) and modify the non-suffixed versions to use BytesContainer.
2013-10-15path2: Replace the path module outrightKevin Ballard-73/+101
Remove the old path. Rename path2 to path. Update all clients for the new path. Also make some miscellaneous changes to the Path APIs to help the adoption process.
2013-10-10Remove some users of io::file_readerAlex Crichton-12/+20
2013-10-10Migrate users of io::fd_t to io::native::file::fd_tAlex Crichton-0/+1
2013-10-09Implement io::native::processAlex Crichton-1/+1
2013-10-09option: rewrite the API to use compositionDaniel Micay-5/+5
2013-09-30rpass: Remove usage of fmt!Alex Crichton-1/+1
2013-09-30compiletest: Remove usage of fmt!Alex Crichton-87/+87
2013-09-19Turned extra::getopts functions into methodsMarvin Löbel-27/+25
Some minor api and doc adjustments
2013-09-18std: Remove {float,f64,f32}::from_str in favor of from_strblake2-ppc-2/+1
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-12std: rename Option::unwrap_or_default() to unwrap_or()Erick Tryzelaar-1/+1
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-2/+2
2013-09-04Update clients of path.rs to use new API.Felix S. Klock II-3/+4
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-03auto merge of #8950 : sanxiyn/rust/cross-xfail, r=brsonbors-4/+23
2013-09-03Correctly determine OS to xfail in cross buildSeo Sanghyeon-4/+23
2013-09-02Raise the file descriptor limits when running compiletestAlex Crichton-0/+5
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-08-30auto merge of #8886 : cmr/rust/test-restructure, r=cmrbors-19/+17
2013-08-30Revert "Teach compiletest to use multiple --src-base's"Corey Richardson-19/+17
This reverts commit 8a07f5708196dd72ec030018c2a215a4dd823b2e.
2013-08-30Revert "Teach the makefile to use multiple src-base's"Corey Richardson-1/+1
This reverts commit 43f851d2cb3976655078f032dc1a8cb88f1c8deb.
2013-08-30auto merge of #8839 : sanxiyn/rust/env, r=thestingerbors-10/+5
2013-08-29auto merge of #8458 : cmr/rust/test-restructure, r=brsonbors-17/+19
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-29Revert "auto merge of #8645 : alexcrichton/rust/issue-6436-run-non-blocking, ↵Brian Anderson-4/+29
r=brson" This reverts commit b8d1fa399402c71331aefd634d710004e00b73a6, reversing changes made to f22b4b169854c8a4ba86c16ee43327d6bcf94562. Conflicts: mk/rt.mk src/libuv
2013-08-28Android: Pass the environment when running testsSeo Sanghyeon-2/+5
2013-08-28Remove --newrt optionSeo Sanghyeon-8/+0
2013-08-28Teach the makefile to use multiple src-base'sCorey Richardson-1/+1
2013-08-28Teach compiletest to use multiple --src-base'sCorey Richardson-17/+19
2013-08-27Implement process bindings to libuvAlex Crichton-29/+4
Closes #6436
2013-08-26Since we assume that GDB output is UTF-8, make sure it is so on all platforms.Vadim Chugunov-1/+3
Otherwise it'll choose some "appropriate" platform-specific default (e.g. CP1252 on Windows).
2013-08-23test: add support for sharding testsuite by passing --test-shard=a.bGraydon Hoare-0/+12
2013-08-19compiletest: do not run tests in sub-threads if on valgrind.Graydon Hoare-1/+12
2013-08-17auto merge of #8531 : brson/rust/test-waitpid-workaround, r=graydonbors-2/+16
...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-14compiletest: Run tests in their own thread to avoid blocking the schedulerBrian Anderson-2/+16
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-14std: Change ProcessOptions struct to have an option of a ~ vectorTim Chevalier-1/+1
This is a workaround for #8498
2013-08-10std: Iterator.len_ -> .lenErick Tryzelaar-1/+1
2013-08-10std: Rename Iterator.transform -> .mapErick Tryzelaar-4/+4
cc #5898
2013-08-07rustc: Fix for-range loops that can use iteratorsblake2-ppc-2/+2
Transform range loops that can be regular iterator loops.