Skip to content

Commit 658637b

Browse files
committedNov 4, 2013
auto merge of #10179 : alexcrichton/rust/rt-improvements, r=cmr
This fleshes out the io::file module a fair bit more, adding all of the functionality that I can think of that we would want. Some questions about the representation which I'm curious about: * I modified `FileStat` to be a little less platform-agnostic, but it's still fairly platform-specific. I don't want to hide information that we have, but I don't want to depend on this information being available. One possible route is to have an `extra` field which has all this os-dependent stuff which is clearly documented as it should be avoided. * Does it make sense for directory functions to be top-level functions instead of static methods? It seems silly to import `std::rt::io::file` and `std::rt::io::File` at the top of files that need to deal with directories and files.
2 parents 70e9b5a + 3c3ed14 commit 658637b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

66 files changed

+2724
-2450
lines changed
 

‎mk/tests.mk

+3-3
Original file line numberDiff line numberDiff line change
@@ -517,8 +517,8 @@ CTEST_BUILD_BASE_rpass = run-pass
517517
CTEST_MODE_rpass = run-pass
518518
CTEST_RUNTOOL_rpass = $(CTEST_RUNTOOL)
519519

520-
CTEST_SRC_BASE_rpass-full = run-pass-full
521-
CTEST_BUILD_BASE_rpass-full = run-pass-full
520+
CTEST_SRC_BASE_rpass-full = run-pass-fulldeps
521+
CTEST_BUILD_BASE_rpass-full = run-pass-fulldeps
522522
CTEST_MODE_rpass-full = run-pass
523523
CTEST_RUNTOOL_rpass-full = $(CTEST_RUNTOOL)
524524

@@ -673,7 +673,7 @@ PRETTY_DEPS_pretty-rfail = $(RFAIL_TESTS)
673673
PRETTY_DEPS_pretty-bench = $(BENCH_TESTS)
674674
PRETTY_DEPS_pretty-pretty = $(PRETTY_TESTS)
675675
PRETTY_DIRNAME_pretty-rpass = run-pass
676-
PRETTY_DIRNAME_pretty-rpass-full = run-pass-full
676+
PRETTY_DIRNAME_pretty-rpass-full = run-pass-fulldeps
677677
PRETTY_DIRNAME_pretty-rfail = run-fail
678678
PRETTY_DIRNAME_pretty-bench = bench
679679
PRETTY_DIRNAME_pretty-pretty = pretty

‎src/compiletest/compiletest.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ extern mod extra;
1717

1818
use std::os;
1919
use std::rt;
20+
use std::rt::io::fs;
2021

2122
use extra::getopts;
2223
use extra::getopts::groups::{optopt, optflag, reqopt};
@@ -247,7 +248,7 @@ pub fn make_tests(config: &config) -> ~[test::TestDescAndFn] {
247248
debug!("making tests from {}",
248249
config.src_base.display());
249250
let mut tests = ~[];
250-
let dirs = os::list_dir_path(&config.src_base);
251+
let dirs = fs::readdir(&config.src_base);
251252
for file in dirs.iter() {
252253
let file = file.clone();
253254
debug!("inspecting file {}", file.display());

0 commit comments

Comments
 (0)