All of lore.kernel.org
 help / color / mirror / Atom feed
* [ANNOUNCE] Sharness - Test library derived from Git
@ 2012-07-17  8:06 Mathias Lafeldt
  2012-07-17 18:31 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Lafeldt @ 2012-07-17  8:06 UTC (permalink / raw)
  To: git

Hi,

I've been wanting to announce Sharness [1] on this list for quite some
time now, but never managed to do so. With the release of version
0.2.4, I think it's about time to change that.

Sharness is a shell-based test harness library. It was derived from
the Git project and is basically a generalized and stripped-down
version of t/test-lib.sh (I basically removed all things specific to
Git). So when you know how to write tests for Git, it should be very
familiar.

I've been using Sharness to test my command-line applications [2] for
over a year now. It's especially useful when you're doing continuous
integration with a service like Travis CI [3].

Development of Sharness takes place at GitHub [4]. If you're
interested, there might be some things I could contribute back to Git,
e.g. the API documentation [5] I wrote in TomDoc format.

Looking forward to your feedback.

[1] http://mlafeldt.github.com/sharness
[2] https://github.com/mlafeldt/sharness#projects-using-sharness
[3] http://travis-ci.org/
[4] https://github.com/mlafeldt/sharness
[5] https://github.com/mlafeldt/sharness/blob/master/API.md

-Mathias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCE] Sharness - Test library derived from Git
  2012-07-17  8:06 [ANNOUNCE] Sharness - Test library derived from Git Mathias Lafeldt
@ 2012-07-17 18:31 ` Ævar Arnfjörð Bjarmason
  2012-07-20 10:18   ` Mathias Lafeldt
  0 siblings, 1 reply; 5+ messages in thread
From: Ævar Arnfjörð Bjarmason @ 2012-07-17 18:31 UTC (permalink / raw)
  To: Mathias Lafeldt; +Cc: git

On Tue, Jul 17, 2012 at 10:06 AM, Mathias Lafeldt
<mathias.lafeldt@gmail.com> wrote:
> I've been wanting to announce Sharness [1] on this list for quite some
> time now, but never managed to do so. With the release of version
> 0.2.4, I think it's about time to change that.
>
> Sharness is a shell-based test harness library. It was derived from
> the Git project and is basically a generalized and stripped-down
> version of t/test-lib.sh (I basically removed all things specific to
> Git). So when you know how to write tests for Git, it should be very
> familiar.

Nice, I thought about doing something like this myself but never had the time.

Perhaps to avoid duplication we could move to this and keep
Git-specific function in some other file.

Do you think that would be sensible, and would you be willing to
submit patches for that?

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCE] Sharness - Test library derived from Git
  2012-07-17 18:31 ` Ævar Arnfjörð Bjarmason
@ 2012-07-20 10:18   ` Mathias Lafeldt
  2012-07-20 11:45     ` Matthieu Moy
  0 siblings, 1 reply; 5+ messages in thread
From: Mathias Lafeldt @ 2012-07-20 10:18 UTC (permalink / raw)
  To: Ævar Arnfjörð Bjarmason; +Cc: git

On Tue, Jul 17, 2012 at 8:31 PM, Ævar Arnfjörð Bjarmason
<avarab@gmail.com> wrote:
> Nice, I thought about doing something like this myself but never had the time.

Thanks. Took quite some time to take out the Git-specific
functionality. And there's still a lot of room for improvement.

> Perhaps to avoid duplication we could move to this and keep
> Git-specific function in some other file.

That would be fantastic! From a technical point of view, it would make
a lot of sense to join forces here.

How do you think would Sharness fit into the Git project? Is adding it
as an external dependency an option?

Let's share some ideas before getting to it.

> Do you think that would be sensible, and would you be willing to
> submit patches for that?

While I haven't touched the names of the test functions, I renamed
most of the global shell variables, e.g. GIT_TEST_OPTS to TEST_OPTS
and TEST_DIRECTORY to SHARNESS_TEST_DIRECTORY. That might be a (minor)
problem.

As for the patches: absolutely. I'd really love to give something back to Git.

-Mathias

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCE] Sharness - Test library derived from Git
  2012-07-20 10:18   ` Mathias Lafeldt
@ 2012-07-20 11:45     ` Matthieu Moy
  2012-07-20 21:11       ` dag
  0 siblings, 1 reply; 5+ messages in thread
From: Matthieu Moy @ 2012-07-20 11:45 UTC (permalink / raw)
  To: Mathias Lafeldt; +Cc: Ævar Arnfjörð Bjarmason, git

Mathias Lafeldt <mathias.lafeldt@gmail.com> writes:

> On Tue, Jul 17, 2012 at 8:31 PM, Ævar Arnfjörð Bjarmason
> <avarab@gmail.com> wrote:
>
>> Perhaps to avoid duplication we could move to this and keep
>> Git-specific function in some other file.
>
> That would be fantastic! From a technical point of view, it would make
> a lot of sense to join forces here.

Seems to be a reasonable goal, yes. The test harness in Git keeps
improving, and Sharness is likely to improve also, it would be a pity to
have them diverge and not benefit from each other.

> How do you think would Sharness fit into the Git project? Is adding it
> as an external dependency an option?

It would be nice if the code sharing did not result in extra pain for
users and testers, so "external dependency" in the sense "not included
in git.git and ask the user to install it" is IMHO a bad idea.
Increasing the effort needed to run the testsuite means more people will
give up before running it :-(.

OTOH, having it leave in a subdirectory (e.g. $git/t/Sharness/), and
synchronize with stg like subtree merge would be nice for the user. We
already have something similar for gitk and git-gui, except that the
synchronization is normally one way (subprojects merged into Git, but
merging back changes that were made in git.git in these subprojects is
more painful).

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [ANNOUNCE] Sharness - Test library derived from Git
  2012-07-20 11:45     ` Matthieu Moy
@ 2012-07-20 21:11       ` dag
  0 siblings, 0 replies; 5+ messages in thread
From: dag @ 2012-07-20 21:11 UTC (permalink / raw)
  To: Matthieu Moy; +Cc: Mathias Lafeldt, Ævar Arnfjörð Bjarmason, git

Matthieu Moy <Matthieu.Moy@grenoble-inp.fr> writes:

> OTOH, having it leave in a subdirectory (e.g. $git/t/Sharness/), and
> synchronize with stg like subtree merge would be nice for the user. We
> already have something similar for gitk and git-gui, except that the
> synchronization is normally one way (subprojects merged into Git, but
> merging back changes that were made in git.git in these subprojects is
> more painful).

Not really.  contrib/git-subtree can really help with this.

                           -Dave

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-07-20 21:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-17  8:06 [ANNOUNCE] Sharness - Test library derived from Git Mathias Lafeldt
2012-07-17 18:31 ` Ævar Arnfjörð Bjarmason
2012-07-20 10:18   ` Mathias Lafeldt
2012-07-20 11:45     ` Matthieu Moy
2012-07-20 21:11       ` dag

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.