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

Improve verbose + serialize-output usage #660

Merged
merged 3 commits into from Oct 24, 2018
Merged

Improve verbose + serialize-output usage #660

merged 3 commits into from Oct 24, 2018

Conversation

deivid-rodriguez
Copy link
Contributor

With this combination of flags, all commands will be printed first, and then all outputs. I think it's more useful to print each command followed by its output in sequence.

Before

Using recorded test runtime
4 processes for 98 specs, ~ 24 specs per process
bundle exec rspec --color --tty -O .rspec_parallel spec/bug_report_templates_spec.rb spec/requests/memory_spec.rb spec/requests/stylesheets_spec.rb spec/unit/active_admin_spec.rb spec/unit/authorization/index_overriding_spec.rb spec/unit/auto_link_spec.rb spec/unit/batch_actions/resource_spec.rb spec/unit/csv_builder_spec.rb spec/unit/dependency_spec.rb spec/unit/localizers/resource_localizer_spec.rb spec/unit/menu_collection_spec.rb spec/unit/menu_item_spec.rb spec/unit/namespace/register_page_spec.rb spec/unit/namespace/register_resource_spec.rb spec/unit/namespace_spec.rb spec/unit/resource/includes_spec.rb spec/unit/resource/ordering_spec.rb spec/unit/resource_controller/sidebars_spec.rb spec/unit/view_factory_spec.rb spec/unit/view_helpers/form_helper_spec.rb spec/unit/views/components/menu_spec.rb spec/unit/views/components/paginated_collection_spec.rb spec/unit/views/components/sidebar_spec.rb spec/unit/views/index_as_blog_spec.rb spec/unit/views/pages/show_spec.rb
bundle exec rspec --color --tty -O .rspec_parallel spec/requests/default_namespace_spec.rb spec/unit/abstract_view_factory_spec.rb spec/unit/belongs_to_spec.rb spec/unit/controller_filters_spec.rb spec/unit/filters/active_filter_spec.rb spec/unit/filters/filter_form_builder_spec.rb spec/unit/filters/resource_spec.rb spec/unit/menu_spec.rb spec/unit/namespace/authorization_spec.rb spec/unit/pundit_adapter_spec.rb spec/unit/resource/action_items_spec.rb spec/unit/resource/attributes_spec.rb spec/unit/resource_controller/decorators_spec.rb spec/unit/resource_controller_spec.rb spec/unit/resource_registration_spec.rb spec/unit/settings_node_spec.rb spec/unit/view_helpers/display_helper_spec.rb spec/unit/view_helpers/method_or_proc_helper_spec.rb spec/unit/views/components/index_list_spec.rb spec/unit/views/components/menu_item_spec.rb spec/unit/views/components/panel_spec.rb spec/unit/views/components/status_tag_spec.rb spec/unit/views/components/table_for_spec.rb spec/unit/views/components/unsupported_browser_spec.rb spec/unit/views/pages/layout_spec.rb
bundle exec rspec --color --tty -O .rspec_parallel spec/unit/action_builder_spec.rb spec/unit/authorization/authorization_adapter_spec.rb spec/unit/authorization/controller_authorization_spec.rb spec/unit/batch_actions/settings_spec.rb spec/unit/cancan_adapter_spec.rb spec/unit/devise_spec.rb spec/unit/filters/active_spec.rb spec/unit/form_builder_spec.rb spec/unit/generators/install_spec.rb spec/unit/helpers/scope_chain_spec.rb spec/unit/order_clause_spec.rb spec/unit/page_controller_spec.rb spec/unit/resource/naming_spec.rb spec/unit/resource/page_presenters_spec.rb spec/unit/resource/scopes_spec.rb spec/unit/resource_collection_spec.rb spec/unit/resource_spec.rb spec/unit/scope_spec.rb spec/unit/view_helpers/breadcrumbs_spec.rb spec/unit/view_helpers/download_format_links_helper_spec.rb spec/unit/views/components/columns_spec.rb spec/unit/views/components/index_table_for_spec.rb spec/unit/views/components/tabs_spec.rb spec/unit/views/pages/index_spec.rb
bundle exec rspec --color --tty -O .rspec_parallel spec/unit/application_spec.rb spec/unit/asset_registration_spec.rb spec/unit/comments_spec.rb spec/unit/component_spec.rb spec/unit/dsl_spec.rb spec/unit/dynamic_settings_spec.rb spec/unit/helpers/collection_spec.rb spec/unit/page_spec.rb spec/unit/pretty_format_spec.rb spec/unit/resource/menu_spec.rb spec/unit/resource/pagination_spec.rb spec/unit/resource/routes_spec.rb spec/unit/resource/sidebars_spec.rb spec/unit/resource_controller/data_access_spec.rb spec/unit/routing_spec.rb spec/unit/view_helpers/fields_for_spec.rb spec/unit/view_helpers/flash_helper_spec.rb spec/unit/views/components/attributes_table_spec.rb spec/unit/views/components/batch_action_selector_spec.rb spec/unit/views/components/blank_slate_spec.rb spec/unit/views/components/sidebar_section_spec.rb spec/unit/views/components/site_title_spec.rb spec/unit/views/pages/base_spec.rb spec/unit/views/pages/form_spec.rb

Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 39463
..............................................................................................................................................................................................................

