-
Notifications
You must be signed in to change notification settings - Fork 667
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
[ci] Test and build package using Azure Pipelines #1406
Conversation
can you check why are we running this command in the test environment?
this is in docker environment, sysctl -w won't work here. |
@sumukhatv: It appears you added these changes a few days ago here. Can you explain why? |
I added this to test the neighbor_advertiser script for advertisement of IPv6 Link local address In order to add an IPv6 address to the Vlan in the test, I had to set this |
No, that also will not work because the tests are run in the slave container; you cannot modify the sysctl values at runtime. They must be added to the @lguohan: Should we consider running the slave container with the appropriate Edit: Trying to understand why we didn't see this issue with Jenkins. I believe it is because with Jenkins, we add the Edit 2: I just pushed a commit to add the |
@@ -9,11 +9,71 @@ trigger: | |||
pool: | |||
vmImage: ubuntu-20.04 | |||
|
|||
container: | |||
image: sonicdev-microsoft.azurecr.io:443/sonic-slave-buster:latest | |||
options: --privileged |
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.
we should not do this, but I will accept it as a workaround.
ssdutil | ||
undebug | ||
utilities_common | ||
watchdogutil |
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.
we have to remember all the folder and update the folder when we have new one. is there way to include all of them?
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 tried this by using the omit =
parameter here instead to skip directories we don't want to test. However, with this approach it appeared to only report coverage for directories which had > 0% coverage (i.e., directories which do not yet have any unit tests were not reported as having 0% coverage). This is no worse than the pervious solution, however, the list of directories is more organized and easy to read in .coveragerc than it was is pytest.ini.
I will continue looking into a way to make this better.
those tests should be added to sonic-mgmt since they are system level test. if we are testing those commands, it is really testing ubuntu 20.04 command line, it does not help us. we should move them out to sonic-mgmt repo. the system level test does not belong to this repo. @sumukhatv, can you take action on this? |
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.
have some concern, but it is ok.
It is very specific to the feature of advertising link local address. In order to unit-test the feature, we need to add the IPv6 address via command line. We can also have this in |
@sumukhatv: For the sake of unit testing, you can simply mock the calls to |
Configure Azure Pipelines to run unit tests, build Python wheel and publish the test results, test coverage and resulting wheels.
Also clean up pytest.ini by adding .coveragerc file and add support for reporting branch coverage.