summaryrefslogtreecommitdiff
path: root/t/perf/p7519-fsmonitor.sh
diff options
context:
space:
mode:
authorNipunn Koorapati <nipunn@dropbox.com>2020-10-26 19:32:44 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-10-26 23:39:33 (GMT)
commitbb7cc7e754d1d7dc5d68977bcb565dd78f4592d5 (patch)
treed802f5566818eedbb1ee0c13b220bbc1ef833bd5 /t/perf/p7519-fsmonitor.sh
parent2bfa953e5daf3253cc5fae2de2c68fbd206dfe12 (diff)
downloadgit-bb7cc7e754d1d7dc5d68977bcb565dd78f4592d5.zip
git-bb7cc7e754d1d7dc5d68977bcb565dd78f4592d5.tar.gz
git-bb7cc7e754d1d7dc5d68977bcb565dd78f4592d5.tar.bz2
t/perf/fsmonitor: separate one time repo initialization
In preparation for testing multiple fsmonitor hooks Signed-off-by: Nipunn Koorapati <nipunn@dropbox.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/perf/p7519-fsmonitor.sh')
-rwxr-xr-xt/perf/p7519-fsmonitor.sh19
1 files changed, 11 insertions, 8 deletions
diff --git a/t/perf/p7519-fsmonitor.sh b/t/perf/p7519-fsmonitor.sh
index fb20fe0..2375501 100755
--- a/t/perf/p7519-fsmonitor.sh
+++ b/t/perf/p7519-fsmonitor.sh
@@ -68,7 +68,7 @@ then
fi
fi
-test_expect_success "setup for fsmonitor" '
+test_expect_success "one time repo setup" '
# set untrackedCache depending on the environment
if test -n "$GIT_PERF_7519_UNTRACKED_CACHE"
then
@@ -88,6 +88,16 @@ test_expect_success "setup for fsmonitor" '
git config core.splitIndex "$GIT_PERF_7519_SPLIT_INDEX"
fi &&
+ mkdir 1_file 10_files 100_files 1000_files 10000_files &&
+ for i in $(test_seq 1 10); do touch 10_files/$i; done &&
+ for i in $(test_seq 1 100); do touch 100_files/$i; done &&
+ for i in $(test_seq 1 1000); do touch 1000_files/$i; done &&
+ for i in $(test_seq 1 10000); do touch 10000_files/$i; done &&
+ git add 1_file 10_files 100_files 1000_files 10000_files &&
+ git commit -m "Add files"
+'
+
+test_expect_success "setup for fsmonitor" '
# set INTEGRATION_SCRIPT depending on the environment
if test -n "$GIT_PERF_7519_FSMONITOR"
then
@@ -115,13 +125,6 @@ test_expect_success "setup for fsmonitor" '
git config core.fsmonitor "$INTEGRATION_SCRIPT" &&
git update-index --fsmonitor &&
- mkdir 1_file 10_files 100_files 1000_files 10000_files &&
- for i in $(test_seq 1 10); do touch 10_files/$i; done &&
- for i in $(test_seq 1 100); do touch 100_files/$i; done &&
- for i in $(test_seq 1 1000); do touch 1000_files/$i; done &&
- for i in $(test_seq 1 10000); do touch 10000_files/$i; done &&
- git add 1_file 10_files 100_files 1000_files 10000_files &&
- git commit -m "Add files" &&
git status # Warm caches
'