- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Add only modified subcommand for compiletest #107657
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
Conversation
| These commits modify the  If this was intentional then you can ignore this comment. | 
9f44935    to
    f858cae      
    Compare
  
    | I don't have time for reviews right now, sorry. r? bootstrap | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems good, just a nit.
8822ccd    to
    414eb48      
    Compare
  
    | @rustbot ready comments feedback and some code refactor. | 
        
          
                src/tools/compiletest/src/main.rs
              
                Outdated
          
        
      | let file_path = file.path(); | ||
| let file_name = file.file_name(); | ||
| if is_test(&file_name) { | ||
| if is_test(&file_name) && (!config.only_modified || only_modified.contains(&file_path)) { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This means that if the modified_test functions errors (which is signalled by returning an empty Vec), then no tests are run, or am I wrong?
The old way of using Option was good.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, the old way has a bug for the relative_dir, so I combine with the code path.
Old way also won't run any test if it specified with only-modified and git run with error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then now what is the difference between "No tests modified/added" and "An error occured"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just added error message for error occured.
47ea6be    to
    2d01454      
    Compare
  
    2d01454    to
    c52435a      
    Compare
  
    | Thanks! | 
…iaskrgr Rollup of 7 pull requests Successful merges: - rust-lang#107657 (Add only modified subcommand for compiletest) - rust-lang#107864 (rustdoc: clean up `write!` calls with less stuttering) - rust-lang#107873 (Emit JSON output for the building of bootstrap itself) - rust-lang#107895 (remove redundant clones) - rust-lang#107897 (Reexported macros docs) - rust-lang#107909 (rustdoc: remove redundant `if s.is_empty()` from `find_testable_code`) - rust-lang#107912 (rustdoc: Don't resolve link to field on different variant) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
r? @jyn514
From discussion