Commit Graph

366 Commits

Author SHA1 Message Date
Tim Chevalier
a9dddbacde rust / build: Remove the rust tool
Sadly, there's a lack of resources for maintaining the `rust` tool,
and we decided in the 2013-10-08 Rust team meeting that it's better
to remove it altogether than to leave it in a broken state.

This deletion is without prejudice. If a person or people appear who
would like to maintain the tool, we will probably be happy to
resurrect it!

Closes #9775
2013-10-10 14:36:06 -07:00
Alex Crichton
d29b3ac8a7 Expand tidy to prevent binaries from being checked
Closes #9621
2013-09-30 10:15:47 -07:00
Alex Crichton
6aba140fa7 rustdoc: Add sundown to src/rt/
This also starts compiling it in the same manner as linenoise, it's just bundled
with librustrt directly, and we export just a few symbols out of it.
2013-09-25 14:27:41 -07:00
Alex Crichton
7b24efd6f3 rustdoc: Out with the old, in with the new
Removes old rustdoc, moves rustdoc_ng into its place instead (plus drops the _ng
suffix). Also shreds all reference to rustdoc_ng from the Makefile rules.
2013-09-22 09:51:15 -07:00
Alex Crichton
833a64d76e Invert --cfg debug to --cfg ndebug
Many people will be very confused that their debug! statements aren't working
when they first use rust only to learn that they should have been building with
`--cfg debug` the entire time. This inverts the meaning of the flag to instead
of enabling debug statements, now it disables debug statements.

This way the default behavior is a bit more reasonable, and requires less
end-user configuration. Furthermore, this turns on debug by default when
building the rustc compiler.
2013-09-20 12:10:04 -07:00
Alex Crichton
876cb76f1b Add the rustdoc_ng binary to the makefile rules
Now rustdoc_ng will be built as both a binary and a library (using the same
rules as all the other binaries that rust has). Furthermore, this will also
start building rustdoc_ng unit tests (and running them).
2013-09-16 18:10:46 -07:00
Alex Crichton
1f044893b1 Don't run lint over gyp files (they just fail anyway) 2013-09-05 19:20:30 -07:00
bors
6a225951e3 auto merge of #8886 : cmr/rust/test-restructure, r=cmr 2013-08-30 14:00:43 -07:00
Corey Richardson
d7be86f1a5 Revert "src/test/bench: restructure"
This reverts commit 14cdc26e8a.
2013-08-30 16:17:53 -04:00
Corey Richardson
fdcc415957 Revert "Teach the makefile to use multiple src-base's"
This reverts commit 43f851d2cb.
2013-08-30 16:17:29 -04:00
bors
ed422b8872 auto merge of #8819 : vadimcn/rust/unit-tests, r=brson
Some of the tests are failing.  I've only managed to fix 'memory_map_file', the rest are up for grabs...

Fixes #5261.
2013-08-29 20:40:47 -07:00
Corey Richardson
43f851d2cb Teach the makefile to use multiple src-base's 2013-08-28 08:16:21 -04:00
Corey Richardson
14cdc26e8a src/test/bench: restructure 2013-08-28 08:14:59 -04:00
Vadim Chugunov
546e2ae850 Added libstd and libextra unit tests to check-fast target. 2013-08-28 01:44:12 -07:00
Graydon Hoare
2fb5c49abb test: add support for sharding testsuite by passing --test-shard=a.b 2013-08-23 15:30:23 -07:00
Alex Crichton
d765522511 Don't attempt to run tidy over libuv or llvm 2013-08-22 14:58:06 -07:00
bors
5003f607ec auto merge of #8642 : sanxiyn/rust/arm-test, r=catamorphism
`stdtest` and `extratest` expects to be able to write to `tmp` directory under the current working directory, so the first commit creates `tmp` directory and changes the directory before running tests.

