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

Improve hashing of test suites for xml files with many suites #45

Closed
santiagopagani opened this issue Oct 25, 2022 · 2 comments · Fixed by #47
Closed

Improve hashing of test suites for xml files with many suites #45

santiagopagani opened this issue Oct 25, 2022 · 2 comments · Fixed by #47

Comments

@santiagopagani
Copy link

santiagopagani commented Oct 25, 2022

We are currently using this extension (locked in version 0.3.6 until issue 40 gets fixed) to link GTEST results.

When using GTEST and typed tests, it is very common to have xml files with many suites (e.g., 60 suites or more, depending on the number of test cases and tested types in the xml). For this use case, we have experienced sphinx-build compilation errors about repeated IDs.

The titles of the suites are different, but somehow they get the same hash, and hence the problem.

Here is an example xml file which is generating this problem:

<?xml version="1.0" encoding="UTF-8"?>
<testsuites tests="63" failures="0" disabled="0" errors="0" timestamp="2022-10-21T14:47:39" time="0.002" name="AllTests">
  <testsuite name="vfc_hash" tests="7" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashBoolAndEnum" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testSerialHash" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testSerialHashComplex" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testSerialHashNested" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTCArray" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTSIUnit" status="run" time="0" classname="vfc_hash" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesRect" status="run" time="0" classname="vfc_hash" />
  </testsuite>
  <testsuite name="vfc_THash/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHash" type_param="vfc_cppunit::THash&lt;int, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_THash/0" />
  </testsuite>
  <testsuite name="vfc_THash/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHash" type_param="vfc_cppunit::THash&lt;short, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_THash/1" />
  </testsuite>
  <testsuite name="vfc_THash/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHash" type_param="vfc_cppunit::THash&lt;unsigned short, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_THash/2" />
  </testsuite>
  <testsuite name="vfc_THash/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHash" type_param="vfc_cppunit::THash&lt;unsigned int, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_THash/3" />
  </testsuite>
  <testsuite name="vfc_THash/4" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHash" type_param="vfc_cppunit::THash&lt;long, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_THash/4" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;int, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/0" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;short, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/1" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;unsigned short, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/2" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;unsigned int, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/3" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/4" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;long, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/4" />
  </testsuite>
  <testsuite name="vfc_hash_Primitives/5" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testHashPrimitives" type_param="vfc_cppunit::hash_Primitives&lt;float, 85l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_Primitives/5" />
  </testsuite>
  <testsuite name="vfc_hash_Tuple/0" tests="1" failures="0" disabled="0" errors="0" time="0.001">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTuple" type_param="vfc_cppunit::hash_Tuple&lt;int, 5921370, 10855845, 5921370, 10855845&gt;" status="run" time="0.001" classname="vfc_hash_Tuple/0" />
  </testsuite>
  <testsuite name="vfc_hash_Tuple/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTuple" type_param="vfc_cppunit::hash_Tuple&lt;unsigned int, 5921370u, 10855845u, 5921370u, 10855845u&gt;" status="run" time="0" classname="vfc_hash_Tuple/1" />
  </testsuite>
  <testsuite name="vfc_hash_Tuple/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTuple" type_param="vfc_cppunit::hash_Tuple&lt;long, 5921370l, 10855845l, 5921370l, 10855845l&gt;" status="run" time="0" classname="vfc_hash_Tuple/2" />
  </testsuite>
  <testsuite name="vfc_hash_TFixed/0" tests="2" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedVector" type_param="vfc_cppunit::hash_TFixed&lt;int, 5ul, -10l&gt;" status="run" time="0" classname="vfc_hash_TFixed/0" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedList" type_param="vfc_cppunit::hash_TFixed&lt;int, 5ul, -10l&gt;" status="run" time="0" classname="vfc_hash_TFixed/0" />
  </testsuite>
  <testsuite name="vfc_hash_TFixed/1" tests="2" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedVector" type_param="vfc_cppunit::hash_TFixed&lt;unsigned int, 15ul, 200l&gt;" status="run" time="0" classname="vfc_hash_TFixed/1" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedList" type_param="vfc_cppunit::hash_TFixed&lt;unsigned int, 15ul, 200l&gt;" status="run" time="0" classname="vfc_hash_TFixed/1" />
  </testsuite>
  <testsuite name="vfc_hash_TFixed/2" tests="2" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedVector" type_param="vfc_cppunit::hash_TFixed&lt;long, 5ul, -300l&gt;" status="run" time="0" classname="vfc_hash_TFixed/2" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedList" type_param="vfc_cppunit::hash_TFixed&lt;long, 5ul, -300l&gt;" status="run" time="0" classname="vfc_hash_TFixed/2" />
  </testsuite>
  <testsuite name="vfc_hash_TFixed/3" tests="2" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedVector" type_param="vfc_cppunit::hash_TFixed&lt;float, 25ul, 50l&gt;" status="run" time="0" classname="vfc_hash_TFixed/3" />
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedList" type_param="vfc_cppunit::hash_TFixed&lt;float, 25ul, 50l&gt;" status="run" time="0" classname="vfc_hash_TFixed/3" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;int, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/0" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;short, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/1" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;unsigned short, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/2" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;unsigned int, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/3" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/4" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;long, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/4" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedCircularBuffer/5" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTFixedCircularBuffer" type_param="vfc_cppunit::hash_TFixedCircularBuffer&lt;float, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedCircularBuffer/5" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;int, int, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/0" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;short, int, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/1" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;unsigned int, int, 101l, 21l, 1000l, 3l, 0l, 50l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/2" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;unsigned int, short, 101l, 21l, 1000l, 3l, 0l, 50l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/3" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/4" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;long, int, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/4" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/5" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;int, short, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/5" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/6" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;short, int, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/6" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/7" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;unsigned int, unsigned short, 101l, 21l, 1000l, 3l, 0l, 50l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/7" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/8" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;long, long, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/8" />
  </testsuite>
  <testsuite name="vfc_hash_TFixedMap/9" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="testVfcComplexTypesTFixedMap" type_param="vfc_cppunit::hash_TFixedMap&lt;int, float, 101l, 21l, 1000l, 3l, 0l, 50l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TFixedMap/9" />
  </testsuite>
  <testsuite name="vfc_hash_TVectorN/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVectorN" type_param="vfc_cppunit::hash_TVectorN&lt;int, 1l, 7l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVectorN/0" />
  </testsuite>
  <testsuite name="vfc_hash_TVectorN/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVectorN" type_param="vfc_cppunit::hash_TVectorN&lt;unsigned int, 1l, 6l, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVectorN/1" />
  </testsuite>
  <testsuite name="vfc_hash_TVectorN/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVectorN" type_param="vfc_cppunit::hash_TVectorN&lt;long, 1l, 7l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVectorN/2" />
  </testsuite>
  <testsuite name="vfc_hash_TVectorN/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVectorN" type_param="vfc_cppunit::hash_TVectorN&lt;float, 10l, 3l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVectorN/3" />
  </testsuite>
  <testsuite name="vfc_hash_TVector234/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVector234" type_param="vfc_cppunit::hash_TVector234&lt;int, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVector234/0" />
  </testsuite>
  <testsuite name="vfc_hash_TVector234/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVector234" type_param="vfc_cppunit::hash_TVector234&lt;unsigned int, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVector234/1" />
  </testsuite>
  <testsuite name="vfc_hash_TVector234/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVector234" type_param="vfc_cppunit::hash_TVector234&lt;long, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVector234/2" />
  </testsuite>
  <testsuite name="vfc_hash_TVector234/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTVector234" type_param="vfc_cppunit::hash_TVector234&lt;float, 10l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TVector234/3" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;int, 1l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrixMN/0" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;short, 1l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrixMN/1" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/2" tests="1" failures="0" disabled="0" errors="0" time="0.001">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;unsigned short, 1l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0.001" classname="vfc_hash_TMatrixMN/2" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;unsigned int, 1l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrixMN/3" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/4" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;long, 1l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrixMN/4" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrixMN/5" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrixMN" type_param="vfc_cppunit::hash_TMatrixMN&lt;float, 10l, 7l, 5l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrixMN/5" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrix234/0" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrix234" type_param="vfc_cppunit::hash_TMatrix234&lt;int, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrix234/0" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrix234/1" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrix234" type_param="vfc_cppunit::hash_TMatrix234&lt;unsigned int, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, 100l, 2l, 1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrix234/1" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrix234/2" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrix234" type_param="vfc_cppunit::hash_TMatrix234&lt;long, 1l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrix234/2" />
  </testsuite>
  <testsuite name="vfc_hash_TMatrix234/3" tests="1" failures="0" disabled="0" errors="0" time="0">
    <testcase name="TEST_UNIT_VFC_hash_testVfcComplexTypesTMatrix234" type_param="vfc_cppunit::hash_TMatrix234&lt;float, 10l, 100l, 2l, 1000l, 3l, 0l, 0l, -100l, 2l, -1l, 31l&gt;" status="run" time="0" classname="vfc_hash_TMatrix234/3" />
  </testsuite>
