ci: avoid building from the same commit in parallel
[git.git] / t / perf / p0071-sort.sh
blobae4ddac8640c1aa8dd8e2ddd9babe01cb8cdbcf7
1 #!/bin/sh
3 test_description='Basic sort performance tests'
4 . ./perf-lib.sh
6 test_perf_default_repo
8 test_expect_success 'setup' '
9 git ls-files --stage "*.[ch]" "*.sh" |
10 cut -f2 -d" " |
11 git cat-file --batch >unsorted
14 test_perf 'sort(1) unsorted' '
15 sort <unsorted >sorted
18 test_expect_success 'reverse' '
19 sort -r <unsorted >reversed
22 for file in sorted reversed
24 test_perf "sort(1) $file" "
25 sort <$file >actual
27 done
29 for file in unsorted sorted reversed
32 test_perf "string_list_sort() $file" "
33 test-tool string-list sort <$file >actual
36 test_expect_success "string_list_sort() $file sorts like sort(1)" "
37 test_cmp_bin sorted actual
39 done
41 for file in unsorted sorted reversed
43 test_perf "DEFINE_LIST_SORT $file" "
44 test-tool mergesort sort <$file >actual
47 test_expect_success "DEFINE_LIST_SORT $file sorts like sort(1)" "
48 test_cmp_bin sorted actual
50 done
52 test_done