What it the right TESTNAME when running make check?


#1

I want to do it https://github.com/rust-lang/rust/issues/21696

I search and follow links on the https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#useful-targets. The Makefile generated from configure also suggest

// Added a run-pass test? Use this to test running your test

make check-stage1-rpass TESTNAME=my-shiny-new-test

I finally find TESTNAME mean is in https://github.com/rust-lang-nursery/rust-forge/blob/master/test-suite.md

but the result very weired, for example one:

~/github/wuranbo/rust (master :heavy_check_mark:) ᐅ make check TESTNAME=test/run-pass/yield.rs cfg: version 1.12.0-dev (92400cf8d 2016-07-19) cfg: build triple x86_64-apple-darwin cfg: host triples x86_64-apple-darwin cfg: target triples x86_64-apple-darwin cfg: host for x86_64-apple-darwin is x86_64 cfg: os for x86_64-apple-darwin is apple-darwin cfg: have good valgrind for x86_64-apple-darwin cfg: using CC=clang (CFG_CC) cfg: using CXX=clang++ (CFG_CXX) cfg: disabling valgrind run-pass tests cfg: including test rules cfg: lexer tooling not available, skipping lexer test… run rpass [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run rfail [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run cfail [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run pfail [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run rpass-valgrind [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run rmake [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

run rustdocck [x86_64-apple-darwin]: x86_64-apple-darwin/stage2/bin/compiletest

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/stdtest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/termtest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/termtest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/getoptstest-x86_64-apple-darwin

run: x86_64-apple-darwin/stage2/test/getoptstest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/collectionstest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/collectionstest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/testtest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/testtest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/randtest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/randtest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/alloctest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/alloctest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/rustc_bitflagstest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/rustc_bitflagstest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/unwindtest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/unwindtest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/collectionstesttest-x86_64-apple-darwin run: x86_64-apple-darwin/stage2/test/collectionstesttest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/coretesttest-x86_64-apple-darwin

run: x86_64-apple-darwin/stage2/test/coretesttest-x86_64-apple-darwin

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

rustc: x86_64-apple-darwin/stage2/test/syntaxtest-x86_64-apple-darwin

^Cmake: *** [x86_64-apple-darwin/stage2/test/syntaxtest-x86_64-apple-darwin] Interrupt: 2

the tests are always running 0 tests, and not stop, I finally Ctrl-C to stop it.

most are just nothing to be done:

make check-stage1-rfail TESTNAME=test/run-fail/assert-macro-static.rs fg: version 1.12.0-dev (92400cf8d 2016-07-19) cfg: build triple x86_64-apple-darwin cfg: host triples x86_64-apple-darwin cfg: target triples x86_64-apple-darwin cfg: host for x86_64-apple-darwin is x86_64 cfg: os for x86_64-apple-darwin is apple-darwin cfg: have good valgrind for x86_64-apple-darwin cfg: using CC=clang (CFG_CC) cfg: using CXX=clang++ (CFG_CXX) cfg: disabling valgrind run-pass tests cfg: including test rules cfg: lexer tooling not available, skipping lexer test… make: Nothing to be done for `check-stage1-rfail’.

How should I sepecific a right TESTNAME?


#2

Try TESTNAME=yield instead. It’s test name, not test path.


#3

Thanks , I run it:

make check-stage1-rpass TESTNAME=yield
cfg: version 1.12.0-dev (936bfea94 2016-07-20)
cfg: build triple x86_64-apple-darwin
cfg: host triples x86_64-apple-darwin
cfg: target triples x86_64-apple-darwin
cfg: host for x86_64-apple-darwin is x86_64
cfg: os for x86_64-apple-darwin is apple-darwin
cfg: have good valgrind for x86_64-apple-darwin
cfg: using CC=clang (CFG_CC)
cfg: using CXX=clang++ (CFG_CXX)
cfg: disabling valgrind run-pass tests
cfg: including test rules
cfg: lexer tooling not available, skipping lexer test...
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libcore
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/liblibc
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librand
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/liballoc
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libcollections
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_abort
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libunwind
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libstd
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libgetopts
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libterm
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libtest
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/liblog
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libserialize
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/bin/compiletest
cp: x86_64-apple-darwin/stage1/lib/libstd
cp: x86_64-apple-darwin/stage1/lib/libgetopts
cp: x86_64-apple-darwin/stage1/lib/libterm
cp: x86_64-apple-darwin/stage1/lib/libtest
cp: x86_64-apple-darwin/stage1/lib/liblog
cp: x86_64-apple-darwin/stage1/lib/libserialize
cp: x86_64-apple-darwin/stage1/bin/compiletest
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libarena
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libflate
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libgraphviz
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_bitflags
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libsyntax_pos
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_errors
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libsyntax
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libfmt_macros
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librbml
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_llvm
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_back
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_data_structures
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_const_math
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_const_eval
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_mir
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_borrowck
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_platform_intrinsics
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_typeck
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_resolve
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_incremental
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_trans
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_privacy
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_lint
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_metadata
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_plugin
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/libsyntax_ext
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_passes
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_save_analysis
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/lib/librustc_driver
rustc: x86_64-apple-darwin/stage0/lib/rustlib/x86_64-apple-darwin/bin/rustc
cp: x86_64-apple-darwin/stage1/lib/libarena
cp: x86_64-apple-darwin/stage1/lib/libflate
cp: x86_64-apple-darwin/stage1/lib/libgraphviz
cp: x86_64-apple-darwin/stage1/lib/libsyntax_pos
cp: x86_64-apple-darwin/stage1/lib/librustc_errors
cp: x86_64-apple-darwin/stage1/lib/libsyntax
cp: x86_64-apple-darwin/stage1/lib/libfmt_macros
cp: x86_64-apple-darwin/stage1/lib/librbml
cp: x86_64-apple-darwin/stage1/lib/librustc_llvm
cp: x86_64-apple-darwin/stage1/lib/librustc_back
cp: x86_64-apple-darwin/stage1/lib/librustc_data_structures
cp: x86_64-apple-darwin/stage1/lib/librustc_const_math
cp: x86_64-apple-darwin/stage1/lib/librustc
cp: x86_64-apple-darwin/stage1/lib/librustc_const_eval
cp: x86_64-apple-darwin/stage1/lib/librustc_mir
cp: x86_64-apple-darwin/stage1/lib/librustc_borrowck
cp: x86_64-apple-darwin/stage1/lib/librustc_platform_intrinsics
cp: x86_64-apple-darwin/stage1/lib/librustc_typeck
cp: x86_64-apple-darwin/stage1/lib/librustc_resolve
cp: x86_64-apple-darwin/stage1/lib/librustc_incremental
cp: x86_64-apple-darwin/stage1/lib/librustc_trans
cp: x86_64-apple-darwin/stage1/lib/librustc_privacy
cp: x86_64-apple-darwin/stage1/lib/librustc_lint
cp: x86_64-apple-darwin/stage1/lib/librustc_metadata
cp: x86_64-apple-darwin/stage1/lib/librustc_plugin
cp: x86_64-apple-darwin/stage1/lib/libsyntax_ext
cp: x86_64-apple-darwin/stage1/lib/librustc_passes
cp: x86_64-apple-darwin/stage1/lib/librustc_save_analysis
cp: x86_64-apple-darwin/stage1/lib/librustc_driver
cp: x86_64-apple-darwin/stage1/bin/rustc
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libcore
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/liblibc
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/librand
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/liballoc_system
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/liballoc
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/librustc_unicode
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libcollections
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libpanic_abort
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libunwind
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libpanic_unwind
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/liballoc_jemalloc
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libstd
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libterm
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libgetopts
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/libtest
rustc: x86_64-apple-darwin/stage1/lib/rustlib/x86_64-apple-darwin/lib/librustc_bitflags
run rpass [x86_64-apple-darwin]: x86_64-apple-darwin/stage1/bin/compiletest

running 3 tests
test [run-pass] run-pass/yield2.rs ... ok
test [run-pass] run-pass/yield.rs ... ok
test [run-pass] run-pass/yield1.rs ... ok

test result: ok. 3 passed; 0 failed; 0 ignored; 0 measured

It works. But looks like it run all 3 test who’s name contains yield. And I check the yield.rs, yield1.rs, yield3.rs, I did not see the name defined in the three tests. So the rule is the filename without extension is the TESTNAME? And the TESTNAME use pattern to match? Thanks again @sanxiyn.