</testsuites>

The xml is then used in Sphinx-Needs via the following directive:

.. test-file:: TEST_UNIT_RESULT_VFC_HASH
   :id: TEST_UNIT_RESULT_VFC_HASH
   :tags: unit-test
   :file: unit_tests/vfc_unit_tests_hashtest_11_GCC.xml
   :auto_suites:
   :auto_cases:

I have done some debugging by printing information in the test-reports extension and I can see the problem as such:

File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash, ID: TEST_UNIT_RESULT_VFC_HASH_FFD
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_THash/0, ID: TEST_UNIT_RESULT_VFC_HASH_D63
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_THash/1, ID: TEST_UNIT_RESULT_VFC_HASH_885
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_THash/2, ID: TEST_UNIT_RESULT_VFC_HASH_AE3
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_THash/3, ID: TEST_UNIT_RESULT_VFC_HASH_3D5
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_THash/4, ID: TEST_UNIT_RESULT_VFC_HASH_C4D
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/0, ID: TEST_UNIT_RESULT_VFC_HASH_0E5
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/1, ID: TEST_UNIT_RESULT_VFC_HASH_0E8
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/2, ID: TEST_UNIT_RESULT_VFC_HASH_528
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/3, ID: TEST_UNIT_RESULT_VFC_HASH_89D
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/4, ID: TEST_UNIT_RESULT_VFC_HASH_FE7
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Primitives/5, ID: TEST_UNIT_RESULT_VFC_HASH_3CE
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Tuple/0, ID: TEST_UNIT_RESULT_VFC_HASH_3A1
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Tuple/1, ID: TEST_UNIT_RESULT_VFC_HASH_417
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_Tuple/2, ID: TEST_UNIT_RESULT_VFC_HASH_D7B
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixed/0, ID: TEST_UNIT_RESULT_VFC_HASH_4AD
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixed/1, ID: TEST_UNIT_RESULT_VFC_HASH_9A7
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixed/2, ID: TEST_UNIT_RESULT_VFC_HASH_F01
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixed/3, ID: TEST_UNIT_RESULT_VFC_HASH_796
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/0, ID: TEST_UNIT_RESULT_VFC_HASH_909
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/1, ID: TEST_UNIT_RESULT_VFC_HASH_F63
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/2, ID: TEST_UNIT_RESULT_VFC_HASH_D7A
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/3, ID: TEST_UNIT_RESULT_VFC_HASH_155
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/4, ID: TEST_UNIT_RESULT_VFC_HASH_871
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedCircularBuffer/5, ID: TEST_UNIT_RESULT_VFC_HASH_9DD
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/0, ID: TEST_UNIT_RESULT_VFC_HASH_E34
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/1, ID: TEST_UNIT_RESULT_VFC_HASH_8D8
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/2, ID: TEST_UNIT_RESULT_VFC_HASH_45F
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/3, ID: TEST_UNIT_RESULT_VFC_HASH_904
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/4, ID: TEST_UNIT_RESULT_VFC_HASH_921
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/5, ID: TEST_UNIT_RESULT_VFC_HASH_CCE
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/6, ID: TEST_UNIT_RESULT_VFC_HASH_37A
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/7, ID: TEST_UNIT_RESULT_VFC_HASH_DD7
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/8, ID: TEST_UNIT_RESULT_VFC_HASH_B95
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TFixedMap/9, ID: TEST_UNIT_RESULT_VFC_HASH_210
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TVectorN/0, ID: TEST_UNIT_RESULT_VFC_HASH_8DD
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TVectorN/1, ID: TEST_UNIT_RESULT_VFC_HASH_10A
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TVectorN/2, ID: TEST_UNIT_RESULT_VFC_HASH_2D9
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TVectorN/3, ID: TEST_UNIT_RESULT_VFC_HASH_154
File: ../../../build_with_GCC/Testing/xml/vfc/unit_tests/vfc_unit_tests_hashtest_11_GCC.xml, Suite: vfc_hash_TVector234/0, ID: TEST_UNIT_RESULT_VFC_HASH_8D8

where we see ID TEST_UNIT_RESULT_VFC_HASH_8D8 benig repeated.

This questions actually whether a hash is not an overkill solution to this problem, which is not even sufficient in this case.
Namely, if the user already needs to specify an unique ID for the test file name, why not simply use an incremental counter for each suite, and another incremental counter for the test cases? We can then guarantee that the ID will never get repeated.

I assume that the hash was chosen because as long as the title of the suite does not change, it does not matter if you re-order it in the xml, you always get the same ID, whereas using an incremental counter means that adding a new suite or test results in a different ID.

If the hash is a preferred solution then, we either need a longer hash for the suites, or some mechanism to make sure that the ID does not get repeated. For example, while parsing a file and selecting the hashed IDs of both suites and test cases, the extension could keep a list of the IDs selected so far for this file, and if it produces a hashed ID which has by chance already been selected, then simply increase the value by one and check again until an unused ID is found, or another similar solution. In this case one should verify that we hace not made a complete loop for the limit of encodable values for the chosen lenght of the hash, such that we do not enter an infinite loop. We can then simply issue an error that the number of supported suites for a given file has been reached, or otherwise simply increase the lenght of the hash?

@danwos
Copy link
Member

danwos commented Oct 26, 2022

Thanks for the bug report, I will check it soon.
I don't like the idea of involving a counter for the calculated hash, mainly because it is not reproducible if the data amount changes but the title stays the same.

Maybe we should then make the hash_caluclation more configurable.
I would start to allow the selection of the hash-length, which maybe is enough to get unique IDs again.

But also a check should be added, to figure out if a calcualted_hash was already used before.

@danwos
Copy link
Member

danwos commented Oct 26, 2022

Added a PR which allows to raise the length of calculated test suite and test cases IDs.

I can confirm that there is an ID conflict for your provided data, if test suite ID length is 3.
Setting it to 4 already fixes this. 5, to be on the safe side :)

danwos added a commit that referenced this issue Oct 26, 2022
danwos added a commit that referenced this issue Oct 26, 2022
danwos added a commit that referenced this issue Oct 27, 2022
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 a pull request may close this issue.

2 participants