2014-01-04 14:16:57 -06:00
|
|
|
// Copyright 2012-2013 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
2012-12-03 18:48:01 -06:00
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2013-07-11 14:05:17 -05:00
|
|
|
#[deriving(Clone, Eq)]
|
2013-01-30 16:10:03 -06:00
|
|
|
pub enum mode {
|
|
|
|
mode_compile_fail,
|
|
|
|
mode_run_fail,
|
|
|
|
mode_run_pass,
|
|
|
|
mode_pretty,
|
2013-02-09 12:09:19 -06:00
|
|
|
mode_debug_info,
|
2013-07-06 02:44:40 -05:00
|
|
|
mode_codegen
|
2012-11-14 20:59:30 -06:00
|
|
|
}
|
2012-08-30 15:10:36 -05:00
|
|
|
|
2013-07-11 14:05:17 -05:00
|
|
|
#[deriving(Clone)]
|
2013-02-21 17:19:40 -06:00
|
|
|
pub struct config {
|
2011-07-30 23:11:14 -05:00
|
|
|
// The library paths required for running the compiler
|
2014-03-28 13:10:15 -05:00
|
|
|
pub compile_lib_path: ~str,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The library paths required for running compiled programs
|
2014-03-28 13:10:15 -05:00
|
|
|
pub run_lib_path: ~str,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The rustc executable
|
2014-03-28 13:10:15 -05:00
|
|
|
pub rustc_path: Path,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2013-07-06 02:44:40 -05:00
|
|
|
// The clang executable
|
2014-03-28 13:10:15 -05:00
|
|
|
pub clang_path: Option<Path>,
|
2013-07-06 02:44:40 -05:00
|
|
|
|
|
|
|
// The llvm binaries path
|
2014-03-28 13:10:15 -05:00
|
|
|
pub llvm_bin_path: Option<Path>,
|
2013-07-06 02:44:40 -05:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The directory containing the tests to run
|
2014-03-28 13:10:15 -05:00
|
|
|
pub src_base: Path,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The directory where programs should be built
|
2014-03-28 13:10:15 -05:00
|
|
|
pub build_base: Path,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
|
|
|
// Directory for auxiliary libraries
|
2014-03-28 13:10:15 -05:00
|
|
|
pub aux_base: Path,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The name of the stage being built (stage1, etc)
|
2014-03-28 13:10:15 -05:00
|
|
|
pub stage_id: ~str,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// The test mode, compile-fail, run-fail, run-pass
|
2014-03-28 13:10:15 -05:00
|
|
|
pub mode: mode,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// Run ignored tests
|
2014-03-28 13:10:15 -05:00
|
|
|
pub run_ignored: bool,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// Only run tests that match this filter
|
2014-03-28 13:10:15 -05:00
|
|
|
pub filter: Option<~str>,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2012-04-03 10:27:51 -05:00
|
|
|
// Write out a parseable log of tests that were run
|
2014-03-28 13:10:15 -05:00
|
|
|
pub logfile: Option<Path>,
|
2012-04-03 10:27:51 -05:00
|
|
|
|
2013-07-15 20:51:20 -05:00
|
|
|
// Write out a json file containing any metrics of the run
|
2014-03-28 13:10:15 -05:00
|
|
|
pub save_metrics: Option<Path>,
|
2013-07-15 20:51:20 -05:00
|
|
|
|
|
|
|
// Write and ratchet a metrics file
|
2014-03-28 13:10:15 -05:00
|
|
|
pub ratchet_metrics: Option<Path>,
|
2013-07-15 20:51:20 -05:00
|
|
|
|
|
|
|
// Percent change in metrics to consider noise
|
2014-03-28 13:10:15 -05:00
|
|
|
pub ratchet_noise_percent: Option<f64>,
|
2013-07-15 20:51:20 -05:00
|
|
|
|
2014-03-28 13:10:15 -05:00
|
|
|
// "Shard" of the testsuite to pub run: this has the form of
|
2013-08-23 17:30:23 -05:00
|
|
|
// two numbers (a,b), and causes only those tests with
|
|
|
|
// positional order equal to a mod b to run.
|
2014-03-28 13:10:15 -05:00
|
|
|
pub test_shard: Option<(uint,uint)>,
|
2013-08-23 17:30:23 -05:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// A command line to prefix program execution with,
|
|
|
|
// for running under valgrind
|
2014-03-28 13:10:15 -05:00
|
|
|
pub runtool: Option<~str>,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2014-02-11 15:51:08 -06:00
|
|
|
// Flags to pass to the compiler when building for the host
|
2014-03-28 13:10:15 -05:00
|
|
|
pub host_rustcflags: Option<~str>,
|
2014-02-11 15:51:08 -06:00
|
|
|
|
|
|
|
// Flags to pass to the compiler when building for the target
|
2014-03-28 13:10:15 -05:00
|
|
|
pub target_rustcflags: Option<~str>,
|
2012-02-27 23:23:49 -06:00
|
|
|
|
2012-08-28 19:10:37 -05:00
|
|
|
// Run tests using the JIT
|
2014-03-28 13:10:15 -05:00
|
|
|
pub jit: bool,
|
2012-08-28 19:10:37 -05:00
|
|
|
|
2013-05-03 20:35:07 -05:00
|
|
|
// Target system to be tested
|
2014-03-28 13:10:15 -05:00
|
|
|
pub target: ~str,
|
2013-05-01 04:52:08 -05:00
|
|
|
|
2014-01-17 12:18:02 -06:00
|
|
|
// Host triple for the compiler being invoked
|
2014-03-28 13:10:15 -05:00
|
|
|
pub host: ~str,
|
2014-01-17 12:18:02 -06:00
|
|
|
|
2013-05-01 23:16:01 -05:00
|
|
|
// Extra parameter to run adb on arm-linux-androideabi
|
2014-03-28 13:10:15 -05:00
|
|
|
pub adb_path: ~str,
|
2013-05-01 04:52:08 -05:00
|
|
|
|
2013-05-01 23:16:01 -05:00
|
|
|
// Extra parameter to run test sute on arm-linux-androideabi
|
2014-03-28 13:10:15 -05:00
|
|
|
pub adb_test_dir: ~str,
|
2013-05-01 23:16:01 -05:00
|
|
|
|
2013-05-03 20:35:07 -05:00
|
|
|
// status whether android device available or not
|
2014-03-28 13:10:15 -05:00
|
|
|
pub adb_device_status: bool,
|
2013-05-01 04:52:08 -05:00
|
|
|
|
2011-07-30 23:11:14 -05:00
|
|
|
// Explain what's going on
|
2014-03-28 13:10:15 -05:00
|
|
|
pub verbose: bool
|
2012-08-28 19:10:37 -05:00
|
|
|
|
2013-02-21 17:19:40 -06:00
|
|
|
}
|