Skip to content

Commit ccbf082

Browse files
committed
---
yaml --- r: 7401 b: refs/heads/master c: de4053f h: refs/heads/master i: 7399: ad542bd v: v3
1 parent 3696930 commit ccbf082

File tree

3 files changed

+32
-1
lines changed

3 files changed

+32
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 8acae671c70825f65bddaa5076e8d595b6721f46
2+
refs/heads/master: de4053f47384a71d6339b71a20102143df1e3144

trunk/mk/tests.mk

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ define TEST_STAGEN
118118

119119
check-stage$(1)-T-$(2)-H-$(3): tidy \
120120
check-stage$(1)-T-$(2)-H-$(3)-rustc \
121+
check-stage$(1)-T-$(2)-H-$(3)-core \
121122
check-stage$(1)-T-$(2)-H-$(3)-std \
122123
check-stage$(1)-T-$(2)-H-$(3)-rpass \
123124
check-stage$(1)-T-$(2)-H-$(3)-rfail \
@@ -126,6 +127,9 @@ check-stage$(1)-T-$(2)-H-$(3): tidy \
126127
check-stage$(1)-T-$(2)-H-$(3)-pretty \
127128
check-stage$(1)-T-$(2)-H-$(3)-rustdoc
128129

130+
check-stage$(1)-T-$(2)-H-$(3)-core: \
131+
check-stage$(1)-T-$(2)-H-$(3)-core-dummy
132+
129133
check-stage$(1)-T-$(2)-H-$(3)-std: \
130134
check-stage$(1)-T-$(2)-H-$(3)-std-dummy
131135

@@ -168,6 +172,19 @@ check-stage$(1)-T-$(2)-H-$(3)-pretty-pretty: \
168172
check-stage$(1)-T-$(2)-H-$(3)-rustdoc: \
169173
check-stage$(1)-T-$(2)-H-$(3)-rustdoc-dummy
170174

175+
# Rules for the core library test runner
176+
177+
$(3)/test/coretest.stage$(1)-$(2)$$(X): \
178+
$$(CORELIB_CRATE) $$(CORELIB_INPUTS) \
179+
$$(SREQ$(1)_T_$(2)_H_$(3))
180+
@$$(call E, compile_and_link: $$@)
181+
$$(STAGE$(1)_T_$(2)_H_$(3)) -o $$@ $$< --test --no-core
182+
183+
check-stage$(1)-T-$(2)-H-$(3)-core-dummy: \
184+
$(3)/test/coretest.stage$(1)-$(2)$$(X)
185+
@$$(call E, run: $$<)
186+
$$(Q)$$(call CFG_RUN_TEST,$$<,$(2),$(3)) $$(TESTARGS)
187+
171188
# Rules for the standard library test runner
172189

173190
$(3)/test/stdtest.stage$(1)-$(2)$$(X): \
@@ -422,6 +439,9 @@ check-stage$(1)-H-$(2)-perf: \
422439
check-stage$(1)-H-$(2)-rustc: \
423440
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
424441
check-stage$(1)-T-$$(target)-H-$(2)-rustc)
442+
check-stage$(1)-H-$(2)-core: \
443+
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
444+
check-stage$(1)-T-$$(target)-H-$(2)-core)
425445
check-stage$(1)-H-$(2)-std: \
426446
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
427447
check-stage$(1)-T-$$(target)-H-$(2)-std)
@@ -482,6 +502,9 @@ check-stage$(1)-H-all-perf: \
482502
check-stage$(1)-H-all-rustc: \
483503
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
484504
check-stage$(1)-H-$$(target)-rustc)
505+
check-stage$(1)-H-all-core: \
506+
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
507+
check-stage$(1)-H-$$(target)-core)
485508
check-stage$(1)-H-all-std: \
486509
$$(foreach target,$$(CFG_TARGET_TRIPLES), \
487510
check-stage$(1)-H-$$(target)-std)
@@ -526,6 +549,7 @@ define DEF_CHECK_FOR_STAGE
526549
check-stage$(1): check-stage$(1)-H-$$(CFG_HOST_TRIPLE)
527550
check-stage$(1)-perf: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-perf
528551
check-stage$(1)-rustc: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rustc
552+
check-stage$(1)-core: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-core
529553
check-stage$(1)-std: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-std
530554
check-stage$(1)-rpass: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rpass
531555
check-stage$(1)-rfail: check-stage$(1)-H-$$(CFG_HOST_TRIPLE)-rfail

trunk/src/libcore/core.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,11 @@ mod core {
2525
const warn : u32 = 1_u32;
2626
const info : u32 = 2_u32;
2727
const debug : u32 = 3_u32;
28+
}
29+
30+
// Similar to above. Some magic to make core testable.
31+
#[cfg(test)]
32+
mod std {
33+
use std;
34+
import std::test;
2835
}

0 commit comments

Comments
 (0)