зеркало из https://github.com/microsoft/git.git
fscache: add GIT_TEST_FSCACHE support
Add support to fscache to enable running the entire test suite with the fscache enabled. Signed-off-by: Ben Peart <benpeart@microsoft.com>
This commit is contained in:
Родитель
8fd2f5da84
Коммит
042b3f7d9e
|
@ -5,6 +5,7 @@
|
|||
#include "../../dir.h"
|
||||
#include "../../abspath.h"
|
||||
#include "../../trace.h"
|
||||
#include "config.h"
|
||||
|
||||
static int initialized;
|
||||
static volatile long enabled;
|
||||
|
@ -401,7 +402,11 @@ int fscache_enable(int enable)
|
|||
int result;
|
||||
|
||||
if (!initialized) {
|
||||
int fscache = git_env_bool("GIT_TEST_FSCACHE", -1);
|
||||
|
||||
/* allow the cache to be disabled entirely */
|
||||
if (fscache != -1)
|
||||
core_fscache = fscache;
|
||||
if (!core_fscache)
|
||||
return 0;
|
||||
|
||||
|
|
3
t/README
3
t/README
|
@ -512,6 +512,9 @@ a test and then fails then the whole test run will abort. This can help to make
|
|||
sure the expected tests are executed and not silently skipped when their
|
||||
dependency breaks or is simply not present in a new environment.
|
||||
|
||||
GIT_TEST_FSCACHE=<boolean> exercises the uncommon fscache code path
|
||||
which adds a cache below mingw's lstat and dirent implementations.
|
||||
|
||||
Naming Tests
|
||||
------------
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче