Commit 1b4ba8443fe3029b7fbebce67d231cc4dd62be88

Etienne Samson 2019-01-11T11:53:54

ci: enable some of the invasive testcases

diff --git a/ci/test.ps1 b/ci/test.ps1
index ed09633..107de6f 100644
--- a/ci/test.ps1
+++ b/ci/test.ps1
@@ -51,6 +51,16 @@ Write-Host "####################################################################
 
 run_test offline
 
+if (-not $Env:SKIP_INVASIVE_TESTS) {
+	Write-Host ""
+	Write-Host "##############################################################################"
+	Write-Host "## Running (invasive) tests"
+	Write-Host "##############################################################################"
+
+	$Env:GITTEST_INVASIVE_FS_SIZE=1
+	run_test invasive
+}
+
 if (-not $Env:SKIP_ONLINE_TESTS) {
 	Write-Host ""
 	Write-Host "##############################################################################"
diff --git a/ci/test.sh b/ci/test.sh
index f3bf190..bc6c83e 100755
--- a/ci/test.sh
+++ b/ci/test.sh
@@ -136,6 +136,20 @@ if [ -z "$SKIP_OFFLINE_TESTS" ]; then
 	run_test offline
 fi
 
+if [ -z "$SKIP_INVASIVE_TESTS" ]; then
+	echo ""
+	echo "Running invasive tests"
+	echo ""
+
+	export GITTEST_INVASIVE_FS_SIZE=1
+	export GITTEST_INVASIVE_MEMORY=1
+	export GITTEST_INVASIVE_SPEED=1
+	run_test invasive
+	unset GITTEST_INVASIVE_FS_SIZE
+	unset GITTEST_INVASIVE_MEMORY
+	unset GITTEST_INVASIVE_SPEED
+fi
+
 if [ -z "$SKIP_ONLINE_TESTS" ]; then
 	# Run the various online tests.  The "online" test suite only includes the
 	# default online tests that do not require additional configuration.  The
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 9502504..4b01436 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -55,6 +55,7 @@ IF (MSVC_IDE)
 ENDIF ()
 
 ADD_TEST(offline   "${libgit2_BINARY_DIR}/libgit2_clar" -v -xonline)
+ADD_TEST(invasive  "${libgit2_BINARY_DIR}/libgit2_clar" -v -score::ftruncate -sfilter::stream -sodb::largefiles -siterator::workdir -srepo::init)
 ADD_TEST(online    "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline)
 ADD_TEST(gitdaemon "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push)
 ADD_TEST(ssh       "${libgit2_BINARY_DIR}/libgit2_clar" -v -sonline::push -sonline::clone::ssh_cert -sonline::clone::ssh_with_paths)