Skip to content
Snippets Groups Projects
  1. Apr 22, 2013
  2. Apr 19, 2013
  3. Apr 17, 2013
  4. Apr 14, 2013
  5. Apr 12, 2013
  6. Apr 11, 2013
  7. Apr 08, 2013
  8. Apr 05, 2013
  9. Apr 02, 2013
  10. Mar 27, 2013
  11. Mar 26, 2013
  12. Mar 22, 2013
    • Michele Tartara's avatar
      Fix bug in rlib2 unit tests · 61f8fda4
      Michele Tartara authored
      
      The "queryargs" parameter of the __init__ function of rlib2 classes should
      be a dictionary, as defined in the ResourceBase parent class (in
      lib/rapi/baserlib.py).
      
      In the rlib2 and baserlib unit tests, when the queryargs parameter is not
      actually needed, it is sometimes erroneously initialized with an empty list or a
      "None" value instead of an empty dictionary.
      
      This commit solves the problem and introduces an assertion to prevent it from
      happening again in the future.
      The use of the assertion is safe, because in production code the __init__
      function is only called by the RAPI server, with the queryargs parameter
      initialized by the Mapper.getController function (lib/rapi/connector.py) that
      always returns a dictionary. It can only affect test code and future code.
      
      Signed-off-by: default avatarMichele Tartara <mtartara@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      61f8fda4
  13. Mar 21, 2013
  14. Mar 13, 2013
  15. Mar 12, 2013
  16. Mar 11, 2013
  17. Mar 05, 2013
    • Iustin Pop's avatar
      Expand Haddock to run over test files as well · 7ddd8e4c
      Iustin Pop authored
      
      This patch does multiple enhancements to the way we build the Haddock
      docs, motivated by the fact that if we don't run Haddock over test
      files as well, bad formatting can be submitted and will accumulate
      over time (without any checks).
      
      The patch does:
      
      - replace manual built ALL_APIDOC_HS_DIRS with automatically built one
        (from HS_DIRS)
      - change Haddock so that it runs from the top directory (instead of
        from src/)
      - change HsColour target file to be built via bash parameter
        substitution, rather than sed (I don't know how to do it in one go,
        so I use 2 intermediate variables)
      - change 'hs-apidoc' target so that it depends on the real target
        file; in case no source file has been modified, running 'make
        hs-apidoc' twice will not result in two runs
      - run HsColour/Haddock under en_US.UTF-8 locale, otherwise they can't
        parse correctly the Unicode chars in the test files
      
      Additionally, wrong formatting (oops) in a test file has been
      corrected.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarMichele Tartara <mtartara@google.com>
      7ddd8e4c
    • Iustin Pop's avatar
      Switch LispConfig double comparison to relative error · c56dd17b
      Iustin Pop authored
      This further improves the comparison for "non-trivial"
      numbers. Without this patch, there are still cases where the absolute
      error is too big, and we need to switch to relative error.
      
      Concept has been taken from
      <http://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/
      
      >.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      c56dd17b
  18. Mar 04, 2013
    • Iustin Pop's avatar
      Make the XmParser config test runtime more consistent · 1fe0e999
      Iustin Pop authored
      
      Currently, the test uses a frequency of 5 string/5 double/1 list for
      generating Arbitrary instances of ListConfig. However, the list case
      has simply a "choose (1, 20)" `vectorOf` arbitrary, which means it
      could recurse forever.
      
      Manually running only this test gives runtime as such:
      
      - ~100-200ms: very often
      - ~1-2s: often
      - ~5s: rare
      - ~20s: very rare (but I hit this when running < 30 times the test,
        so…)
      
      On average, this makes this test one of the slowest ones, which is
      annoying.
      
      By changing to a sized generator, we can control the depth of the
      recursion, ensuring that we have a consistent runtime: out of 100
      runs, one is 229ms, one is 164ms, the other are 80-120ms.
      
      Signed-off-by: default avatarIustin Pop <iustin@google.com>
      Reviewed-by: default avatarGuido Trotter <ultrotter@google.com>
      1fe0e999
Loading