[PATCH 0/3] Add coverage testing support
by Daniel Silverstone
Long have we wished that the Gitano yarn suite could provide us with a coverage
report for our tests. Now our wish is granted.
By means of a more modern luacov, and some judicious (and injudicious) bodging,
this patch series enables coverage testing in the Gitano test suite.
The TESTING document is updated to cover this (it has a few whitespace
tweaks too, sorry abou those, I can remove them if it truly upsets).
And for those curious, the current coverage is:
File Hits Missed Coverage
------------------------------------------------------------------------------
/home/dsilvers/dev-git/gitano/bin/gitano-auth 24 6 80.00%
/home/dsilvers/dev-git/gitano/bin/gitano-command.cgi 42 6 87.50%
/home/dsilvers/dev-git/gitano/bin/gitano-setup 185 25 88.10%
/home/dsilvers/dev-git/gitano/bin/gitano-smart-http.cgi 41 8 83.67%
/home/dsilvers/dev-git/gitano/bin/gitano-update-ssh 22 7 75.86%
/home/dsilvers/dev-git/gitano/lib/gitano/actions.lua 31 47 39.74%
/home/dsilvers/dev-git/gitano/lib/gitano/admincommand.lua 553 233 70.36%
/home/dsilvers/dev-git/gitano/lib/gitano/auth.lua 67 17 79.76%
/home/dsilvers/dev-git/gitano/lib/gitano/command.lua 371 121 75.41%
/home/dsilvers/dev-git/gitano/lib/gitano/config.lua 246 61 80.13%
/home/dsilvers/dev-git/gitano/lib/gitano/copycommand.lua 52 18 74.29%
/home/dsilvers/dev-git/gitano/lib/gitano/i18n.lua 49 10 83.05%
/home/dsilvers/dev-git/gitano/lib/gitano/lace.lua 114 14 89.06%
/home/dsilvers/dev-git/gitano/lib/gitano/log.lua 121 36 77.07%
/home/dsilvers/dev-git/gitano/lib/gitano/plugins.lua 32 8 80.00%
/home/dsilvers/dev-git/gitano/lib/gitano/repocommand.lua 41 0 100.00%
/home/dsilvers/dev-git/gitano/lib/gitano/repository.lua 394 144 73.23%
/home/dsilvers/dev-git/gitano/lib/gitano/supple.lua 63 18 77.78%
/home/dsilvers/dev-git/gitano/lib/gitano/usercommand.lua 145 44 76.72%
/home/dsilvers/dev-git/gitano/lib/gitano/util.lua 268 79 77.23%
/home/dsilvers/dev-git/gitano/plugins/archive.lua 15 2 88.24%
/home/dsilvers/dev-git/gitano/plugins/git-annex.lua 8 36 18.18%
/home/dsilvers/dev-git/gitano/plugins/rsync.lua 35 12 74.47%
/home/dsilvers/dev-git/gitano/testing/gitano-test-tool 256 15 94.46%
------------------------------------------------------------------------------
Total 3175 967 76.65%
Daniel Silverstone (3):
adds the luacov submodule
adds support for coverage testing
adds instructions on coverage testing
.editorconfig | 2 +-
.gitignore | 4 +++
.gitmodules | 3 +++
.luacov | 22 ++++++++++++++++
Makefile | 66 +++++++++++++++++++++++++++++++++++++++-------
TESTING | 44 +++++++++++++++++++++++++++++--
extras/luacov | 1 +
lib/gitano/coverage.lua.in | 52 ++++++++++++++++++++++++++++++++++++
utils/install-lua-bin | 38 ++++++++++++++++++++++----
utils/merge-luacov-stats | 66 ++++++++++++++++++++++++++++++++++++++++++++++
10 files changed, 281 insertions(+), 17 deletions(-)
create mode 100644 .gitmodules
create mode 100644 .luacov
create mode 160000 extras/luacov
create mode 100644 lib/gitano/coverage.lua.in
create mode 100644 utils/merge-luacov-stats
--
2.1.4
6 years, 6 months
[PATCH 00/10] Tree-delta testing
by Daniel Silverstone
Hi all,
This patch series adds tests for the treedelta capabilities in the
Lace context for the update hook. Fortunately for us, it turns out
that all of that previously untested code works \o/. Sadly it exposed
a bug in Lace which caused the Lace 1.3.1 release (which is now migrated
to Debian/testing).
I hope the patches themselves are self-explanatory. I've tried to use
a form of semantic short-commit-message which is of the form
This commit: .......
I don't know yet if I like this; but since the rest of the commit messages
are a mess of one liners and complex explanations; I'm not worried about
any consistent style *yet*
D.
Daniel Silverstone (10):
adds support for expecting failure on a push
logs stdout/stderr when patching gitano-admin
adds the testing ability to apply a content patch
adds an initial treedelta test
supports reversing admin patches
permits empty commit pushing to fail
adds test for checking start_tree
adds the ability to revert content patches
adds testing for treediff/targets
adds a test covering the rest of treediff/*
Makefile | 2 +-
testing/03-treedelta-rules.yarn | 221 +++++++++++++++++++++++
testing/admin-patches/must-add-FOO.patch | 13 ++
testing/admin-patches/must-affect-FOO.patch | 13 ++
testing/admin-patches/must-modify-FOO.patch | 13 ++
testing/admin-patches/must-remove-FOO.patch | 13 ++
testing/admin-patches/must-rename-from-FOO.patch | 13 ++
testing/admin-patches/must-rename-to-FOO.patch | 13 ++
testing/admin-patches/must-start-with-FOO.patch | 13 ++
testing/admin-patches/no-create-FOO.patch | 13 ++
testing/content-patches/add-a-FOO.patch | 7 +
testing/content-patches/change-a-FOO.patch | 6 +
testing/content-patches/rename-a-FOO.patch | 10 +
testing/library.yarn | 53 ++++--
14 files changed, 391 insertions(+), 12 deletions(-)
create mode 100644 testing/03-treedelta-rules.yarn
create mode 100644 testing/admin-patches/must-add-FOO.patch
create mode 100644 testing/admin-patches/must-affect-FOO.patch
create mode 100644 testing/admin-patches/must-modify-FOO.patch
create mode 100644 testing/admin-patches/must-remove-FOO.patch
create mode 100644 testing/admin-patches/must-rename-from-FOO.patch
create mode 100644 testing/admin-patches/must-rename-to-FOO.patch
create mode 100644 testing/admin-patches/must-start-with-FOO.patch
create mode 100644 testing/admin-patches/no-create-FOO.patch
create mode 100644 testing/content-patches/add-a-FOO.patch
create mode 100644 testing/content-patches/change-a-FOO.patch
create mode 100644 testing/content-patches/rename-a-FOO.patch
--
2.1.4
6 years, 6 months