Skip to content

Commit 38b1a8a

Browse files
authored
[sonic-utilities] Explicitly run unit tests in build script (sonic-net#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.
1 parent edccbcc commit 38b1a8a

File tree

1 file changed

+4
-1
lines changed
  • scripts/common/sonic-utilities-build

1 file changed

+4
-1
lines changed

scripts/common/sonic-utilities-build/build.sh

+4-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,10 @@ sudo dpkg -i buildimage/target/debs/buster/python2-yang_1.0.73_amd64.deb
3131
3232
cd sonic-utilities
3333
34-
# Test building the Python wheel
34+
# Run unit tests
35+
sudo python setup.py test
36+
37+
# Build the Python wheel
3538
sudo python setup.py bdist_wheel
3639
3740
EOF

0 commit comments

Comments
 (0)