]> git.lizzy.rs Git - rust.git/commitdiff
compiletest: Switch field privacy where necessary
authorAlex Crichton <alex@alexcrichton.com>
Fri, 28 Mar 2014 18:10:15 +0000 (11:10 -0700)
committerAlex Crichton <alex@alexcrichton.com>
Mon, 31 Mar 2014 22:47:37 +0000 (15:47 -0700)
src/compiletest/common.rs
src/compiletest/errors.rs
src/compiletest/header.rs
src/compiletest/procsrv.rs

index 4d1f7ab595679c7e46e7116aae2f13655ee28283..ea6e98fafa7cdda73649d32ad9925f62c905ae84 100644 (file)
@@ -21,87 +21,87 @@ pub enum mode {
 #[deriving(Clone)]
 pub struct config {
     // The library paths required for running the compiler
-    compile_lib_path: ~str,
+    pub compile_lib_path: ~str,
 
     // The library paths required for running compiled programs
-    run_lib_path: ~str,
+    pub run_lib_path: ~str,
 
     // The rustc executable
-    rustc_path: Path,
+    pub rustc_path: Path,
 
     // The clang executable
-    clang_path: Option<Path>,
+    pub clang_path: Option<Path>,
 
     // The llvm binaries path
-    llvm_bin_path: Option<Path>,
+    pub llvm_bin_path: Option<Path>,
 
     // The directory containing the tests to run
-    src_base: Path,
+    pub src_base: Path,
 
     // The directory where programs should be built
-    build_base: Path,
+    pub build_base: Path,
 
     // Directory for auxiliary libraries
-    aux_base: Path,
+    pub aux_base: Path,
 
     // The name of the stage being built (stage1, etc)
-    stage_id: ~str,
+    pub stage_id: ~str,
 
     // The test mode, compile-fail, run-fail, run-pass
-    mode: mode,
+    pub mode: mode,
 
     // Run ignored tests
-    run_ignored: bool,
+    pub run_ignored: bool,
 
     // Only run tests that match this filter
-    filter: Option<~str>,
+    pub filter: Option<~str>,
 
     // Write out a parseable log of tests that were run
-    logfile: Option<Path>,
+    pub logfile: Option<Path>,
 
     // Write out a json file containing any metrics of the run
-    save_metrics: Option<Path>,
+    pub save_metrics: Option<Path>,
 
     // Write and ratchet a metrics file
-    ratchet_metrics: Option<Path>,
+    pub ratchet_metrics: Option<Path>,
 
     // Percent change in metrics to consider noise
-    ratchet_noise_percent: Option<f64>,
+    pub ratchet_noise_percent: Option<f64>,
 
-    // "Shard" of the testsuite to run: this has the form of
+    // "Shard" of the testsuite to pub run: this has the form of
     // two numbers (a,b), and causes only those tests with
     // positional order equal to a mod b to run.
-    test_shard: Option<(uint,uint)>,
+    pub test_shard: Option<(uint,uint)>,
 
     // A command line to prefix program execution with,
     // for running under valgrind
-    runtool: Option<~str>,
+    pub runtool: Option<~str>,
 
     // Flags to pass to the compiler when building for the host
-    host_rustcflags: Option<~str>,
+    pub host_rustcflags: Option<~str>,
 
     // Flags to pass to the compiler when building for the target
-    target_rustcflags: Option<~str>,
+    pub target_rustcflags: Option<~str>,
 
     // Run tests using the JIT
-    jit: bool,
+    pub jit: bool,
 
     // Target system to be tested
-    target: ~str,
+    pub target: ~str,
 
     // Host triple for the compiler being invoked
-    host: ~str,
+    pub host: ~str,
 
     // Extra parameter to run adb on arm-linux-androideabi
-    adb_path: ~str,
+    pub adb_path: ~str,
 
     // Extra parameter to run test sute on arm-linux-androideabi
-    adb_test_dir: ~str,
+    pub adb_test_dir: ~str,
 
     // status whether android device available or not
-    adb_device_status: bool,
+    pub adb_device_status: bool,
 
     // Explain what's going on
-    verbose: bool
+    pub verbose: bool
 
 }
index 285bad0fc4b122f03ea31250194672363c71f5ca..42b756271d43c52bc1ad842d2688dedc5e1a4385 100644 (file)
 
 use std::io::{BufferedReader, File};
 
-pub struct ExpectedError { line: uint, kind: ~str, msg: ~str }
+pub struct ExpectedError {
+    pub line: uint,
+    pub kind: ~str,
+    pub msg: ~str,
+}
 
 // Load any test directives embedded in the file
 pub fn load_errors(testfile: &Path) -> Vec<ExpectedError> {
index f6ae45d766a50ed3607f1e80d0fd578fca36fd87..b45a68518a3ec4320c913728db232dfe1456648b 100644 (file)
 
 pub struct TestProps {
     // Lines that should be expected, in order, on standard out
-    error_patterns: Vec<~str> ,
+    pub error_patterns: Vec<~str> ,
     // Extra flags to pass to the compiler
-    compile_flags: Option<~str>,
+    pub compile_flags: Option<~str>,
     // If present, the name of a file that this test should match when
     // pretty-printed
-    pp_exact: Option<Path>,
+    pub pp_exact: Option<Path>,
     // Modules from aux directory that should be compiled
-    aux_builds: Vec<~str> ,
+    pub aux_builds: Vec<~str> ,
     // Environment settings to use during execution
-    exec_env: Vec<(~str,~str)> ,
+    pub exec_env: Vec<(~str,~str)> ,
     // Commands to be given to the debugger, when testing debug info
-    debugger_cmds: Vec<~str> ,
+    pub debugger_cmds: Vec<~str> ,
     // Lines to check if they appear in the expected debugger output
-    check_lines: Vec<~str> ,
+    pub check_lines: Vec<~str> ,
     // Flag to force a crate to be built with the host architecture
-    force_host: bool,
+    pub force_host: bool,
     // Check stdout for error-pattern output as well as stderr
-    check_stdout: bool,
+    pub check_stdout: bool,
     // Don't force a --crate-type=dylib flag on the command line
-    no_prefer_dynamic: bool,
+    pub no_prefer_dynamic: bool,
 }
 
 // Load any test directives embedded in the file
index 4ab3a1ef596819ad91415b86c67d4bccfb8cfa82..e00b864f2e9ebf892d4deab3467911edceefe250 100644 (file)
@@ -57,7 +57,7 @@ fn target_env(lib_path: &str, prog: &str) -> Vec<(~str,~str)> {
     return env;
 }
 
-pub struct Result {status: ProcessExit, out: ~str, err: ~str}
+pub struct Result {pub status: ProcessExit, pub out: ~str, pub err: ~str}
 
 pub fn run(lib_path: &str,
            prog: &str,