Commit 456e5218 by Edward Thomson

tests: add GITTEST_SLOW env var check

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.
parent bdb54214
...@@ -45,10 +45,9 @@ void test_odb_largefiles__write_from_memory(void) ...@@ -45,10 +45,9 @@ void test_odb_largefiles__write_from_memory(void)
cl_skip(); cl_skip();
#endif #endif
if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") ||
cl_skip(); !cl_is_env_set("GITTEST_INVASIVE_MEMORY") ||
!cl_is_env_set("GITTEST_SLOW"))
if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY"))
cl_skip(); cl_skip();
for (i = 0; i < (3041*126103); i++) for (i = 0; i < (3041*126103); i++)
...@@ -64,7 +63,8 @@ void test_odb_largefiles__streamwrite(void) ...@@ -64,7 +63,8 @@ void test_odb_largefiles__streamwrite(void)
{ {
git_oid expected, oid; 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(); cl_skip();
git_oid_fromstr(&expected, "3fb56989cca483b21ba7cb0a6edb229d10e1c26c"); git_oid_fromstr(&expected, "3fb56989cca483b21ba7cb0a6edb229d10e1c26c");
...@@ -82,10 +82,9 @@ void test_odb_largefiles__read_into_memory(void) ...@@ -82,10 +82,9 @@ void test_odb_largefiles__read_into_memory(void)
cl_skip(); cl_skip();
#endif #endif
if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") ||
cl_skip(); !cl_is_env_set("GITTEST_INVASIVE_MEMORY") ||
!cl_is_env_set("GITTEST_SLOW"))
if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY"))
cl_skip(); cl_skip();
writefile(&oid); writefile(&oid);
...@@ -103,10 +102,9 @@ void test_odb_largefiles__read_into_memory_rejected_on_32bit(void) ...@@ -103,10 +102,9 @@ void test_odb_largefiles__read_into_memory_rejected_on_32bit(void)
cl_skip(); cl_skip();
#endif #endif
if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE")) if (!cl_is_env_set("GITTEST_INVASIVE_FS_SIZE") ||
cl_skip(); !cl_is_env_set("GITTEST_INVASIVE_MEMORY") ||
!cl_is_env_set("GITTEST_SLOW"))
if (!cl_is_env_set("GITTEST_INVASIVE_MEMORY"))
cl_skip(); cl_skip();
writefile(&oid); writefile(&oid);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment