New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootstrap: Add testsuite for compiletest tool #56792

Merged
merged 1 commit into from Dec 15, 2018

Conversation

Projects
None yet
4 participants
@phansch
Copy link
Contributor

phansch commented Dec 13, 2018

This adds a test suite for compiletest so that the tester is tested, too.

The (currently) single unit test of the compiletest tool was never executed
on CI. At least I couldn't find any references of it in the logs.

The compiletest tests can then also be executed with:

./x.py test src/tools/compiletest --stage 0

cc #47606

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 13, 2018

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@phansch

This comment has been minimized.

Copy link
Contributor

phansch commented Dec 13, 2018

NB: I'm not 100% sure why 9884cf8 is required. Without it, running the compiletest tests failed with:

error[E0308]: mismatched types                                                       
   --> src/tools/compiletest/src/main.rs:519:22                 
    |                                                                                                            
519 |         run_ignored: config.run_ignored,                                           
    |                      ^^^^^^^^^^^^^^^^^^ expected enum `test::RunIgnored`, found bool
    |                                                                                                             
    = note: expected type `test::RunIgnored`                                                      
               found type `bool`

This is probably related to #55053

@rust-highfive

This comment has been minimized.

Copy link
Collaborator

rust-highfive commented Dec 13, 2018

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
travis_time:end:0983ed49:start=1544735713985737174,finish=1544735790734406241,duration=76748669067
$ git checkout -qf FETCH_HEAD
travis_fold:end:git.checkout

Encrypted environment variables have been removed for security reasons.
See https://docs.travis-ci.com/user/pull-requests/#Pull-Requests-and-Security-Restrictions
$ export SCCACHE_BUCKET=rust-lang-ci-sccache2
$ export SCCACHE_REGION=us-west-1
Setting environment variables from .travis.yml
$ export IMAGE=x86_64-gnu-llvm-5.0

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@phansch

This comment has been minimized.

Copy link
Contributor

phansch commented Dec 14, 2018

It looks like ./x.py build src/tools/compiletest now fails because it doesn't know about RunIgnored. It's probably a mistake somewhere in the Compiletest step implementation? I will get back to it later today.

let host = self.host;
let compiler = builder.compiler(stage, host);

let mut cargo = tool::prepare_tool_cargo(builder,

This comment has been minimized.

@alexcrichton

alexcrichton Dec 14, 2018

Member

The indentation here looks like it may be off?

Bootstrap: Add testsuite for compiletest tool
The (currently) single unit test of the compiletest tool was never
executed on CI. At least I couldn't find any references of it in the
logs. This adds a test suite for compiletest so that our tester is
tested, too.

The compiletest tests can then also be executed with:

    ./x.py test src/tools/compiletest

@phansch phansch force-pushed the phansch:add_compiletest_testsuite branch from 9884cf8 to c435357 Dec 14, 2018

@phansch

This comment has been minimized.

Copy link
Contributor

phansch commented Dec 14, 2018

It looks like #56536 fixed the compiletest build issue 👍

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Dec 14, 2018

@bors: r+

@bors

This comment has been minimized.

Copy link
Contributor

bors commented Dec 14, 2018

📌 Commit c435357 has been approved by alexcrichton

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Dec 14, 2018

@bors: rollup

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 15, 2018

Rollup merge of rust-lang#56792 - phansch:add_compiletest_testsuite, …
…r=alexcrichton

Bootstrap: Add testsuite for compiletest tool

This adds a test suite for compiletest so that the tester is tested, too.

The (currently) single unit test of the compiletest tool was never executed
on CI. At least I couldn't find any references of it in the logs.

The compiletest tests can then also be executed with:

    ./x.py test src/tools/compiletest --stage 0

cc rust-lang#47606

bors added a commit that referenced this pull request Dec 15, 2018

Auto merge of #56840 - pietroalbini:rollup, r=pietroalbini
Rollup of 14 pull requests

Successful merges:

 - #56718 (Use libbacktrace pretty-printing)
 - #56725 (fix rust-lang/rust issue #50583)
 - #56731 (Add missing urls in ffi module docs)
 - #56738 (Fix private_no_mangle_fns message grammar)
 - #56746 (Add test of current behavior (infer free region within closure body))
 - #56747 (target: remove Box returned by get_targets)
 - #56751 (Allow ptr::hash to accept fat pointers)
 - #56755 (Account for `impl Trait` when suggesting lifetime)
 - #56758 (Add short emoji status to toolstate updates)
 - #56760 (Deduplicate unsatisfied trait bounds)
 - #56769 (Add x86_64-unknown-uefi target)
 - #56792 (Bootstrap: Add testsuite for compiletest tool)
 - #56808 (Fixes broken links)
 - #56809 (Fix docs path to PermissionsExt)

Failed merges:

r? @ghost

@bors bors merged commit c435357 into rust-lang:master Dec 15, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 15, 2018

Rollup merge of rust-lang#56841 - phansch:add_various_compiletest_uni…
…ttests, r=oli-obk

Add some unit tests to compiletest

Based on rust-lang#56792, otherwise the tests won't be executed on CI.

Just a small start, I would like to add more testing to compiletest in the future but that will require some refactoring first.

cc rust-lang#47606

@phansch phansch deleted the phansch:add_compiletest_testsuite branch Dec 15, 2018

phansch added a commit to phansch/rust that referenced this pull request Dec 20, 2018

Run compiletest tests on CI
I was assuming that rust-lang#56792 would
have resulted in compiletest tests being executed in CI. However, I
couldn't find any mentions of the unit test names in any CI logs.

This adds the compiletest test execution to the checktools.sh script.

Centril added a commit to Centril/rust that referenced this pull request Dec 24, 2018

Rollup merge of rust-lang#57010 - phansch:run_compiletest_tests_on_ci…
…, r=kennytm

Actually run compiletest tests on CI

I was assuming that rust-lang#56792 would
have resulted in compiletest tests being executed on CI. However, I
couldn't find any mentions of the unit test names in any CI logs.

This adds the compiletest test execution to the checktools.sh script.

Centril added a commit to Centril/rust that referenced this pull request Dec 24, 2018

Rollup merge of rust-lang#57010 - phansch:run_compiletest_tests_on_ci…
…, r=kennytm

Actually run compiletest tests on CI

I was assuming that rust-lang#56792 would
have resulted in compiletest tests being executed on CI. However, I
couldn't find any mentions of the unit test names in any CI logs.

This adds the compiletest test execution to the checktools.sh script.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment