diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2017-12-20 16:13:31 +0000 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2017-12-20 16:21:05 +0000 |
commit | 456e52189c95315028d668f9e508798d490765e2 (patch) | |
tree | e92c6a4ca367f9faf3c74957c0dd1e0b10216123 | |
parent | bdb542143909fc278c8ba89b0c64cdf72fcaf7d2 (diff) | |
download | libgit2-ethomson/large_loose_blobs.tar.gz |
tests: add GITTEST_SLOW env var checkethomson/large_loose_blobs
Writing very large files may be slow, particularly on inefficient
filesystems and when running instrumented code to detect invalid memory
accesses (eg within valgrind or similar tools).
Introduce `GITTEST_SLOW` so that tests that are slow can be skipped by
the CI system.
-rw-r--r-- | tests/odb/largefiles.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/tests/odb/largefiles.c b/tests/odb/largefiles.c index dc987c473..22f136df5 100644 --- a/tests/odb/largefiles.c +++ b/tests/odb/largefiles.c @@ -45,10 +45,9 @@ void test_odb_largefiles__write_from_memory(void) cl_skip(); #endif - if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) - cl_skip(); - - if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY")) + if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") || + !cl_is_env_set("GITTEST_INVASIVE_MEMORY") || + !cl_is_env_set("GITTEST_SLOW")) cl_skip(); for (i = 0; i < (3041*126103); i++) @@ -64,7 +63,8 @@ void test_odb_largefiles__streamwrite(void) { git_oid expected, oid; - if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) + if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") || + !cl_is_env_set("GITTEST_SLOW")) cl_skip(); git_oid_fromstr(&expected, "3fb56989cca483b21ba7cb0a6edb229d10e1c26c"); @@ -82,10 +82,9 @@ void test_odb_largefiles__read_into_memory(void) cl_skip(); #endif - if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) - cl_skip(); - - if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY")) + if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") || + !cl_is_env_set("GITTEST_INVASIVE_MEMORY") || + !cl_is_env_set("GITTEST_SLOW")) cl_skip(); writefile(&oid); @@ -103,10 +102,9 @@ void test_odb_largefiles__read_into_memory_rejected_on_32bit(void) cl_skip(); #endif - if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) - cl_skip(); - - if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY")) + if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") || + !cl_is_env_set("GITTEST_INVASIVE_MEMORY") || + !cl_is_env_set("GITTEST_SLOW")) cl_skip(); writefile(&oid); |