-
Notifications
You must be signed in to change notification settings - Fork 26
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
Feature/execute failing command #247
base: master
Are you sure you want to change the base?
Conversation
Add one more input inverse_check to run ExecuteFailingCommand correctly. For it, command with return code 1 should pass. Command with return code 0 shouldn't
Add argument to call function in invoke.py in the inverse mode (command returning 1 should pass)
Feature/execute failing command from fork
Merge new master into branch and do the related change
Hello @Yanqiao4396, thanks for creating this PR and sharing details about the feature. Quick questions:
Please note that it would be fine if you perform some type of manual integration testing! To be clear, I'm not requesting that you implement and run any type of automated integration tests. Although, that type of test suite is sorely needed! |
@gkapfham , you could check the screenshot I attached above if it makes sense to you, it's |
@gkapfham, I locally installed this branch's version of Gatorgrader and locally installed a version of gatorgrade that didn't have the specified version of gatorgrader listed. I used the command shell lab from operating systems in order to check this, as it was easy to simulate passing and failing builds. Due to this I found a slight error with this code, where since I was using sys.exit() and try/catch blocks to handle errors but still throw a 1 exit code at the end weren't passing with a failure. Through further testing, this turns out to be because it wasn't passing the requirement for both a failing build AND an error message, so I changed that to be an or statement, as realistically if either of those happens that means the build failed. Attached are the results of running the new tests I created as well as the code for the tests. If you need anything else to show that our code is now working I would be happy to provide it! |
A new check to ensure the wrong command should return exit code 1 as expected. As long as it crashes and has return code 1 as expected, the related check should pass
What is the current behavior?
This feature is achieved by a new check type:
ExecuteFailingCommand
with the necessary flag:command
.Unite test is passed and the code is proved to be vital in gatorgrade, which is shown in the screenshot below
What is the new behavior if this PR is merged?
Other information
This PR has:
This PR is a feature
Developers
@Yanqiao4396 @jnormile @burgess01