The second commit adds `--bench` argument to test runs and copies metrics from the remote device.
2013-08-22 08:31:28 -07:00
Daniel Micay
5f3a637b7c enable tests for the container tutorial 2013-08-20 22:05:46 -04:00
Seo Sanghyeon
0276fe471a Android: Run benchmarks and copy metrics 2013-08-20 19:07:36 +09:00
Seo Sanghyeon
5e87f2f89e Android: Change directory before running tests 2013-08-20 16:50:45 +09:00
Graydon Hoare
ef5d537010 doc: add condition tutorial 2013-08-19 16:48:48 -07:00
Alex Crichton
88b89f8476 Allow disabling optimizations in tests only 2013-08-11 00:29:45 -07:00
bors
6f6dce7bbc auto merge of #8176 : catamorphism/rust/rustpkg-extern-mod, r=catamorphism
r? @graydon Also, notably, make rustpkgtest depend on the rustpkg executable (otherwise, tests that shell out to rustpgk might run when rustpkg doesn't exist).
2013-08-09 16:17:10 -07:00
Tim Chevalier
37fd8f03fd rustpkg: Simplify the PkgId struct
Get rid of special cases for names beginning with "rust-" or
containing hyphens, and just store a Path in a package ID. The Rust-identifier
for the crate is none of rustpkg's business.
2013-08-09 14:11:55 -07:00
Tim Chevalier
96fd606ddd std/rustc/rustpkg/syntax: Support the extern mod = ... form
This commit allows you to write:

 extern mod x = "a/b/c";

which means rustc will search in the RUST_PATH for a package with
ID a/b/c, and bind it to the name `x` if it's found.

Incidentally, move get_relative_to from back::rpath into std::path
2013-08-09 14:11:50 -07:00
Tim Chevalier
e751c90513 Makefiles: make rustpkgtest depend on rustpkg executable 2013-08-08 15:17:28 -07:00
Young-il Choi
d463f4cb10 mk: test.mk fix to specify ADB variables not adb 2013-08-07 20:43:46 +09:00
bors
fc571820d1 auto merge of #8202 : pnkfelix/rust/fsk-issue8056-make-crates-must-dep-on-subcrates, r=graydon
Reorder TEST_HOST_CRATES in hopes of exposing future instances of this bug.

Fix #8056
2013-08-02 09:13:53 -07:00
Felix S. Klock II
3e5b058521 Make crate tests depend on their extern crates. Reorder TEST_HOST_CRATES in hopes of exposing future instances of this bug. 2013-08-02 01:11:24 +02:00
Etienne Millon
0e2a086350 mk/tests.mk: remove mention of nonexistent files 2013-08-01 00:36:06 +02:00
Etienne Millon
bd980bcbf5 mk/tests.mk: fix typo "srcrustllvm" 2013-08-01 00:36:01 +02:00
bors
38d62feec1 auto merge of #8111 : brson/rust/no-bench, r=graydon 2013-07-30 20:46:18 -07:00
Brian Anderson
ceba95ced2 mk: Add NO_BENCH variable for turning off the --bench flag 2013-07-29 12:43:45 -07:00
Brian Anderson
ac2cd14867 mk: Rename CTEST_BENCH to TEST_BENCH
The CTEST prefix is specifically related to the compiletest driver
2013-07-29 12:38:12 -07:00
Brian Anderson
8ae900f51d mk: Fix NO_REBUILD so stdtest can be tested without re-bootstrapping. Closes #8101 2013-07-29 11:22:50 -07:00
bors
44808fcee6 auto merge of #7820 : pnkfelix/rust/fill-in-some-missing-rustc-lib-dependences, r=graydon
r? anyone

Fix #8057

This commit fixes some oversights in the Makefile where rustc could be
invoked without some of its dependencies yet in place.  (I encountered
the problem in practice; its not just theoretical.)

As written in Makefile.in, $(STAGE$(1)_T_$(2)_H_$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple.  (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using `make
-jN` for certain (large-ish) `N`, one can encounter situations where
GNU make attempts to invoke `rustc` before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)_T_$(2)_H_$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

----

In addition to adding the extra dependences on TSREQ..., I also
replaced occurrences of the pattern:

    TSREQ$(1)_T_$(2)_H_$(3)
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

with:

    SREQ$(1)_T_$(2)_H_$(3)

which is equivalent to the above, as defined in Makefile.in

----

Finally, for the cases where TSREQ was missing in tests.mk, I went
ahead and put in a dependence on SREQ rather than just TSREQ, since it
was not clear to me how one could expect to compile those cases
without stdlib and extralib.

(It could well be that I should have gone ahead and done the same in
 other cases where I saw TSREQ was missing, and put SREQ in those
 cases as well.  But this seemed like a good measure for now, without
 needing to tax my understanding of the overall makefile
 infrastructure much further.)
2013-07-26 11:34:46 -07:00
Felix S. Klock II
1f92557512 Tests select when to use --cfg debug, regardless of configure settings.
Remove directive, if present, from CFG_RUSTC_FLAGS.

Fix #7898.

(One alternative tack is to build up distinct CFG_TEST_RUSTC_FLAGS
alongside CFG_RUSTC_FLAGS; but currently debug is the only --cfg flag
ever added to CFG_RUSTC_FLAGS; the other contents of CFG_RUSTC_FLAGS
are a mix of -Z flags and a few other switches like O, which seem to
make sense to propogate to the tests.)
2013-07-24 11:29:43 +02:00
Graydon Hoare
4bf6b84a4d make: turn off --bench when running under valgrind 2013-07-17 11:52:21 -07:00
Graydon Hoare
cdce33a421 Add configure and make machinery to activate perf metrics and ratchets. 2013-07-16 09:33:54 -07:00
Felix S. Klock II
534dd628a7 Add dependence arc from running rustc to its libraries.
This commit fixes some oversights in the Makefile where rustc could be
invoked without some of its dependencies yet in place.  (I encountered
the problem in practice; its not just theoretical.)

As written in Makefile.in, $(STAGE$(1)_T_$(2)_H_$(3)) is the way one
writes an invocation of rustc where $(1) is the stage number $(2) is
the target triple $(3) is the host triple.  (Other uses of the macro
may plug in actual values or different parameters in for those three
formal parameters.)

When you have invocations of $(STAGE...), you need to make sure that
its dependences are satisfied; otherwise, if someone is using `make
-jN` for certain (large-ish) `N`, one can encounter situations where
GNU make attempts to invoke `rustc` before it has actually copied some
of its libraries into place, such as libmorestack.a, which causes a
link failure when the rustc invocation attempts to link in those
libraries.

In this case, the main prerequisite to add is TSREQ$(1)_T_$(2)_H_$(3),
which is described in Makefile.in as "Prerequisites for using the
stageN compiler to build target artifacts"

----

In addition to adding the extra dependences on TSREQ..., I also
replaced occurrences of the pattern:

    TSREQ$(1)_T_$(2)_H_$(3)
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_STDLIB_$(2))
    $$(TLIB$(1)_T_$(2)_H_$(3))/$(CFG_EXTRALIB_$(2))

with:

    SREQ$(1)_T_$(2)_H_$(3)

which is equivalent to the above, as defined in Makefile.in

----

Finally, for the cases where TSREQ was missing in tests.mk, I went
ahead and put in a dependence on SREQ rather than just TSREQ, since it
was not clear to me how one could expect to compile those cases
without stdlib and extralib.

(It could well be that I should have gone ahead and done the same in
 other cases where I saw TSREQ was missing, and put SREQ in those
 cases as well.  But this seemed like a good measure for now, without
 needing to tax my understanding of the overall makefile
 infrastructure much further.)
2013-07-16 13:45:30 +02:00
Graydon Hoare
fbc5bb4c0a wire up makefile to run codegen tests and add one to start 2013-07-11 13:15:52 -07:00
Alex Crichton
d49acef07b Add rusti/rustpkg to check-lite
Ironically also disable rusti tests for now, but mainly because they're awaiting
LLVM upgrades before proceeding
2013-07-07 19:13:21 -07:00
Graydon Hoare
f1159446ba Update tests.mk
disable rusti tests, nothing's landing
2013-07-06 02:19:37 -07:00
Young-il Choi
4efb17fcf5 mk: tests.mk simplify the method to clean arm testing directory 2013-06-17 18:41:22 +09:00
Young-il Choi
5076bca1ba mk: test.mk modify to better support 2013-06-01 17:28:57 +09:00
Graydon Hoare
858ca2e3c8 fix the check-stageN-doc-$doc targets, close #5661 2013-05-30 15:49:53 -07:00
bors
d2957091c4 auto merge of #6733 : alexcrichton/rust/issue-2400, r=brson
Most of the relevant information can be found in the commit messages.

r? @brson - I just wanted to make sure the make changes aren't completely bogus

This would close #2400, #6517, and #6489 (although a run through incoming-full on linux would have to confirm the latter two)
2013-05-29 12:13:49 -07:00
Alex Crichton
ff86830c9c Define rustc's host triple at compile time
This way a cross-compiled rustc's answer to host_triple() is correct. The return
value of host_triple() reflects the actual host triple that the compiler was
build for, not the triple the compiler is being built on
2013-05-28 21:23:42 -05:00
Alex Crichton
8749cb59d8 Fix 'make check-stage1-std' by correcting dependencies 2013-05-28 09:37:38 -05:00
Patrick Walton
0c820d4123 libstd: Rename libcore to libstd and libstd to libextra; update makefiles.
This only changes the directory names; it does not change the "real"
metadata names.
2013-05-22 21:57:05 -07:00
Alex Crichton
54f2147e8e Get unit tests for rusti working
* They didn't work before, because the location of the tests caused the
  'sysroot' option to crate lookup to be wrong for finding the correct stage's
  core/std libraries. This moves the compiled tests from the $host/test
  directory into a $host/$stage/test directory. This means that the sysroot will
  be correct and the core/std libraries can actually be found
* The LLVM bindings apparently aren't threadsafe, so we can't run multiple tests
  in parallel.
2013-05-14 14:11:07 -04:00
Daniel Micay
d800147abb minor automatic whitespace fixes 2013-05-06 23:57:35 -04:00
bors
bd5fd6e42a auto merge of #6150 : yichoi/rust/arm-test-pull, r=brson
Support #5297

install.mk : install-runtime-target added for conveneice
                 automatically push runtime library to android device

test.mk : expanded to support android test automation with adb

compiletest : expanded to support android test automation with adb
2013-05-06 13:15:38 -07:00
Young-il Choi
5681571f6c compiletest: remove --host and cleanup 2013-05-04 10:35:07 +09:00
Daniel Micay
86efd97a10 add gitattributes and fix whitespace issues 2013-05-03 20:01:42 -04:00
Young-il Choi
84bdd05acc compiletest: fix decision rule to run and cleanup 2013-05-04 00:49:18 +09:00
Young-il Choi
17b368fd22 mk: configurable android test directory 2013-05-03 11:14:01 +09:00
Young-il Choi
6f6dd86248 compiletest: configurable test dir for ARM 2013-05-02 13:16:01 +09:00
Young-il Choi
3afd708e2a mk: minor fix for test.mk to support mutiple target test 2013-05-02 08:58:24 +09:00
Young-il Choi
57c126e9bb mk: test.mk expanded to ARM test automation 2013-05-01 18:50:23 +09:00
Brian Anderson
5e6dacf32e mk: If NO_REBUILD is set then don't rebuild core/std before testing
Can make turnaround of testing changes to core/std/syntax much faster.
2013-03-18 16:59:37 -07:00
Brian Anderson
3976e56bfe Disable debuginfo tests on mac since gdb requires root 2013-03-12 11:58:50 -07:00
ILyoan
cc76cb02fb mk: cleanup - minor fixes for android check 2013-03-08 14:45:16 +09:00
Young-il Choi
7714d52cd9 mk: cleanup - lib and executable suffix handling 2013-03-02 21:25:12 +09:00
Brian Anderson
49c3f9f166 mk: Cross-compile fixes 2013-03-02 10:44:56 +09:00
Brian Anderson
15c0c35352 mk: Split target triples into bulid triple + host triples + target triples
For cross compiling to targets that don't want to build a compiler
2013-02-21 17:51:55 -08:00
Marvin Löbel
702a6f7a18 Attempt to solve make check test ambiguity betwen crate 'rust' and extratected doc 'rust' 2013-02-19 02:22:14 +01:00
Marvin Löbel
726fc877d1 Added rust convenience tool similar to go's go tool 2013-02-18 23:11:08 +01:00
Zack Corr
621c791ded Rename cargo to rustpkg and start over fresh 2013-02-15 18:04:10 -08:00
Brian Anderson
79e9b6d6a1 mk: Run debuginfo tests by default, but only if gdb is available 2013-02-10 14:19:12 -08:00
Brian Anderson
85d7b3c154 mk: Typo 2013-02-10 13:35:20 -08:00
Brian Leibig
6bfbdadd3b Add debug info tests 2013-02-09 13:09:19 -05:00
Brian Anderson
b72069f6f1 mk: Add output files to tests so they don't rerun unnecessarily 2013-02-06 11:54:37 -08:00
Brian Anderson
1970c9c4d2 mk: Don't check core/std/rustc as part of check-fast
When debugging check-fast it's annoying to wait through core/std
2013-02-05 20:02:48 -08:00
Brian Anderson
0e913a4c90 mk: Parameterize tests.mk to the max 2013-02-05 20:02:46 -08:00
Brian Anderson
ff9139605c Start running the libsyntax unit tests. #4618 2013-01-25 14:49:02 -08:00
Daniel Micay
486217d7a2 add missing $(CFG_PYTHON) prefixes 2013-01-03 03:15:35 -05:00
Brian Anderson
fbf43492d5 Add check-stageN-doc target. Closes #4007 2012-12-14 16:48:32 -08:00
Graydon Hoare
d1affff623 Reliciense makefiles and testsuite. Yup. 2012-12-10 17:32:58 -08:00
Brian Anderson
cf002e9d32 Tools should not be build prereqs of tests. Closes #3946 2012-11-13 18:35:02 -08:00
Brian Anderson
a3c6b6a642 Fix rusti check targets some more 2012-11-04 17:25:46 -08:00
Brian Anderson
ee120decd9 Add missing rusti check targets 2012-11-04 17:17:04 -08:00
Brian Anderson
3634ab817e Fix tidy for new linenoise 2012-11-04 14:35:04 -08:00
Brian Anderson
1b0c6665d9 Merge remote-tracking branch 'brson/repl'
Conflicts:
	mk/install.mk
	src/rt/rustrt.def.in
2012-11-04 13:42:39 -08:00
Zack Corr
4f56b4983b Remove linenoise files from the tidy check 2012-11-04 11:39:14 +10:00
Daniel Patterson
ff07e68758 library-tool-conversion: update tests.mk for librustdoc and libcargo 2012-11-03 18:23:43 -07:00
Brian Anderson
17a5d0f3a0 Use correct version of python to run check-summary.py. Issue #3883 2012-10-30 13:25:08 -07:00
Zack Corr
ea996556b9 rusti: Remove linenoise module, add to rt, remove core::rl 2012-10-30 11:08:36 +10:00
Brian Anderson
24e10fe300 build: Use correct python version. Closes #3883 2012-10-29 13:10:54 -07:00
Zack Corr
4912428cb5 rusti: Add linenoise, wrap into core::rl and add rusti REPL tool
Add Brian Leibig to AUTHORS.txt for REPL contributions
2012-10-27 18:03:15 +10:00
Brian Anderson
fd0de8bfd7 doc: Split out task tutorail. Add links to sub-tutorials 2012-09-22 15:34:01 -07:00
Brian Anderson
864cca14ee docs: Make supplemental tutorials testable 2012-09-15 18:06:20 -07:00
Graydon Hoare
6c5c835a1d Make check-notidy not run tidy, as implied. Close #3105. 2012-08-29 14:49:13 -07:00
Graydon Hoare
b769e29680 Compress metadata section. Seems a minor speed win, major space win. 2012-08-28 14:50:39 -07:00
Graydon Hoare
7c1339b2f1 Add check-notidy target. Close #2943. 2012-07-25 15:39:56 -07:00
Brian Anderson
9b9ceea6bd Begin running cargo tests 2012-06-02 21:30:26 -07:00
Brian Anderson
c5d168c404 build: Fix bogus test teps 2012-06-01 22:16:58 -07:00
Brian Anderson
630c084da6 test: Move tests with rustc deps into run-pass-fulldeps
These tests require a lot more to be built before running so are not part of
check-lite
2012-06-01 16:01:56 -07:00
Brian Anderson
5dc236cdac build: Add check-lite target
Runs the core, std, run-pass, run-fail, compile-fail tests for stage2 and
builds only their dependencies.

We'll use this on the bots' try branch.
2012-06-01 12:28:03 -07:00
Kevin Cantu
7dcbaedd32 Rename librustsyntax to libsyntax
Per issue #2418.
2012-05-31 11:15:00 -07:00
Brian Anderson
4fec4cd8f5 bench: Add hard mode to benchmarks. Activate with RUST_BENCH.
RUST_BENCH is on automatically when running `make perf`
2012-05-23 22:55:41 -07:00
Brian Anderson
264f900dfa build: Start running core tests on windows 2012-05-02 17:51:12 -07:00
Brian Anderson
30385022c1 build: No tidy for test files. Closes #2271 2012-04-30 16:33:45 -07:00
Brian Anderson
31853f31bf build: Don't require full target libs to run compiletest tests
Only build through librustsyntax, which some tests do rely on.
2012-04-24 13:30:03 -07:00
Niko Matsakis
d2482fd763 use find not echo; this also brings fuzzer under the iron fist of tidy.py! 2012-04-13 11:59:17 -07:00
Brian Anderson
516b90e646 Break up make tidy even more 2012-04-11 18:17:42 -07:00
Niko Matsakis
6e3c141bee breakup tidy command 2012-04-11 17:38:23 -07:00
Graydon Hoare
685f1867f0 Fix up LIBRUSTSYNTAX_INPUTS and tidy rule. 2012-04-11 11:08:40 -07:00
Haitao Li
0364d60b28 test: Build auxiliary libraries for each test
Closes #2162
2012-04-10 16:04:05 +08:00
Brian Anderson
92470336dd build: Split up tidy command further to make arg list shorter
Distcheck was failing on the linux bots - too many arguments to tidy
2012-04-09 18:05:22 -07:00
Brian Anderson
110e02cbc8 build: Remove a redundant search path 2012-04-06 10:58:03 -07:00
Niko Matsakis
9310015c25 make deletion of test libs use -rf so it works on mac 2012-04-04 19:42:12 -07:00
Graydon Hoare
4baf2ceae1 Clean up artifacts in test subdir. Should close #2066. 2012-04-04 18:08:55 -07:00
Brian Anderson
1ad62def6a build: Cleanup of test summary printing 2012-04-04 13:40:50 -07:00
Grahame Bowland
5cc050b265 Logfile output from tests; summarise in make check
Add an optional --logfile argument to std::test::test_main and to
compiletest.

Use this features and the new 'check-summary.py' script to
summarise all the tests performed by the 'check' target. This is
a short term fix for #2075.
2012-04-04 11:52:27 -07:00
Brian Anderson
cf0c4cd7d2 rt: Begin running tidy on C++ code again. Oops 2012-03-31 23:05:04 -07:00
Brian Anderson
57281f52e5 test: Begin running the language ref examples. Mostly xfailed 2012-03-20 18:59:21 -07:00
Brian Anderson
13ae8e0626 build: rm -f old tutorial snippets 2012-03-19 14:57:51 -07:00
Brian Anderson
14895aa10b build: Delete old tutorial tests before regenerating. Closes #1991 2012-03-19 14:34:11 -07:00
Niko Matsakis
712dd23541 make inline enabled by default 2012-03-06 09:01:40 -08:00
Niko Matsakis
1fd9abaa47 rename aux to auxiliary, since aux is apparently reserved on windows 2012-02-28 06:45:33 -08:00
Niko Matsakis
5c1338a18e add ability to run multi-crate tests, run tests with --inline 2012-02-28 06:31:29 -08:00
Daniel Brooks
3c95fa22da python might be in a path with spaces in it, you never know 2012-02-21 00:53:01 -08:00
Graydon Hoare
224eb977f8 Fix dependencies of stage2 check-fast driver. 2012-02-17 23:02:26 -08:00
Brian Anderson
f0ba69a96f Remove the --no-core command-line option
It is superceeded by the #[no_core] attribute
2012-01-26 20:30:46 -08:00
Brian Anderson
327c8bc733 build: Run tutorial tests 2012-01-20 19:56:06 -08:00
Haitao Li
397d9148a7 build: Run tidy first before all other check targets
`make check` executes `tidy` after compile. It reminds me that I've left
long lines or trailing whitespaces only after compilation finshed. That
is too late since I have to recompile only because fixing the trivial
formatting issues.

Run tidy first to avoid potentially unnecessary re-compilation.
2012-01-19 02:51:57 +08:00
Brian Anderson
6e27b27cf8 libstd: Move std tests into libstd 2012-01-17 19:48:58 -08:00
Brian Anderson
de4053f473 build: Start running libcore tests 2012-01-17 19:41:05 -08:00
Haitao Li
394a80cfd8 build: Stop building stage3 on normal test cycles
Issue #1419
2012-01-16 20:30:39 +08:00
Brian Anderson
b9cd983f36 build: Start running rustdoc tests 2012-01-16 01:07:41 -08:00
Brian Anderson
16462a77b0 build: Add rustdoc to tidy rules 2012-01-15 14:30:12 -08:00
Brian Anderson
09856537ab build: Add shortcut targets for pretty-print tests 2012-01-13 14:48:07 -08:00
Graydon Hoare
468ced3868 Make install and check targets depend on all. Close #1395. 2011-12-30 12:48:07 -08:00
Haitao Li
d5af61d679 build: Tidy cargo when checking formatting 2011-12-16 17:17:24 +08:00
Graydon Hoare
447414f007 Establish 'core' library separate from 'std'. 2011-12-06 12:13:04 -08:00
Brian Anderson
9711596bec Fix definition of check-stageN-all targets 2011-12-03 20:23:54 -08:00
Niko Matsakis
9cc2515dfa make check test stage3 2011-12-02 19:05:50 -08:00
Niko Matsakis
1eb378b23a make "check" match "all": only the host triple 2011-12-02 19:05:49 -08:00
Brian Anderson
fc6f3b1b14 build: Have 'make check' run all target/host combinations 2011-11-29 15:37:33 -08:00
Niko Matsakis
aba6e63543 work on perf 2011-11-29 12:51:12 -08:00
Niko Matsakis
6bced5be31 fix more problems w/ check-fast 2011-11-29 12:51:11 -08:00
Niko Matsakis
4f92204765 make check-fast work 2011-11-29 12:51:11 -08:00
Niko Matsakis
6e55426c8c tweak to get windows test-running correct 2011-11-29 12:51:10 -08:00
Niko Matsakis
9c00c62b08 fix makefiles, add option to ignore changes in makefiles 2011-11-29 12:51:09 -08:00
Niko Matsakis
791dc23c83 make check works 2011-11-29 12:51:08 -08:00
Niko Matsakis
c9061733c6 misc fixes 2011-11-29 12:51:07 -08:00
Niko Matsakis
9c12c7c7f5 basic builds function 2011-11-29 12:51:07 -08:00
Stefan Plantikow
25b44a8973 Added CFG_NOTIDY flag to the build
This should allow a small speedup for test builds; unset by default
2011-11-18 21:19:18 -08:00
Brian Anderson
3bffb8b5de build: Add various shorthand make check rules 2011-11-17 12:04:37 -08:00
Niko Matsakis
938b23e228 fix prereqs 2011-11-16 15:27:09 -08:00
Niko Matsakis
9ccd84a9cd fix prereqs 2011-11-16 15:16:43 -08:00
Niko Matsakis
5502354f33 correct (I think) prereqs 2011-11-16 15:16:42 -08:00
Niko Matsakis
4183023357 correct pre-reqs 2011-11-16 15:16:42 -08:00
Niko Matsakis
c997a353aa make check-stage2-perf target work again, along with rustc, std 2011-11-16 15:16:41 -08:00
Niko Matsakis
36ab948bfa make it so that tests can be run on different target arch 2011-11-16 15:16:40 -08:00
Niko Matsakis
e8e2f3395d Fix build on windows 2011-11-02 14:14:20 -07:00
Niko Matsakis
93781297bf enable building with different target arch 2011-11-02 14:13:22 -07:00
Brian Anderson
799ba7b122 Split 'make tidy' into multiple commands
The echo command line seems to be getting too large
2011-10-31 12:57:50 -07:00
Brian Anderson
160c56e768 Get 'make tidy' to work rustllvm and rt again 2011-10-21 17:35:52 -07:00
Brian Anderson
dd484369dc Fix test dependencies 2011-10-11 08:54:20 -07:00
Brian Anderson
4709038d64 Bring make distcheck up to date 2011-10-06 18:12:15 -07:00
Brian Anderson
e963cfd41a Run tests with LD_LIBRARY_PATH set to the target libs, not the host libs
Setting it to the host libs uses those compiled from the previous stage
2011-10-05 16:21:55 -07:00
Brian Anderson
6335529c36 Fix #1003 harder 2011-10-04 11:24:18 -07:00
Brian Anderson
f5e668c877 Fix a typo in tests.mk. Closes #1003 2011-10-04 11:19:37 -07:00
Brian Anderson
9be0dc1250 Cleanup mk/tests.mk 2011-10-02 18:00:13 -07:00
Brian Anderson
3a6f3cf275 Move compiletest to src/ and cleanup build rules 2011-10-02 17:28:59 -07:00
Brian Anderson
821dd6c02c Change the directory for target libs
This pushes them down from stageN/lib/rustc/$(target) to
stageN/lib/rustc/$(target)/lib in order to make room for a target bin dir
2011-09-30 17:19:24 -07:00
Brian Anderson
f634eb2bfd Make config of static stdlib more consistent with rest of makefile
I haven't tested if it actually works. Static stdlib is probably becoming
bitrotted.
2011-09-30 16:18:19 -07:00
Brian Anderson
38c67a4c8d Abstract the build directories further in the makefiles
This defines variables for host bin and lib directories as well as all target
bin and lib directories then uses them everywhere.
2011-09-30 16:18:19 -07:00
Brian Anderson
ed106dd6ea Fix some make variables in tests.mk 2011-09-30 16:18:19 -07:00
Brian Anderson
80829af872 Remove legacy library search paths 2011-09-29 23:12:31 -07:00
Brian Anderson
6306c81826 Fix a variety of things in the makefiles
Make tests and perf work again. Correctly get the host triple in rustc. Add
some FIXMEs about transitional code that needs to be removed.
2011-09-29 22:58:33 -07:00
Brian Anderson
ab8338fb5a Make rustc's host triple agree with the build system's 2011-09-29 22:58:33 -07:00
Brian Anderson
0148daa058 Reorganize structure of build directory
Each stage is organized more according to Unix standards and to
accommodate multiple target architectures.

stageN/
  bin - rustc lives here
  lib - libraries that rustc needs
  lib/rustc/$(target_triple/ - target libraries
2011-09-29 22:58:33 -07:00
Brian Anderson
acb0e8dcad Don't pipe check-fast results through tee
This was having the effect of scrubbing failure error codes. The only affect
of removing this should be that the .out file isn't generated, so subsequent
make invocations will re-run the tests (which is how our other tests work
anyway).
2011-09-23 12:30:35 -07:00
Graydon Hoare
d5b2d62b20 Add build-system mechanisms for running benchmarks under 'perf'. 2011-09-13 15:06:41 -07:00
Brian Anderson
40ae704ff2 Begin valgrinding run-fail tests
Introduce a temporary no-valgrind directive for the few that aren't clean
2011-08-10 13:36:57 -07:00
Brian Anderson
ea2a968146 Include benchmarks in pretty-print tests 2011-08-02 14:37:03 -07:00
Brian Anderson
091a2c2f71 Run pretty-printer tests as part of make check. Issue #789 2011-08-02 10:39:14 -07:00
Brian Anderson
0fbb6782bb Add dedicated pretty-printer tests with new pp-exact directive
Add a new src/test/pretty directory to hold just source files for testing the
pretty-printer.

Add a new pp-exact directive. When this directive is followed by a file name
it specifies a file containing the output that the pretty-printer should
generate. When pp-exact is not followed by a filename it says that the file
should pretty-print as written.
2011-08-02 10:39:13 -07:00
Brian Anderson
eea888af25 Add missing BENCH_TESTS variable to tests.mk 2011-08-02 10:39:13 -07:00
Brian Anderson
07950c8851 Add a FIXME about simplifying the make check rules 2011-08-02 10:39:13 -07:00
Brian Anderson
e13390a199 Pretty-print test the rfail tests. Issue #789 2011-08-02 10:39:13 -07:00
Brian Anderson
59691b084f Don't run the compiletest runner itself under valgrind
This will reduce the valgrind deluge when a test fails. The tests themselves
are still run under valgrind. Leave a CTEST_VALGRIND environment variable for
running with the old behavior.
2011-08-02 10:39:13 -07:00
Brian Anderson
4e8ab8b3a8 Introduce pretty-print testing mode to compiletest. Issue #789 2011-08-02 10:39:12 -07:00
Brian Anderson
4e6bb137fe Enable build targets to run tests at stage0
This allows quicker turnaround for testing the standard library, since you
don't have to wait for the stage1 compiler every time.
2011-07-29 19:03:17 -07:00
Brian Anderson
9a995b0d25 Fix a typo in tests.mk that was building stdtest with the wrong compiler 2011-07-29 19:03:17 -07:00
Brian Anderson
2573fe7026 The Big Test Suite Overhaul
This replaces the make-based test runner with a set of Rust-based test
runners. I believe that all existing functionality has been
preserved. The primary objective is to dogfood the Rust test
framework.

A few main things happen here:

1) The run-pass/lib-* tests are all moved into src/test/stdtest. This
is a standalone test crate intended for all standard library tests. It
compiles to build/test/stdtest.stageN.

2) rustc now compiles into yet another build artifact, this one a test
runner that runs any tests contained directly in the rustc crate. This
allows much more fine-grained unit testing of the compiler. It
compiles to build/test/rustctest.stageN.

