Skip to content
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

phansch
Copy link
Member

@phansch 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
Copy link
Collaborator

r? @alexcrichton

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Dec 13, 2018
@phansch
Copy link
Member Author

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
Copy link
Collaborator

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
Copy link
Member Author

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,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The indentation here looks like it may be off?

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
Copy link
Member Author

phansch commented Dec 14, 2018

It looks like #56536 fixed the compiletest build issue 👍

@alexcrichton
Copy link
Member

@bors: r+

@bors
Copy link
Contributor

bors commented Dec 14, 2018

📌 Commit c435357 has been approved by alexcrichton

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Dec 14, 2018
@alexcrichton
Copy link
Member

@bors: rollup

pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 15, 2018
…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
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
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Dec 15, 2018
…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 add_compiletest_testsuite branch December 15, 2018 14:09
phansch added a commit to phansch/rust that referenced this pull request Dec 20, 2018
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
…, 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
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants