-
Notifications
You must be signed in to change notification settings - Fork 21
Conversation
.papr.yml
Outdated
@@ -13,8 +13,7 @@ packages: | |||
- ansible | |||
|
|||
tests: | |||
- ansible-playbook -vi testnode, common/ans_ah_head-1_deploy.yml | |||
- ansible-playbook -vi testnode, tests/improved-sanity-test/main.yml | |||
- .test_director |
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.
I think this needs to be ./.test_director
See https://github.com/projectatomic/atomic/blob/master/.redhat-ci.yml#L19 as an example
.test_director
Outdated
#!/bin/bash | ||
set -xeuo pipefail | ||
|
||
NEW_TEST=$((git diff --name-only master | grep 'tests/.*/main.yml') || true) |
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 can end up being more than a single test though, right? Should we run this in a loop instead? (Though that would require all tests to make sure to cleanly restore the machine to a clean state after they're done). Or maybe it's safer to only ever target a single test and error out if multiple tests are modified to force multiple PRs to be created. Not sure.
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.
There's been some recent work (#142 for example) to make sure our tests leave the system in the original state. It should be safe to run multiple tests in succession.
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.
I think we can also end up in a state where a test is deleted. Since we are not checking the status we could be trying to run a test on something that is no longer there. Once I work out some of the current issues and have something working I'll add some more logic into it to handle different scenarios.
Looks like we need to add |
Looks like you better handle the multiple changed tests after all. Although, if I run |
It looks like the diff also includes the last commit that was merged. There must be a difference in the way we're pulling in the PR and PAPR. |
I think you may need to use the Also, you need a different way to test the |
It depends on your needs, but yeah you probably want |
Thanks for the ongoing comments as I'm working my way through this 👍 |
This looks like it is doing the right thing now, but I this PR is based on top of 2edd28a so If you rebase the PR onto master ( |
Currently PAPR will only run the improved sanity test when there is a new pull request. This commit will add a very simple script to run any new test.
The last test actually looked like it picked up improved-sanity-test instead of rpm-ostree--which confused me. I added some more info to debug and also simplified the fake-test that runs. |
This looks like it is in a good place. We can add more logic to test changed roles in another PR. |
👍 Thanks for all the comments! |
I think I didn't account for the scenario where the test that is changed is the improved-sanity-test which would run the improved-sanity-test without deploying HEAD-1 first. |
More ammo to work on #150 sooner rather than later |
Currently PAPR will only run the improved sanity test when there is
a new pull request. This commit will add a very simple script to
run any new test.