3) There is a new custom test runner crate at src/test/compiletest
that reproduces all the functionality for running the compile-fail,
run-fail, run-pass and bench tests while integrating with Rust's test
framework. It compiles to build/test/compiletest.stageN.

4) The build rules have been completely changed to use the new test
runners, while also being less redundant, following the example of the
recent stageN.mk rewrite.

It adds two new features to the cfail/rfail/rpass/bench tests:

1) Tests can specify multiple 'error-pattern' directives which must be
satisfied in order.

2) Tests can specify a 'compile-flags' directive which will make the
test runner provide additional command line arguments to rustc.

There are some downsides, the primary being that Rust has to be
functioning pretty well just to run _any_ tests, which I imagine will
be the source of some frustration when the entire test suite
breaks. Will also cause some headaches during porting.

Not having individual make rules, each rpass, etc test no longer
remembers between runs whether it completed successfully. As a result,
it's not possible to incrementally fix multiple tests by just running
'make check', fixing a test, and repeating without re-running all the
tests contained in the test runner. Instead you can filter just the
tests you want to run by using the TESTNAME environment variable.

This also dispenses with the ability to run stage0 tests, but they
tended to be broken more often than not anyway.
2011-07-24 15:34:34 -07:00
Rafael Ávila de Espíndola
ea371a3d37 Cleanup the library path now that we copy from stageN/lib to stageN+1/ 2011-07-21 15:12:10 -04:00
Graydon Hoare
1ba53c008a Fix check target names in tests.mk. 2011-07-13 13:13:44 -07:00
Brian Anderson
ae7b757ac9 Add build targets for building rustc as a test runner. Issue #428 2011-07-12 16:54:46 -07:00
Brian Anderson
a38ba01fa4 Move stdtest output files up a directory. Issue #428 2011-07-12 16:54:46 -07:00
Brian Anderson
9a37308101 Add build targets for running stdtest. Issue #428 2011-07-12 16:54:46 -07:00
Rafael Ávila de Espíndola
bbcbaa6601 Try to fix the bots. 2011-07-07 15:28:01 -04:00
Brian Anderson
2f7bc90514 Add a stdtest crate to hold the standard library tests
This will link to std and compile with the --test flag. Eventually the
run-pass/lib* tests will move here.

We could also put the std tests directly into the library and compile both a
library version and a test version, but I think this way will make for faster
builds.

Issue #428
2011-07-06 14:39:40 -07:00
Brian Anderson
6853e04fc4 Temporarily introduce a stage2-check build target
The tinderbox snapshotting scripts seem to be looking for a stage2-check
target when they should be using check-stage2. Since Graydon is out of the
office, I'm making this change to see if the snapshot will go through.
2011-07-05 12:57:26 -07:00
Graydon Hoare
afabde19dc More fixes to fast-check. 2011-06-29 17:54:05 -07:00
Graydon Hoare
4e5d32e1c4 Add fast-check target that combines the stage2 run-pass suite into a single executable. 2011-06-29 15:14:55 -07:00
Graydon Hoare
5059c5f8fd Actually notice xfail-stage2 as different from xfail-stage2. Fix affected tests. 2011-06-28 17:36:51 -07:00