Commit Graph

467 Commits

Author SHA1 Message Date
bors 7b7fc67dd4 Auto merge of #27625 - wthrowe:find, r=alexcrichton
New enough find on Linux doesn't support "-perm +..." and suggests
using "-perm /..." instead, but that doesn't work on Windows.
Hopefully all platforms are happy with this expanded version.

I don't have access to a Windows development system to test this, so someone needs to verify that this actually works there before merging.

Closes #19981.
2015-08-13 16:09:22 +00:00
William Throwe 904e428dba Whitelist .pp files in tidy-binaries
Pretty-printed files sometimes start with #![some_feature], which
looks like a shebang line and confuses Windows builds into thinking
they are executables.
2015-08-12 19:08:22 -04:00
Alex Crichton b6b4f5a0e7 trans: Re-enable unwinding on 64-bit MSVC
This commit leverages the runtime support for DWARF exception info added
in #27210 to enable unwinding by default on 64-bit MSVC. This also additionally
adds a few minor fixes here and there in the test harness and such to get
`make check` entirely passing on 64-bit MSVC:

* The invocation of `maketest.py` now works with spaces/quotes in CC
* debuginfo tests are disabled on MSVC
* A link error for librustc was hacked around (see #27438)
2015-08-11 16:45:02 -07:00
William Throwe f001f9a73e Make tidy-binaries find invocation work on Linux
New enough find on Linux doesn't support "-perm +..." and suggests
using "-perm /..." instead, but that doesn't work on Windows.
Hopefully all platforms are happy with this expanded version.
2015-08-10 00:12:45 -04:00
Diggory Blake 6203d97a86 Fix setting of PATH for `make check` on windows 2015-08-06 04:47:15 +01:00
Alexis Beingessner ca902dd8cb rename TARPL to The Rustinomicon 2015-08-03 11:22:08 -07:00
Alexis Beingessner 04578f6611 update build to make tarpl 2015-07-13 23:31:52 -07:00
bors f813f97797 Auto merge of #25654 - petrochenkov:encenv, r=alexcrichton
Fixes https://github.com/rust-lang/rust/issues/25268 and a couple of similar test errors

r? @alexcrichton
2015-06-02 02:08:17 +00:00
petrochenkov 8c86f8ff8c Warn if the test suite is run on Windows in console with non-UTF-8 code page 2015-05-30 19:22:12 +03:00
Björn Steinbrink 677367599e Revamp codegen tests to check IR quality instead of quantity
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-27 12:08:31 +02:00
Alex Crichton ee258c548f mk: Fix native LLVM deps for cross-host builds
We use a script called `mklldeps.py` to run `llvm-config` to generate a list
of LLVM libraries and native dependencies needed by LLVM, but all cross-compiled
LLVM builds were using the *host triple's* `llvm-config` instead of the
*target's* `llvm-config`. This commit alters this to require the right
`llvmdeps.rs` to be generated which will run the correct `llvm-config`.
2015-05-19 10:36:00 -07:00
Felix S. Klock II bd4b984537 add `--enable-debuginfo-tests`, analogous to `--disable-optimize-tests`.
Then, decouple the question of whether the compiler/stdlib carry
debuginfo (which is controlled via `--enable-debuginfo` and implied by
`--enable-debug`) from the question of whether the tests carry
debuginfo (which now no longer is implied by `--enable-debug` nor
`--enable-debuginfo`, and is off by default).
2015-04-29 17:18:44 +02:00
Ryan Prichard 5e37729036 Add a new test group, rfail-full that runs rfail tests with fulldeps.
In most places in mk/tests.mk, it's positioned after rpass-full and
before cfail-full (because rfail comes before cfail). The order of tests
seems a little inconsistent, but reordering everywhere would obscure this
commit.
2015-04-26 06:05:38 -07:00
bors 69e47c77b2 Auto merge of #24537 - rprichard:fix-parallel-check, r=alexcrichton
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-23 17:32:16 +00:00
Ryan Prichard b7ab2aeebd Fix the dependency for the pretty-rpass-full tests
The current code attempts to define the
PRETTY_DEPS$(1)_H_$(3)_pretty-rpass-full variable, which does not work,
because $(1) and $(3) are not inside a function. Moreover, there is a test
(run-pass-fulldeps/compiler-calls.rs) that uses rustc_driver, which is not
an indirect dependency of librustc or libsyntax. Listing all the
dependencies will be hard to maintain, but there's a better way to do
this...

As with the rpass-full and cfail-full tests, add dependencies using the
$$(CSREQ$(1)_T_$(3)_H_$(3)) variable, which includes the complete set of
host and target crates, built for a particular stage and host. We use
T_$(3), not T_$(2), because we only build LLVM for host triples (not
target triples), so we can only build rustc_llvm for host triples. The
fulldeps tests that use plugins need host rustc crates, whereas fulldeps
tests that link against rustc and run should be skipped for
cross-compilation (such as Android).

Fixes #22021
2015-04-22 20:26:19 -07:00
kwantam 29d1252e4d deprecate Unicode functions that will be moved to crates.io
This patch
1. renames libunicode to librustc_unicode,
2. deprecates several pieces of libunicode (see below), and
3. removes references to deprecated functions from
   librustc_driver and libsyntax. This may change pretty-printed
   output from these modules in cases involving wide or combining
   characters used in filenames, identifiers, etc.

The following functions are marked deprecated:

1. char.width() and str.width():
   --> use unicode-width crate

2. str.graphemes() and str.grapheme_indices():
   --> use unicode-segmentation crate

3. str.nfd_chars(), str.nfkd_chars(), str.nfc_chars(), str.nfkc_chars(),
   char.compose(), char.decompose_canonical(), char.decompose_compatible(),
   char.canonical_combining_class():
   --> use unicode-normalization crate
2015-04-16 17:03:05 -04:00
Alex Crichton ed276caeec mk: Stop documenating non-facade crates
This commit ceases documentation-by-default of crates such as `term`,
`serialize`, and `alloc`. Crates like `term` and `rand` have duplicates on
`crates.io` and the search index entries generated in the local tree end up
only leading to confusion. Crates like the entire compiler infrastructure,
`flate`, or `rbml` don't need to be documented in such a prominent location.

This change also means that doc tests will no longer be run for crates beyond
the facade (e.g. `serialize` or `term`), but there were very few doc tests in
there to begin with.

Closes #22168
2015-04-07 17:54:34 -07:00
Alex Crichton d3647fe815 test: Move all run-make rustdoc tests to test/rustdoc 2015-04-07 17:54:33 -07:00
Alex Crichton 10359de405 compiletest: Add support for running rustdoc tests
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-07 17:54:33 -07:00
Richo Healey 7a4615e447 check: Warn users with nonzero RLIMIT_CORE 2015-03-27 16:50:37 -07:00
Sae-bom Kim a99936b397 make it use gdb instead of lldb when mac-android cross compile 2015-03-25 18:12:35 +09:00
Jorge Aparicio 3ab26f8469 join lines in makefile 2015-03-16 21:57:43 -05:00
Jorge Aparicio cb5e429291 move some tests back to libcollections 2015-03-16 21:57:42 -05:00
Jorge Aparicio 6453fcd4cc extract libcollections tests into libcollectionstest 2015-03-16 21:57:42 -05:00
Ryan Prichard 00211ecfda Avoid passing -L "" during cross-compilation.
LLVM_LIBDIR_<triple> is only defined for host triples, not target triples.

FWIW, the same is true for LLVM_STDCPP_RUSTFLAGS_<triple>, where we
explicitly define it as empty when --enable-llvm-static-stdcpp is not
specified, but it's still undefined for cross-compiled triples.
2015-03-13 16:46:45 -07:00
Cody P Schafer 100e1a93dc mk/tests: filter more possible debug-assertions 2015-03-11 15:25:32 -04:00
Alex Crichton d5d834551c rustc: Add a debug_assertions #[cfg] directive
This commit is an implementation of [RFC 563][rfc] which adds a new
`cfg(debug_assertions)` directive which is specially recognized and calculated
by the compiler. The flag is turned off at any optimization level greater than 1
and may also be explicitly controlled through the `-C debug-assertions`
flag.

[rfc]: https://github.com/rust-lang/rfcs/pull/563

The `debug_assert!` and `debug_assert_eq!` macros now respect this instead of
the `ndebug` variable and `ndebug` no longer holds any meaning to the standard
library.

Code which was previously relying on `not(ndebug)` to gate expensive code should
be updated to rely on `debug_assertions` instead.

Closes #22492
[breaking-change]
2015-03-05 14:51:38 -08:00
Felix S. Klock II 62aa899e3d Make build timestamp files robust in face of concurrent source modification.
Strategy: If the end goal is to touch e.g. `stamp.std`, then we first
touch `stamp.std.start_time` before doing anything else.  Then when
the receipe finishes, we touch `stamp.std` using the timestamp from
`stamp.std.start_time` as the reference time, and remove
`stamp.std.start_time`.

Fix #6518.
2015-03-03 15:11:01 +01:00
Huon Wilson 532cd5f85a Separate most of rustc::lint::builtin into a separate crate.
This pulls out the implementations of most built-in lints into a
separate crate, to reduce edit-compile-test iteration times with
librustc_lint and increase parallelism. This should enable lints to be
refactored, added and deleted much more easily as it slashes the
edit-compile cycle to get a minimal working compiler to test with (`make
rustc-stage1`) from

    librustc -> librustc_typeck -> ... -> librustc_driver ->
        libcore -> ... -> libstd

to

    librustc_lint -> librustc_driver -> libcore -> ... libstd

which is significantly faster, mainly due to avoiding the librustc build
itself.

The intention would be to move as much as possible of the infrastructure
into the crate too, but the plumbing is deeply intertwined with librustc
itself at the moment. Also, there are lints for which diagnostics are
registered directly in the compiler code, not in their own crate
traversal, and their definitions have to remain in librustc.

This is a [breaking-change] for direct users of the compiler APIs:
callers of `rustc::session::build_session` or
`rustc::session::build_session_` need to manually call
`rustc_lint::register_builtins` on their return value.

This should make #22206 easier.
2015-02-28 15:33:59 +11:00
Alex Crichton c5fddd81ab rollup merge of #22118: fhahn/separate-parse-fail-2
After making `rustc` fail on errors at a stop point, like `-Z parse-only`, in #22117, the files in this PR also fail during the parse stage and should be moved as well. Sorry for spliting this move up in two PRs.
2015-02-18 14:31:23 -08:00
bors 6c065fc8cb Auto merge of #21774 - ejjeong:enable-test-for-android, r=alexcrichton
- Now "make check-stage2-T-aarch64-linux-android-H-x86_64-unknown-linux-gnu" works (#21773)
- Fix & enable debuginfo tests for android (#10381)
- Fix & enable more tests for android (both for arm/aarch64)
- Enable many already-pass tests on android (both for arm/aarch64)
2015-02-17 19:35:12 +00:00
Florian Hahn 6824f1365d Add pfail targets for parse-fail tests 2015-02-16 20:52:39 +01:00
Florian Hahn ff1181da15 Only set --bench for crate tests when PLEASE_BENCH is set
closes #22291
2015-02-14 23:10:56 +01:00
Eunji Jeong 489f60461c Remove duplicated configuration for android 2015-02-10 21:53:33 +09:00
Eunji Jeong abd7fd924b Add one more depth on android test directory for multiple targets 2015-02-10 21:53:31 +09:00
Eunji Jeong 5cbdf1db9b Make aarch64-linux-android check with real target 2015-02-10 15:48:05 +09:00
Florian Hahn 01db9a46af Move compile-fail tests that are rejected by the parser to parse-fail 2015-02-06 22:23:16 +01:00
Brian Anderson 1364919b6c mk: Print test summary after tidy when running 'make check' 2015-02-05 14:37:17 -08:00
Brian Anderson 29be938136 mk: Remove redundant valgrind notices in build 2015-02-05 14:37:16 -08:00
Brian Anderson 290b79c15d Clean up tidy scripts, coverage, performance
This restructures tidy.py to walk the tree itself,
and improves performance considerably by not loading entire
files into buffers for licenseck.

Splits build rules into 'tidy', 'tidy-basic', 'tidy-binaries',
'tidy-errors', 'tidy-features'.
2015-02-05 14:37:16 -08:00
Brian Anderson 1ce86651c7 mk: Split tidy into multiple tidy rules
* tidy - runs all tidy scripts
* tidy-basic - tidy.rs
* tidy-binaries - check-binaries.py
* tidy-errors - errorck.py
* tidy-features - featureck.py
2015-02-05 14:37:16 -08:00
Brian Anderson 63fcbcf3ce Merge remote-tracking branch 'rust-lang/master'
Conflicts:
	mk/tests.mk
	src/liballoc/arc.rs
	src/liballoc/boxed.rs
	src/liballoc/rc.rs
	src/libcollections/bit.rs
	src/libcollections/btree/map.rs
	src/libcollections/btree/set.rs
	src/libcollections/dlist.rs
	src/libcollections/ring_buf.rs
	src/libcollections/slice.rs
	src/libcollections/str.rs
	src/libcollections/string.rs
	src/libcollections/vec.rs
	src/libcollections/vec_map.rs
	src/libcore/any.rs
	src/libcore/array.rs
	src/libcore/borrow.rs
	src/libcore/error.rs
	src/libcore/fmt/mod.rs
	src/libcore/iter.rs
	src/libcore/marker.rs
	src/libcore/ops.rs
	src/libcore/result.rs
	src/libcore/slice.rs
	src/libcore/str/mod.rs
	src/libregex/lib.rs
	src/libregex/re.rs
	src/librustc/lint/builtin.rs
	src/libstd/collections/hash/map.rs
	src/libstd/collections/hash/set.rs
	src/libstd/sync/mpsc/mod.rs
	src/libstd/sync/mutex.rs
	src/libstd/sync/poison.rs
	src/libstd/sync/rwlock.rs
	src/libsyntax/feature_gate.rs
	src/libsyntax/test.rs
2015-01-25 01:20:55 -08:00
Brian Anderson 0768892abe Minor fixes 2015-01-21 16:16:22 -08:00
Brian Anderson 11f4d62a06 Add a lint for library features
Does a sanity check of the version numbers.
2015-01-21 16:16:21 -08:00
Alex Crichton b250d9a3c8 rollup merge of #21289: brson/errorcodes
This does the bare minimum to make registration of error codes work again. After this patch, every call to `span_err!` with an error code gets that error code validated against a list in that crate and a new tidy script `errorck.py` validates that no error codes are duplicated globally.

There are further improvements to be made yet, detailed in #19624.

r? @nikomatsakis
2015-01-21 09:13:46 -08:00
Brian Anderson 953d6dfd7e Make error code registration work again. #19624 2015-01-20 11:27:14 -08:00
Barosl LEE 5b57aa757b Rollup merge of #21399 - kballard:fix-PLEASE_BENCH, r=Gankro
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-21 02:16:52 +09:00
Kevin Ballard c166017445 Fix `make check PLEASE_BENCH=1`
611ef49f2f removed all the metrics stuff
from tests.mk, but this meant that `PLEASE_BENCH=1` no longer did
anything.

Fixes #21324.
2015-01-19 10:59:57 -08:00
Kang Seonghoon de6f520192 tests: Add htmldocck.py script for the use of Rustdoc tests.
The script is intended as a tool for doing every sort of verifications
amenable to Rustdoc's HTML output. For example, link checkers would go
to this script. It already parses HTML into a document tree form (with
a slight caveat), so future tests can make use of it.

As an example, relevant `rustdoc-*` run-make tests have been updated
to use `htmldocck.py` and got their `verify.sh` removed. In the future
they may go to a dedicated directory with htmldocck running by default.
The detailed explanation of test scripts is provided as a docstring of
htmldocck.

cc #19723
2015-01-18 02:42:15 +09:00
Alex Crichton 7541f82fab Fix dead links in the guide and reorganize 2015-01-08 10:27:03 -08:00
Steve Klabnik 16a6ebd1f6 "The Rust Programming Language"
This pulls all of our long-form documentation into a single document,
nicknamed "the book" and formally titled "The Rust Programming
Language."

A few things motivated this change:

* People knew of The Guide, but not the individual Guides. This merges
  them together, helping discoverability.
* You can get all of Rust's longform documentation in one place, which
  is nice.
* We now have rustbook in-tree, which can generate this kind of
  documentation. While its style is basic, the general idea is much
  better: a table of contents on the left-hand side.
* Rather than a almost 10,000-line guide.md, there are now smaller files
  per section.
2015-01-08 12:02:11 -05:00
Alex Crichton 7d8d06f86b Remove deprecated functionality
This removes a large array of deprecated functionality, regardless of how
recently it was deprecated. The purpose of this commit is to clean out the
standard libraries and compiler for the upcoming alpha release.

Some notable compiler changes were to enable warnings for all now-deprecated
command line arguments (previously the deprecated versions were silently
accepted) as well as removing deriving(Zero) entirely (the trait was removed).

The distribution no longer contains the libtime or libregex_macros crates. Both
of these have been deprecated for some time and are available externally.
2015-01-03 23:43:57 -08:00
Alex Crichton cb7599b83e rollup merge of #20317: brson/rust-installer-v2 2014-12-29 19:47:58 -08:00
Brian Anderson 4f2ab2bf46 Upgrade rust-installer to v2 2014-12-29 17:26:02 -08:00
Bheesham Persaud 9092ebab20 Removed the sharding bit from mk/tests.mk
I forgot to do this in my previous PR. This should close #19145 .

	modified:   mk/tests.mk
2014-12-25 16:22:06 -05:00
Alex Crichton fb7c08876e Test fixes and rebase conflicts 2014-12-21 13:49:04 -08:00
Alex Crichton 7e62684bb4 rollup merge of #20054: bheesham/nomet
#19145
2014-12-21 09:27:35 -08:00
Alex Crichton 576467b492 rollup merge of #19983: Munksgaard/fix-19981
The use of `+a+x` is deprecated.

Fixes #19981.
2014-12-21 09:26:44 -08:00
Eduard Burtescu c54fc980f3 Split resolve from rustc::middle into rustc_resolve. 2014-12-20 07:28:47 +02:00
Bheesham Persaud 611ef49f2f Took out all of the metrics stuff from tests.mk
References rust-lang/rust/#19145

	modified:   src/llvm (new commits)
2014-12-19 08:57:15 -05:00
Philip Munksgaard 3d6babee9d Use `-perm /a+x` instead of `-perm +a+x` in calls to find
The use of `+a+x` is deprecated.

Fixes #19981.
2014-12-18 16:22:10 +01:00
Niko Matsakis 2854d1bfc2 Separate borrowck into its own crate and remove dead code as well. 2014-12-13 06:01:19 -05:00
Niko Matsakis 602fc781ff Remove crates from test list so that we don't waste time building them. 2014-12-05 02:01:57 -05:00
bors 09f04bf2c9 auto merge of #19417 : alexcrichton/rust/issue-19383, r=huonw
We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383
2014-12-01 07:11:53 +00:00
Corey Farwell 38e008eccd Fix typo in tests makefile 2014-11-30 09:07:36 -05:00
Alex Crichton 1d4ce37946 mk: Use host llvm linkage paths, not target ones
We only build LLVM for the host architecture, not the target architecture, so
this was just a minor typo in the parameters uses.

Closes #19383
2014-11-30 00:01:19 -08:00
Richard Diamond ce507c6c22 Don't forget the tests. 2014-11-25 19:05:28 -06:00
Huon Wilson ff0278bc15 Update makefiles to ensure src/grammar/verify.rs is built.
It's not run, but this ensures that the code at least doesn't go out of
date.
2014-11-19 13:12:05 +11:00
Michael Woerister 2f215f644f debuginfo: Make LLDB test make targets dependent on lldb python scripts. 2014-11-05 13:32:09 +01:00
Daniel Micay 79723a3e30 Revert "enable parallel codegen by default"
This reverts commit c245c5bbad.

Parallel code generation generates invalid code for librand, which is
caught by recent versions of binutils.
2014-10-28 20:14:00 -04:00
Nick Cameron 80ff1d1a10 Error if we should be able to Valgrind but can't 2014-10-23 14:28:52 +13:00
Nick Cameron 1285d4f467 Remove support for .rc files from test.mk 2014-10-23 13:52:35 +13:00
Nick Cameron c562b5bd9d Make rpass-valgrind work with pretty 2014-10-23 13:52:34 +13:00
Nick Cameron f466e1a59f Add run-pass-valgrind tests
Closes #16914
2014-10-23 13:52:34 +13:00
Michael Woerister 93bd605c58 debuginfo: Enable LLDB test suite on Darwin. 2014-10-22 10:47:45 +02:00
Stuart Pernsteiner c245c5bbad enable parallel codegen by default
Enable parallel codegen (2 units) by default when --opt-level is 0 or 1.  This
gives a minor speedup on large crates (~10%), with only a tiny slowdown (~2%)
for small ones (which usually build in under a second regardless).  The current
default (no parallelization) is used when the user requests optimization
(--opt-level 2 or 3), and when the user has enabled LTO (which is incompatible
with parallel codegen).

This commit also changes the rust build system to use parallel codegen
when appropriate.  This means codegen-units=4 for stage0 always, and
also for stage1 and stage2 when configured with --disable-optimize.
(Other settings use codegen-units=1 for stage1 and stage2, to get
maximum performance for release binaries.)  The build system also sets
codegen-units=1 for compiletest tests (compiletest does its own
parallelization) and uses the same setting as stage2 for crate tests.
2014-10-21 14:46:16 -07:00
Alex Crichton 724bbab577 rollup merge of #18012 : pnkfelix/gate-bors-on-building-compiletest 2014-10-13 15:10:25 -07:00
Felix S. Klock II b26972e28b Make bors check that `compiletest` builds from both stage0 and stage1 rustc.
----

To reproduce issue on commit ba246100ca
it does not suffice to add just `check-build-compiletest` to
`check-secondary`; one must also ensure that `check-build-compiletest`
precedes the satisification of the `check` rule.

Otherwise hidden dependencies of `compiletest` would end up getting
satisfied when make builds `rustc` at each stage in order to
eventually run `check-stage2`.

So to handle that I moved `check-secondary` before `check` in the
`check-all` rule that bors uses, and for good measure, I also put
`check-build-compiltest` at the front of the `check-secondary` rule's
dependencies.

My understanding is that running `check-secondary` should be
relatively cheap, and thus such a reordering will not hurt bors.

----

Fix #17883.
2014-10-13 20:58:34 +02:00
Alex Crichton 5b043d712b Fix `find` check for executables
Apparently the fix in d08441b9 didn't catch a recent executable (#17965), but
I've verified that this does indeed catch the executable
2014-10-12 12:36:32 -07:00
Michael Woerister 895aac9935 debuginfo: Add LLDB version handling to test infrastructure. 2014-10-08 08:24:49 +02:00
John Gallagher 8dab56ea9d Make find->tidy resilient to filenames with spaces 2014-10-01 07:49:06 -04:00
O S K Chaitanya 2443dd0dcc collapse setting and exporting RUST_BENCH into one line 2014-09-23 03:12:37 +02:00
O S K Chaitanya 23ba9072e1 Use locale 'C' for running tests. Closes #17423 2014-09-23 03:07:39 +02:00
Brian Anderson d53f80dcd6 mk: Remove check-fast target 2014-09-18 11:49:03 -07:00
Vadim Chugunov d08441b9d6 Fix #17156 2014-09-10 17:11:25 -07:00
Michael Woerister 849ae5d881 debuginfo: Emit different autotest debugger scripts depending on GDB version. 2014-08-27 15:19:14 +02:00
Brian Anderson ae97e6f8d3 mk: Remove check-syntax target
This appears to be redundantly named with a shortcut target for
testing the syntax crate.
2014-07-25 14:28:55 -07:00
Brian Anderson 71f8db5b62 mk: Add comments to primary check targets 2014-07-24 21:34:51 -07:00
Brian Anderson 80b93a3b85 mk: Add check-secondary target for tests with no x-platform risk.
We'll use this to run a subset of the test suite onto a dedicated
bot.

This puts the grammar tests and the pretty-printer tests under
check-secondary. It leanves the pretty tests under plain `check`
for now, until the new bot is added to take over.

Because check-secondary is not run as part of `make check` there
will be a set of tests that most users never run and are only
checked by bors. I think this will be ok because grammar tests
should rarely regress, and the people regressing such tests
should have the fortitude to deal with it.
2014-07-24 21:34:51 -07:00
Birunthan Mohanathas 6511053d1c mk: Add space before line continuation backslash 2014-07-23 08:44:11 -07:00
Birunthan Mohanathas c5433c3a0f mk: Remove extra whitespace before line continuation backslashes 2014-07-23 08:41:55 -07:00
Corey Richardson 857bb60fe0 Don't run lexer tests by default 2014-07-21 19:26:20 -07:00
Corey Richardson c41a7dfcc7 Shuffle around check-lexer conditions 2014-07-21 18:38:40 -07:00
bors fa7cbb5a46 auto merge of #15283 : kwantam/rust/master, r=alexcrichton
Add libunicode; move unicode functions from core

- created new crate, libunicode, below libstd
- split `Char` trait into `Char` (libcore) and `UnicodeChar` (libunicode)
  - Unicode-aware functions now live in libunicode
    - `is_alphabetic`, `is_XID_start`, `is_XID_continue`, `is_lowercase`,
      `is_uppercase`, `is_whitespace`, `is_alphanumeric`, `is_control`, `is_digit`,
      `to_uppercase`, `to_lowercase`
  - added `width` method in UnicodeChar trait
    - determines printed width of character in columns, or None if it is a non-NULL control character
    - takes a boolean argument indicating whether the present context is CJK or not (characters with 'A'mbiguous widths are double-wide in CJK contexts, single-wide otherwise)
- split `StrSlice` into `StrSlice` (libcore) and `UnicodeStrSlice` (libunicode)
  - functionality formerly in `StrSlice` that relied upon Unicode functionality from `Char` is now in `UnicodeStrSlice`
    - `words`, `is_whitespace`, `is_alphanumeric`, `trim`, `trim_left`, `trim_right`
  - also moved `Words` type alias into libunicode because `words` method is in `UnicodeStrSlice`
- unified Unicode tables from libcollections, libcore, and libregex into libunicode
- updated `unicode.py` in `src/etc` to generate aforementioned tables
- generated new tables based on latest Unicode data
- added `UnicodeChar` and `UnicodeStrSlice` traits to prelude
- libunicode is now the collection point for the `std::char` module, combining the libunicode functionality with the `Char` functionality from libcore
  - thus, moved doc comment for `char` from `core::char` to `unicode::char`
- libcollections remains the collection point for `std::str`

The Unicode-aware functions that previously lived in the `Char` and `StrSlice` traits are no longer available to programs that only use libcore. To regain use of these methods, include the libunicode crate and `use` the `UnicodeChar` and/or `UnicodeStrSlice` traits:

    extern crate unicode;
    use unicode::UnicodeChar;
    use unicode::UnicodeStrSlice;
    use unicode::Words; // if you want to use the words() method

NOTE: this does *not* impact programs that use libstd, since UnicodeChar and UnicodeStrSlice have been added to the prelude.

closes #15224
[breaking-change]
2014-07-09 18:36:30 +00:00
kwantam 85e2bee4a2 fix test failures
- unicode tests live in coretest crate
- libcollections str tests need UnicodeChar trait.
- libregex perlw tests were checking a char in the Alphabetic category,
  \x2161. Confirmed perl 5.18 considers this a \w character. Changed to
  \x2961, which is not \w as the test expects.
2014-07-09 10:14:46 -04:00
Brian Anderson 8121c39a3e mk: Run tidy after tests in 'make check'
Tidy takes like forever to run.
2014-07-07 18:02:59 -07:00
Steven Fackler 1ed646eaf7 Extract tests from libcore to a separate crate
Libcore's test infrastructure is complicated by the fact that many lang
items are defined in the crate. The current approach (realcore/realstd
imports) is hacky and hard to work with (tests inside of core::cmp
haven't been run for months!).

Moving tests to a separate crate does mean that they can only test the
public API of libcore, but I don't feel that that is too much of an
issue. The only tests that I had to get rid of were some checking the
various numeric formatters, but those are also exercised through normal
format! calls in other tests.
2014-06-29 15:57:21 -07:00
Alex Crichton b9adb6c717 Test fixes from rollup
Closes #14888 (Allow disabling jemalloc as the memory allocator)
Closes #14905 (rustc: Improve span for error about using a method as a field.)
Closes #14920 (Fix #14915)
Closes #14924 (Add a Syntastic plugin for Rust.)
Closes #14935 (debuginfo: Correctly handle indirectly recursive types)
Closes #14938 (Reexport `num_cpus` in `std::os`. Closes #14707)
Closes #14941 (std: Don't fail the task when a Future is dropped)
Closes #14942 (rustc: Don't mark type parameters as exported)
Closes #14943 (doc: Fix a link in the FAQ)
Closes #14944 (Update "use" to "uses" on ln186)
Closes #14949 (Update repo location)
Closes #14950 (fix typo in the libc crate)
Closes #14951 (Update Sublime Rust github link)
Closes #14953 (Fix --disable-rpath and tests)
2014-06-16 19:05:08 -07:00
Alex Crichton 375c5b884f Fix --disable-rpath and tests
This involved a few changes to the local build system:

* Makefiles now prefer our own LD_LIBRARY_PATH over the user's LD_LIBRARY_PATH
  in order to support building rust with rust already installed.
* The compiletest program was taught to correctly pass through the aux dir as a
  component of LD_LIBRARY_PATH in more situations.

This change was spliced out of #14832 to consist of just the fixes to running
tests without an rpath setting embedded in executables.
2014-06-16 18:16:45 -07:00
Alex Crichton cb12e7ab74 mk: Run doc tests with --cfg dox
There were a few examples in the macros::builtin module that weren't being run
because they were being #[cfg]'d out.

Closes #14697
2014-06-06 19:51:52 -07:00