svn commit: r344727 - projects/fuse2/tests/sys/fs/fuse

Enji Cooper (yaneurabeya) yaneurabeya at gmail.com
Sat Mar 2 19:38:29 UTC 2019


> On Mar 2, 2019, at 08:28, Alan Somers <asomers at FreeBSD.org> wrote:
> 
> Author: asomers
> Date: Sat Mar  2 16:28:29 2019
> New Revision: 344727
> URL: https://svnweb.freebsd.org/changeset/base/344727
> 
> Log:
>  fuse(4) use a global environment check.
> 
>  This is marginally faster than using an environment check in each test case.
>  Also, if the global check fails then all of the tests are skipped.  Oddly,
>  it's not possible to skip a test in any other way.

I used incorrect terminology in my previous description, so I want to clarify my previous points.

* SetupEnvironment(..) is for test programs [1].
* SetUp(..) [test fixture] is for test cases.

All of these setup APIs have analogs, i.e., teardown APIs.

In the next version of GoogleTest, they are adding an API called `SetUpTestSuite(..)`, which will allow one to save state common in a test suite, instead of having to do it per test case. The new API makes sense for long running setup/teardown routines, like initializing a database (which a test suite will use) or network server, from scratch.

Cheers!
-Enji

1. This API isn’t documented on GitHub; I’ll submit a PR for it.


More information about the svn-src-projects mailing list