Finished in 18.31 seconds (files took 3.71 seconds to load)
206 examples, 0 failures

Randomized with seed 39463

Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 33765
..............................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 25.72 seconds (files took 3.75 seconds to load)
414 examples, 0 failures

Randomized with seed 33765

Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 20343
..................................................................................................................................................................................................................................................................................................................................................................................................................

Finished in 27.55 seconds (files took 3.72 seconds to load)
402 examples, 0 failures

Randomized with seed 20343

Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 11912
....................................................................................................................................................................................................................................................................................................

Finished in 42.39 seconds (files took 3.73 seconds to load)
292 examples, 0 failures

Randomized with seed 11912


1314 examples, 0 failures

Took 48 seconds

After

Using recorded test runtime
4 processes for 98 specs, ~ 24 specs per process

bundle exec rspec --color --tty -O .rspec_parallel spec/bug_report_templates_spec.rb spec/unit/abstract_view_factory_spec.rb spec/unit/action_builder_spec.rb spec/unit/cancan_adapter_spec.rb spec/unit/controller_filters_spec.rb spec/unit/devise_spec.rb spec/unit/form_builder_spec.rb spec/unit/helpers/collection_spec.rb spec/unit/localizers/resource_localizer_spec.rb spec/unit/menu_collection_spec.rb spec/unit/menu_spec.rb spec/unit/namespace/authorization_spec.rb spec/unit/page_controller_spec.rb spec/unit/resource/action_items_spec.rb spec/unit/resource/pagination_spec.rb spec/unit/resource/scopes_spec.rb spec/unit/resource/sidebars_spec.rb spec/unit/resource_controller/decorators_spec.rb spec/unit/resource_registration_spec.rb spec/unit/scope_spec.rb spec/unit/view_helpers/form_helper_spec.rb spec/unit/views/components/attributes_table_spec.rb spec/unit/views/components/batch_action_selector_spec.rb spec/unit/views/components/menu_item_spec.rb spec/unit/views/components/tabs_spec.rb
Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 29165
........................................................................................................................................................................................................................................................................................................................................................

Finished in 16.34 seconds (files took 3.69 seconds to load)
344 examples, 0 failures

Randomized with seed 29165

bundle exec rspec --color --tty -O .rspec_parallel spec/requests/default_namespace_spec.rb spec/unit/asset_registration_spec.rb spec/unit/authorization/controller_authorization_spec.rb spec/unit/auto_link_spec.rb spec/unit/batch_actions/settings_spec.rb spec/unit/csv_builder_spec.rb spec/unit/filters/active_filter_spec.rb spec/unit/filters/filter_form_builder_spec.rb spec/unit/filters/resource_spec.rb spec/unit/helpers/scope_chain_spec.rb spec/unit/menu_item_spec.rb spec/unit/namespace/register_page_spec.rb spec/unit/pretty_format_spec.rb spec/unit/resource/includes_spec.rb spec/unit/resource/page_presenters_spec.rb spec/unit/resource_collection_spec.rb spec/unit/resource_controller/sidebars_spec.rb spec/unit/view_factory_spec.rb spec/unit/view_helpers/display_helper_spec.rb spec/unit/view_helpers/flash_helper_spec.rb spec/unit/views/components/sidebar_section_spec.rb spec/unit/views/components/sidebar_spec.rb spec/unit/views/components/unsupported_browser_spec.rb spec/unit/views/pages/form_spec.rb
Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 56101
................................................................................................................................................................................................................................................................................................................................................

Finished in 21.84 seconds (files took 3.67 seconds to load)
336 examples, 0 failures

