about summary refs log tree commit diff
path: root/src/compiletest
AgeCommit message (Collapse)AuthorLines
2016-01-31Rename sunos to solarisNikita Baksalyar-1/+1
2016-01-31Add Illumos supportNikita Baksalyar-0/+1
2016-01-30Expect all help/note messages are specified in a cfail test if it contains ↵Florian Hahn-6/+15
help/note annotations, closes #21195
2016-01-26Implement the translation item collector.Michael Woerister-1/+47
The purpose of the translation item collector is to find all monomorphic instances of functions, methods and statics that need to be translated into LLVM IR in order to compile the current crate. So far these instances have been discovered lazily during the trans path. For incremental compilation we want to know the set of these instances in advance, and that is what the trans::collect module provides. In the future, incremental and regular translation will be driven by the collector implemented here.
2016-01-13Add powerpc64 and powerpc64le supportAnton Blanchard-0/+2
This adds support for big endian and little endian PowerPC64. make check runs clean apart from one big endian backtrace issue.
2015-12-17Remove unused importsJeffrey Seyfried-2/+0
2015-12-05std: Stabilize APIs for the 1.6 releaseAlex Crichton-12/+7
This commit is the standard API stabilization commit for the 1.6 release cycle. The list of issues and APIs below have all been through their cycle-long FCP and the libs team decisions are listed below Stabilized APIs * `Read::read_exact` * `ErrorKind::UnexpectedEof` (renamed from `UnexpectedEOF`) * libcore -- this was a bit of a nuanced stabilization, the crate itself is now marked as `#[stable]` and the methods appearing via traits for primitives like `char` and `str` are now also marked as stable. Note that the extension traits themeselves are marked as unstable as they're imported via the prelude. The `try!` macro was also moved from the standard library into libcore to have the same interface. Otherwise the functions all have copied stability from the standard library now. * The `#![no_std]` attribute * `fs::DirBuilder` * `fs::DirBuilder::new` * `fs::DirBuilder::recursive` * `fs::DirBuilder::create` * `os::unix::fs::DirBuilderExt` * `os::unix::fs::DirBuilderExt::mode` * `vec::Drain` * `vec::Vec::drain` * `string::Drain` * `string::String::drain` * `vec_deque::Drain` * `vec_deque::VecDeque::drain` * `collections::hash_map::Drain` * `collections::hash_map::HashMap::drain` * `collections::hash_set::Drain` * `collections::hash_set::HashSet::drain` * `collections::binary_heap::Drain` * `collections::binary_heap::BinaryHeap::drain` * `Vec::extend_from_slice` (renamed from `push_all`) * `Mutex::get_mut` * `Mutex::into_inner` * `RwLock::get_mut` * `RwLock::into_inner` * `Iterator::min_by_key` (renamed from `min_by`) * `Iterator::max_by_key` (renamed from `max_by`) Deprecated APIs * `ErrorKind::UnexpectedEOF` (renamed to `UnexpectedEof`) * `OsString::from_bytes` * `OsStr::to_cstring` * `OsStr::to_bytes` * `fs::walk_dir` and `fs::WalkDir` * `path::Components::peek` * `slice::bytes::MutableByteVector` * `slice::bytes::copy_memory` * `Vec::push_all` (renamed to `extend_from_slice`) * `Duration::span` * `IpAddr` * `SocketAddr::ip` * `Read::tee` * `io::Tee` * `Write::broadcast` * `io::Broadcast` * `Iterator::min_by` (renamed to `min_by_key`) * `Iterator::max_by` (renamed to `max_by_key`) * `net::lookup_addr` New APIs (still unstable) * `<[T]>::sort_by_key` (added to mirror `min_by_key`) Closes #27585 Closes #27704 Closes #27707 Closes #27710 Closes #27711 Closes #27727 Closes #27740 Closes #27744 Closes #27799 Closes #27801 cc #27801 (doesn't close as `Chars` is still unstable) Closes #28968
2015-12-03Add a `build-aux-docs` directive to compiletestmitaa-6/+31
This flag causes the documentation for all `aux-build` files to be built, which happens prior to running/building the parent test.
2015-11-10compiletest/raise_fd_limit: use libc instead of custom implTamir Duberstein-22/+5
Fixes #29751.
2015-11-04Deprecate `_ms` functions that predate the `Duration` APIBen Striegel-1/+1
2015-10-26Auto merge of #29296 - zazdxscf:compiletest_noargs_show_help, r=alexcrichtonbors-1/+1
instead of this panic: ``` thread '<main>' panicked at 'index out of bounds: the len is 1 but the index is 1', src/libcollections/vec.rs:1110 ``` It still panics, just like `-h` does, so it should be okay in this regard.
2015-10-25std: Stabilize library APIs for 1.5Alex Crichton-2/+2
This commit stabilizes and deprecates library APIs whose FCP has closed in the last cycle, specifically: Stabilized APIs: * `fs::canonicalize` * `Path::{metadata, symlink_metadata, canonicalize, read_link, read_dir, exists, is_file, is_dir}` - all moved to inherent methods from the `PathExt` trait. * `Formatter::fill` * `Formatter::width` * `Formatter::precision` * `Formatter::sign_plus` * `Formatter::sign_minus` * `Formatter::alternate` * `Formatter::sign_aware_zero_pad` * `string::ParseError` * `Utf8Error::valid_up_to` * `Iterator::{cmp, partial_cmp, eq, ne, lt, le, gt, ge}` * `<[T]>::split_{first,last}{,_mut}` * `Condvar::wait_timeout` - note that `wait_timeout_ms` is not yet deprecated but will be once 1.5 is released. * `str::{R,}MatchIndices` * `str::{r,}match_indices` * `char::from_u32_unchecked` * `VecDeque::insert` * `VecDeque::shrink_to_fit` * `VecDeque::as_slices` * `VecDeque::as_mut_slices` * `VecDeque::swap_remove_front` - (renamed from `swap_front_remove`) * `VecDeque::swap_remove_back` - (renamed from `swap_back_remove`) * `Vec::resize` * `str::slice_mut_unchecked` * `FileTypeExt` * `FileTypeExt::{is_block_device, is_char_device, is_fifo, is_socket}` * `BinaryHeap::from` - `from_vec` deprecated in favor of this * `BinaryHeap::into_vec` - plus a `Into` impl * `BinaryHeap::into_sorted_vec` Deprecated APIs * `slice::ref_slice` * `slice::mut_ref_slice` * `iter::{range_inclusive, RangeInclusive}` * `std::dynamic_lib` Closes #27706 Closes #27725 cc #27726 (align not stabilized yet) Closes #27734 Closes #27737 Closes #27742 Closes #27743 Closes #27772 Closes #27774 Closes #27777 Closes #27781 cc #27788 (a few remaining methods though) Closes #27790 Closes #27793 Closes #27796 Closes #27810 cc #28147 (not all parts stabilized)
2015-10-25compiletest: show usage/help when passed no argsEmanuel Czirai-1/+1
instead of this panic: ``` thread '<main>' panicked at 'index out of bounds: the len is 1 but the index is 1', src/libcollections/vec.rs:1110 ``` It still panics, just like `-h` does, so it should be okay in this regard.
2015-09-24Allow multi-digit GDB minor version numbersWilliam Throwe-5/+6
GDB 7.10 was recently released.
2015-09-21Avoid loading the whole gdb debug scripts section.Richard Diamond-2/+1
This is so LLVM isn't forced to load every byte of it. Also sets the alignment of the load. Adds a test for the debug script section.
2015-09-03Add an intital HIR and lowering stepNick Cameron-1/+1
2015-09-01refactored compiletest following clippy's suggestionsllogiq-191/+176
2015-08-24Fix compile-fail tests on windowsDiggory Blake-2/+15
2015-08-11Fix #27567: remove --crate-type=lib from pretty testTim Neumann-1/+0
2015-08-10trans: Stop informing LLVM about dllexportAlex Crichton-2/+1
Rust's current compilation model makes it impossible on Windows to generate one object file with a complete and final set of dllexport annotations. This is because when an object is generated the compiler doesn't actually know if it will later be included in a dynamic library or not. The compiler works around this today by flagging *everything* as dllexport, but this has the drawback of exposing too much. Thankfully there are alternate methods of specifying the exported surface area of a dll on Windows, one of which is passing a `*.def` file to the linker which lists all public symbols of the dynamic library. This commit removes all locations that add `dllexport` to LLVM variables and instead dynamically generates a `*.def` file which is passed to the linker. This file will include all the public symbols of the current object file as well as all upstream libraries, and the crucial aspect is that it's only used when generating a dynamic library. When generating an executable this file isn't generated, so all the symbols aren't exported from an executable. To ensure that statically included native libraries are reexported correctly, the previously added support for the `#[linked_from]` attribute is used to determine the set of FFI symbols that are exported from a dynamic library, and this is required to get the compiler to link correctly.
2015-07-12Auto merge of #26957 - wesleywiser:rename_connect_to_join, r=alexcrichtonbors-4/+4
Fixes #26900
2015-07-12Implement RFC 1058Simonas Kazlauskas-4/+2
2015-07-10Change some instances of .connect() to .join()Wesley Wiser-4/+4
2015-07-08this fixes the test failures on freebsdDave Huseby-1/+4
2015-07-05Auto merge of #25754 - geofft:remove-compiletest-jit, r=alexcrichtonbors-11/+4
jit support was removed from rustc in 6b34ba242d7372b779bf50682b9401b61183828e (December 2013), so passing `--jit` wouldn't even work.
2015-07-01Add netbsd amd64 supportAlex Newman-0/+1
2015-06-18compiletest: Minor cleanup from removal of jit test supportGeoffrey Thomas-11/+4
We're no longer passing extra args to the compiler, so remove the variable.
2015-06-17Fallout in tests and docs from feature renamingsAlex Crichton-5/+6
2015-06-13compiletest: remove JITTamir Duberstein-34/+12
2015-06-10Removed many pointless calls to *iter() and iter_mut()Joshua Landau-12/+12
2015-06-08Replace usage of String::from_str with String:fromSimon Sapin-1/+1
2015-06-03Improve diagnostic messages for range patterns.Michael Sproul-10/+5
2015-05-27Revamp codegen tests to check IR quality instead of quantityBjörn Steinbrink-142/+17
The current codegen tests only compare IR line counts between similar rust and C programs, the latter getting compiled with clang. That looked like a good idea back then, but actually things like lifetime intrinsics mean that less IR isn't always better, so the metric isn't really helpful. Instead, we can start doing tests that check specific aspects of the generated IR, like attributes or metadata. To do that, we can use LLVM's FileCheck tool which has a number of useful features for such tests. To start off, I created some tests for a few things that were recently added and/or broken.
2015-05-09Squeeze the last bits of `task`s in documentation in favor of `thread`Barosl Lee-2/+2
An automated script was run against the `.rs` and `.md` files, subsituting every occurrence of `task` with `thread`. In the `.rs` files, only the texts in the comment blocks were affected.
2015-05-02Run benchmarks once, as a test by default.Huon Wilson-1/+1
E.g. if `foo.rs` looks like #![feature(test)] extern crate test; #[bench] fn bar(b: &mut test::Bencher) { b.iter(|| { 1 }) } #[test] fn baz() {} #[bench] fn qux(b: &mut test::Bencher) { b.iter(|| { panic!() }) } Then $ rustc --test foo.rs $ ./foo running 3 tests test baz ... ok test qux ... FAILED test bar ... ok failures: ---- qux stdout ---- thread 'qux' panicked at 'explicit panic', bench.rs:17 failures: qux test result: FAILED. 2 passed; 1 failed; 0 ignored; 0 measured $ ./foo --bench ba running 2 tests test baz ... ignored test bar ... bench: 97 ns/iter (+/- 74) test result: ok. 0 passed; 0 failed; 1 ignored; 1 measured In particular, the two benchmark are being run as tests in the default mode. This helps for the main distribution, since benchmarks are only run with `PLEASE_BENCH=1`, which is rarely set (and never set on the test bots), and helps for code-coverage tools: benchmarks are run and so don't count as dead code. Fixes #15842.
2015-04-27compiletest: Add support for `// ignore-musl`Alex Crichton-0/+8
Add the ability to ignore a test based on the environment of the triple being used.
2015-04-27compiletest: Don't force dylibs on muslAlex Crichton-1/+14
MUSL support is currently only with static builds, so building a dylib will always fail.
2015-04-23Auto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichtonbors-1/+1
This required fixing the `pretty-rpass-full` tests to have the same `$$(CSREQ$(1)_T_$(2)_H_$(3))` dependencies as the `rpass-full` and `cfail-full` tests. It also required fixing the `run-make/simd-ffi` test to use unique names for its output files.
2015-04-22Include the mode in compiletest's aux-build directory.Ryan Prichard-1/+1
The run-pass and pretty run-pass tests could run concurrently, and if they do, they need to keep their output segregated. This change might be overkill. We need the suffix for the `pretty` mode, but we might not need it otherwise. The `debuginfo-lldb` and `debuginfo-gdb` modes look like they could also need it, but the current `tests.mk` file happens not to enable both lldb and gdb at the same time, for incidental reasons.
2015-04-21Change a few error messages to give code suggestionsP1start-0/+13
PR #24242 added the ability to the compiler to directly give suggestions about how to modify code to fix an error. The new errors look like this: foobar.rs:5:12: 5:25 error: expected a path on the left-hand side of `+`, not `&'static Copy` [E0178] foobar.rs:5 let x: &'static Copy + 'static; ^~~~~~~~~~~~~ foobar.rs:5:12: 5:35 help: try adding parentheses (per RFC 438): foobar.rs: let x: &'static (Copy + 'static); foobar.rs:2:13: 2:23 error: cast to unsized type: `&_` as `core::marker::Copy` foobar.rs:2 let x = &1 as Copy; ^~~~~~~~~~ foobar.rs:2:19: 2:23 help: try casting to a reference instead: foobar.rs: let x = &1 as &Copy; foobar.rs:7:24: 7:25 error: expected expression, found `;` foobar.rs:7 let x = box (1 + 1); ^ foobar.rs:7:13: 7:16 help: try using `box()` instead: foobar.rs: let x = box() (1 + 1); This also modifies compiletest to give the ability to directly test suggestions given by error messages.
2015-04-14Negative case of `len()` -> `is_empty()`Tamir Duberstein-3/+3
`s/([^\(\s]+\.)len\(\) [(?:!=)>] 0/!$1is_empty()/g`
2015-04-14Positive case of `len()` -> `is_empty()`Tamir Duberstein-2/+2
`s/(?<!\{ self)(?<=\.)len\(\) == 0/is_empty()/g`
2015-04-14More test fixesAlex Crichton-7/+21
2015-04-14compiletest: Re-add raise_fd_limitAlex Crichton-13/+70
This apparently fixes obscure bugs on OSX!
2015-04-10Test fixes and review feedbackAlex Crichton-15/+15
2015-04-07rustdoc: Add a test for fixed issue #15347Alex Crichton-0/+1
Closes #15347
2015-04-07rustdoc: Add a primitive page for raw pointersAlex Crichton-0/+1
Closes #15318
2015-04-07compiletest: Add support for running rustdoc testsAlex Crichton-45/+98
Add a new test directory called 'rustdoc' where all files inside are documented and run against the `htmldocck` script to have assertions about the output.
2015-04-07Fix charset of debuginfo test on FreeBSDWill-4/+10
2015-04-04fixing some tests and temporarily disabling others to get Bitrig build ↵Dave Huseby-3/+4
working 100%