[PATCH 2/2] t5319: add test for MIDX QSORT progress reporting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Add a test to verify that the multi-pack-index verify command shows
progress during the QSORT operation. Create 100 test objects, repack
them, and verify the progress reaches 100% during sorting 

Signed-off-by: Ayush Chandekar <ayu.chandekar@xxxxxxxxx>
---

This test makes sure the progress reaches 100%, but I couldn't find a way 
which could verify that the progress went from 0% to 100% with intermediates.
I would like if someone can suggest a method for this.

Thanks,
Ayush

 t/t5319-multi-pack-index.sh | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/t/t5319-multi-pack-index.sh b/t/t5319-multi-pack-index.sh
index 0f215ad2e8..d368e22e3a 100755
--- a/t/t5319-multi-pack-index.sh
+++ b/t/t5319-multi-pack-index.sh
@@ -658,6 +658,20 @@ test_expect_success 'verify incorrect 64-bit offset' '
 		"incorrect object offset"
 '
 
+test_expect_success 'verify shows QSORT progress' '
+	# Create test objects
+	for i in $(test_seq 1 100)
+	do
+		echo "content $i" | \
+			git hash-object -w --stdin \
+			|| return 1
+	done &&
+	git repack -ad &&
+	git multi-pack-index write &&
+	GIT_PROGRESS_DELAY=0 git multi-pack-index verify --progress 2>actual &&
+	grep "Sorting objects by packfile: *100%" actual
+'
+
 test_expect_success 'setup expire tests' '
 	mkdir dup &&
 	(
-- 
2.48.GIT





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux