Skip to content

Commit

Permalink
[sonic-utilities] Explicitly run unit tests in build script (sonic-ne…
Browse files Browse the repository at this point in the history
…t#166)

When we were building the sonic-utilities package as a Debian package, the `python setup.py --command-packages=stdeb.commandbdist_deb` operation would automatically run the unit tests before build. Now that we've changed to building a Python wheel, the `python setup.py bdist_wheel` operation does not automatically run the unit tests.

In this patch, we explictly run the unit tests using `sudo python setup.py test` before building the wheel.
  • Loading branch information
jleveque authored Sep 22, 2020
1 parent edccbcc commit 38b1a8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion scripts/common/sonic-utilities-build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ sudo dpkg -i buildimage/target/debs/buster/python2-yang_1.0.73_amd64.deb
cd sonic-utilities
# Test building the Python wheel
# Run unit tests
sudo python setup.py test
# Build the Python wheel
sudo python setup.py bdist_wheel
EOF
Expand Down

0 comments on commit 38b1a8a

Please sign in to comment.