Skip to content

Conversation

@chrisvanheuveln
Copy link
Contributor

I modified hardware_supports_feature? to just return a status instead of doing only a skip or flunk. This allows the callers to cache the status and act on it themselves. In the vxlan tests the setup takes ~12s (per testcase) to process dependencies before it fails so this change allows us to short-circuit dependency loading and shave a few minutes off of each test overall.

Tested on n6k, n7k, n9k, n3k

@@pre_clean_needed = false # rubocop:disable Style/ClassVars
rescue RuntimeError => e
# Skip locally to shortcut the dependencies above for the next test
@@feature_unsupported = hardware_supports_feature?(e.message, status_only: true) # rubocop:disable Style/ClassVars
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, so if I am reading this correctly, the first test will still go through the dependency list but then skips will go quickly after that.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

correct

@chrisvanheuveln chrisvanheuveln merged commit 5b7f483 into develop Feb 7, 2019
@chrisvanheuveln chrisvanheuveln deleted the cvh_triage_3 branch February 8, 2019 12:40
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.

3 participants