Randomized with seed 56101

bundle exec rspec --color --tty -O .rspec_parallel spec/requests/memory_spec.rb spec/unit/authorization/authorization_adapter_spec.rb spec/unit/authorization/index_overriding_spec.rb spec/unit/batch_actions/resource_spec.rb spec/unit/belongs_to_spec.rb spec/unit/comments_spec.rb spec/unit/filters/active_spec.rb spec/unit/generators/install_spec.rb spec/unit/namespace/register_resource_spec.rb spec/unit/page_spec.rb spec/unit/pundit_adapter_spec.rb spec/unit/resource/ordering_spec.rb spec/unit/resource/routes_spec.rb spec/unit/resource_controller/data_access_spec.rb spec/unit/resource_controller_spec.rb spec/unit/settings_node_spec.rb spec/unit/view_helpers/breadcrumbs_spec.rb spec/unit/view_helpers/fields_for_spec.rb spec/unit/view_helpers/method_or_proc_helper_spec.rb spec/unit/views/components/columns_spec.rb spec/unit/views/components/index_list_spec.rb spec/unit/views/components/paginated_collection_spec.rb spec/unit/views/index_as_blog_spec.rb spec/unit/views/pages/index_spec.rb spec/unit/views/pages/show_spec.rb
Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 61815
....................................................................................................................................................................................................................................................................................................

Finished in 30.58 seconds (files took 3.73 seconds to load)
292 examples, 0 failures

Randomized with seed 61815

bundle exec rspec --color --tty -O .rspec_parallel spec/requests/stylesheets_spec.rb spec/unit/active_admin_spec.rb spec/unit/application_spec.rb spec/unit/component_spec.rb spec/unit/dependency_spec.rb spec/unit/dsl_spec.rb spec/unit/dynamic_settings_spec.rb spec/unit/namespace_spec.rb spec/unit/order_clause_spec.rb spec/unit/resource/attributes_spec.rb spec/unit/resource/menu_spec.rb spec/unit/resource/naming_spec.rb spec/unit/resource_spec.rb spec/unit/routing_spec.rb spec/unit/view_helpers/download_format_links_helper_spec.rb spec/unit/views/components/blank_slate_spec.rb spec/unit/views/components/index_table_for_spec.rb spec/unit/views/components/menu_spec.rb spec/unit/views/components/panel_spec.rb spec/unit/views/components/site_title_spec.rb spec/unit/views/components/status_tag_spec.rb spec/unit/views/components/table_for_spec.rb spec/unit/views/pages/base_spec.rb spec/unit/views/pages/layout_spec.rb
Run options:
  include {:focus=>true}
  exclude {:skip=>true}

All examples were filtered out; ignoring {:focus=>true}

Randomized with seed 1709
......................................................................................................................................................................................................................................................................................................................................................

Finished in 34.73 seconds (files took 3.68 seconds to load)
342 examples, 0 failures

Randomized with seed 1709


1314 examples, 0 failures

Took 41 seconds

@grosser
Copy link
Owner

grosser commented Oct 22, 2018

yeah I kinda like that ... before it was not really obvious what output belonged together ...

@grosser
Copy link
Owner

grosser commented Oct 22, 2018

can you git commit --amend --no-edit and git push -f so it triggers a travis run ?

@deivid-rodriguez
Copy link
Contributor Author

Unfortunately github is having a bad day, so no CI for now. Once it's back up, I'll retrigger CI 👍.

With this combination of flags, all commands will be printed first, and
then all outputs. I think it's much more useful to print each command
followed by its output in sequence.
I think this is because `sort_by` in ruby is not stable, so ties are not
resolved consistenly across versions.
@deivid-rodriguez
Copy link
Contributor Author

deivid-rodriguez commented Oct 24, 2018

@grosser There were only two failures on Windows, and I think it's because sort_by is not stable in ruby so some orderings are resolved differently from implementation to implementation, so I just adapted the assertions.

Let me know if I should extract those changes to a separate PR, I just wanted to see if I could get the build fully green :)

@grosser grosser merged commit aab5a60 into grosser:master Oct 24, 2018
@deivid-rodriguez deivid-rodriguez deleted the fix_verbose_plus_serialize_output branch October 24, 2018 16:17
@deivid-rodriguez
Copy link
Contributor Author

Thanks so much @grosser for merging and releasing and for your work in general!

@grosser
Copy link
Owner

grosser commented Oct 24, 2018 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants