Skip to content
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

Enable C++ unit test during build #1092

Merged
merged 2 commits into from
Oct 14, 2019

Conversation

qiluo-msft
Copy link
Contributor

@qiluo-msft qiluo-msft commented Oct 12, 2019

TODO

  • remove tests from deb package.

@qiluo-msft qiluo-msft changed the title Enable test during build Enable C++ unit test during build Oct 12, 2019
@lguohan
Copy link
Contributor

lguohan commented Oct 14, 2019

i am not exactly sure if the those ut tests have been running or not.

make  check-TESTS
make[3]: Entering directory '/sonic/swss/tests'
make[4]: Entering directory '/sonic/swss/tests'
PASS: tests
============================================================================
Testsuite summary for sonic-swss 1.0
============================================================================
# TOTAL: 1
# PASS:  1
# SKIP:  0
# XFAIL: 0
# FAIL:  0
# XPASS: 0
# ERROR: 0
============================================================================

@lguohan
Copy link
Contributor

lguohan commented Oct 14, 2019

thanks for taking care of this!

@qiluo-msft
Copy link
Contributor Author

This is a sample output for a failure case, so the test did run.

FAIL: tests
==========================================
   sonic-swss 1.0: tests/test-suite.log
==========================================

# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0

.. contents:: :depth: 2

FAIL: tests
===========

Running main() from gtest_main.cc
[==========] Running 44 tests from 2 test cases.
[----------] Global test environment set-up.
[----------] 8 tests from swssnet
[ RUN      ] swssnet.copy1_v6
swssnet_ut.cpp:20: Failure
      Expected: buf
      Which is: "2001:4898:f0:f153:357c:77b2:49c9:627c"
To be equal to: "2001:4898:f0:f153:357c:77b2:49c9:6271"
[  FAILED  ] swssnet.copy1_v6 (0 ms)
[ RUN      ] swssnet.copy1_v4
[       OK ] swssnet.copy1_v4 (0 ms)
[ RUN      ] swssnet.copy2_v6
[       OK ] swssnet.copy2_v6 (0 ms)
[ RUN      ] swssnet.copy2_v4
[       OK ] swssnet.copy2_v4 (0 ms)
[ RUN      ] swssnet.copy3_v6
[       OK ] swssnet.copy3_v6 (0 ms)
[ RUN      ] swssnet.copy3_v4
[       OK ] swssnet.copy3_v4 (0 ms)
[ RUN      ] swssnet.subnet_v6
[       OK ] swssnet.subnet_v6 (0 ms)
[ RUN      ] swssnet.subnet_v4
[       OK ] swssnet.subnet_v4 (0 ms)
[----------] 8 tests from swssnet (0 ms total)

[----------] 36 tests from request_parser
[ RUN      ] request_parser.simpleKey
[       OK ] request_parser.simpleKey (0 ms)
[ RUN      ] request_parser.simpleKeyEmptyAttrs
[       OK ] request_parser.simpleKeyEmptyAttrs (0 ms)
[ RUN      ] request_parser.complexKey
[       OK ] request_parser.complexKey (0 ms)
[ RUN      ] request_parser.deleteOperation1
[       OK ] request_parser.deleteOperation1 (0 ms)
[ RUN      ] request_parser.deleteOperation2
[       OK ] request_parser.deleteOperation2 (0 ms)
[ RUN      ] request_parser.deleteOperationWithAttr
[       OK ] request_parser.deleteOperationWithAttr (0 ms)
[ RUN      ] request_parser.wrongOperation
[       OK ] request_parser.wrongOperation (0 ms)
[ RUN      ] request_parser.wrongkey1
[       OK ] request_parser.wrongkey1 (0 ms)
[ RUN      ] request_parser.wrongkey2
[       OK ] request_parser.wrongkey2 (0 ms)
[ RUN      ] request_parser.wrongkeyType1
[       OK ] request_parser.wrongkeyType1 (0 ms)
[ RUN      ] request_parser.wrongAttributeNotFound
[       OK ] request_parser.wrongAttributeNotFound (0 ms)
[ RUN      ] request_parser.wrongRequiredAttribute
[       OK ] request_parser.wrongRequiredAttribute (0 ms)
[ RUN      ] request_parser.wrongAttrTypeBoolean
[       OK ] request_parser.wrongAttrTypeBoolean (0 ms)
[ RUN      ] request_parser.wrongAttrTypeMac
[       OK ] request_parser.wrongAttrTypeMac (0 ms)
[ RUN      ] request_parser.wrongAttrTypePacketAction
[       OK ] request_parser.wrongAttrTypePacketAction (0 ms)
[ RUN      ] request_parser.wrongAttrTypeVlan_wrong_name
[       OK ] request_parser.wrongAttrTypeVlan_wrong_name (0 ms)
[ RUN      ] request_parser.wrongAttrTypeVlan_out_of_high_bound
[       OK ] request_parser.wrongAttrTypeVlan_out_of_high_bound (0 ms)
[ RUN      ] request_parser.wrongAttrTypeVlan_out_of_low_bound
[       OK ] request_parser.wrongAttrTypeVlan_out_of_low_bound (0 ms)
[ RUN      ] request_parser.wrongAttrTypeVlan_out_of_int_range
[       OK ] request_parser.wrongAttrTypeVlan_out_of_int_range (0 ms)
[ RUN      ] request_parser.wrongAttrTypeVlan_invalid_int
[       OK ] request_parser.wrongAttrTypeVlan_invalid_int (0 ms)
[ RUN      ] request_parser.correctAttrTypePacketAction1
[       OK ] request_parser.correctAttrTypePacketAction1 (0 ms)
[ RUN      ] request_parser.correctAttrTypePacketAction2
[       OK ] request_parser.correctAttrTypePacketAction2 (0 ms)
[ RUN      ] request_parser.emptyAttrValue1
[       OK ] request_parser.emptyAttrValue1 (0 ms)
[ RUN      ] request_parser.correctAttrTypePacketAction3
[       OK ] request_parser.correctAttrTypePacketAction3 (0 ms)
[ RUN      ] request_parser.correctParseAndClear
[       OK ] request_parser.correctParseAndClear (0 ms)
[ RUN      ] request_parser.incorrectParseAndClear
[       OK ] request_parser.incorrectParseAndClear (0 ms)
[ RUN      ] request_parser.correctClear
[       OK ] request_parser.correctClear (0 ms)
[ RUN      ] request_parser.anotherKeySeparator
[       OK ] request_parser.anotherKeySeparator (0 ms)
[ RUN      ] request_parser.notDefinedAttrType
[       OK ] request_parser.notDefinedAttrType (0 ms)
[ RUN      ] request_parser.notDefinedKeyType
[       OK ] request_parser.notDefinedKeyType (0 ms)
[ RUN      ] request_parser.uint_and_ip_keys
[       OK ] request_parser.uint_and_ip_keys (0 ms)
[ RUN      ] request_parser.wrong_ip_key
[       OK ] request_parser.wrong_ip_key (0 ms)
[ RUN      ] request_parser.wrong_uint_key_1
[       OK ] request_parser.wrong_uint_key_1 (0 ms)
[ RUN      ] request_parser.wrong_uint_key_2
[       OK ] request_parser.wrong_uint_key_2 (0 ms)
[ RUN      ] request_parser.prefix_key1
[       OK ] request_parser.prefix_key1 (0 ms)
[ RUN      ] request_parser.wrong_key_ip_prefix
[       OK ] request_parser.wrong_key_ip_prefix (0 ms)
[----------] 36 tests from request_parser (1 ms total)

[----------] Global test environment tear-down
[==========] 44 tests from 2 test cases ran. (1 ms total)
[  PASSED  ] 43 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] swssnet.copy1_v6

 1 FAILED TEST
FAIL tests (exit status: 1)

============================================================================
Testsuite summary for sonic-swss 1.0
============================================================================
# TOTAL: 1
# PASS:  0
# SKIP:  0
# XFAIL: 0
# FAIL:  1
# XPASS: 0
# ERROR: 0
============================================================================
See tests/test-suite.log
============================================================================

@qiluo-msft qiluo-msft marked this pull request as ready for review October 14, 2019 18:08
@qiluo-msft qiluo-msft merged commit 1623219 into sonic-net:master Oct 14, 2019
@qiluo-msft qiluo-msft deleted the qiluo/enable-test branch October 14, 2019 18:09
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
- Update SAI VoQ support (sonic-net#1107) …
- Voq system (sonic-net#1081) …
- [meta] Add support for ignored enum values (sonic-net#1099)
- TPID SAI proposal (sonic-net#1089) …
- ACL GRE key match (sonic-net#1076) …
- Add IPv6 NS and NA Traps (sonic-net#1092) …
- MACsec flow list attribute added in MACsec object (sonic-net#1095) …
- Add Enterprise Number for IPFIX Report Type (sonic-net#1072) …
- Provide TTL and QoS treatment during MPLS encap and decap (sonic-net#1079)
- Create and Set for Tunnel Attributes (sonic-net#1086) …
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants