Skip to content
Snippets Groups Projects
  1. Nov 28, 2017
    • Marek Vavruša's avatar
      build: make lint depends on autogenerated Lua files · 90b73630
      Marek Vavruša authored and Petr Špaček's avatar Petr Špaček committed
      Lint should always render the .lua from .lua.in files before checking.
      Verified
      90b73630
    • Marek Vavruša's avatar
      build: added `make coverage` to compute C and Lua code coverage · 1985c678
      Marek Vavruša authored and Petr Špaček's avatar Petr Špaček committed
      Currently it gathers gcov and luacov code coverage, and merges it
      in a single lcov info file. It returns summary at the end which the
      CI can parse and interpret. It can build a html report later using
      the data.
      Verified
      1985c678
    • Marek Vavruša's avatar
      tests/config: added a TAP-based test environment for modules/configs · f41676d2
      Marek Vavruša authored and Petr Špaček's avatar Petr Špaček committed
      I moved the test files to module directories because it allows
      vendoring of whole modules including tests etc.
      
      The test environment provides convenience functions and produces
      test output in TAP format. Ideally all tests should use a common
      format, so that CI can parse it provide better test output on PRs.
      It seems like Gitlab CI doesn't support anything yet, but there
      are two sort-of standards supported in CI tools - TAP and JUnit.
      I chose TAP because it's easier to read for humans, cmocka supports it,
      and it should be easier to adapt Deckard. There are also tools to
      convert TAP into JUnit XML file.
      
      Also added more tests for global functions and variables, and the
      test tool now also tracks coverage (if `luacov` is installed).
      Verified
      f41676d2
  2. Nov 27, 2017
  3. Nov 24, 2017
  4. Nov 23, 2017
    • Petr Špaček's avatar
      Merge branch 'add-lua-linter' into 'master' · f60e0a53
      Petr Špaček authored
      Added luacheck for linting Lua files and static analysis
      
      See merge request !398
      f60e0a53
    • Marek Vavruša's avatar
      Added luacheck for linting Lua files and static analysis · 0e2ffb5d
      Marek Vavruša authored
      This is super useful for checking things like misusing undefined
      variables or modifying globals, especially in modules when it's
      not immediately visible which variables are in the global
      namespace and which are not.
      
      I added several exceptions for files in daemon/lua and tests,
      as for example sandbox module needs to legitimately modify
      global namespace.
      
      There's a lot of things failing, so I didn't make it part of the
      standard `make check`, but we should eventually enable it to
      improve code quality and spot problems with CI.
      0e2ffb5d
  5. Nov 20, 2017
  6. Nov 16, 2017
  7. Nov 15, 2017