comparison tests/test-stablesort.t @ 5611:11b8f7003713

tests: move ad-hoc random_rev.py to testlib/random-revs.py
author Anton Shestakov <av6@dwimlabs.net>
date Sat, 24 Oct 2020 23:47:01 +0800
parents 57030b9d71c3
children 6576f6bb644b
comparison
equal deleted inserted replaced
5610:57030b9d71c3 5611:11b8f7003713
21 > echo "=== checking $node ==="; 21 > echo "=== checking $node ===";
22 > hg log --rev "($seen) and $node::"; 22 > hg log --rev "($seen) and $node::";
23 > seen="${seen}+${node}"; 23 > seen="${seen}+${node}";
24 > done; 24 > done;
25 > } 25 > }
26
27 $ cat << EOF >> random_rev.py
28 > import random
29 > import sys
30 >
31 > loop = int(sys.argv[1])
32 > var = int(sys.argv[2])
33 > for x in range(loop):
34 > print(x + random.randint(0, var))
35 > EOF
36 26
37 Basic tests 27 Basic tests
38 =========== 28 ===========
39 (no criss cross merge) 29 (no criss cross merge)
40 30
820 added 1 changesets with 0 changes to 0 files 810 added 1 changesets with 0 changes to 0 files
821 new changesets 1ea73414a91b 811 new changesets 1ea73414a91b
822 updating to branch default 812 updating to branch default
823 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 813 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
824 $ cd recursion_random 814 $ cd recursion_random
825 $ for x in `python ../random_rev.py 15 5`; do 815 $ for x in `python "$TESTDIR/testlib/random-revs.py" 15 5`; do
826 > # using python to benefit from the random seed 816 > # using python to benefit from the random seed
827 > hg pull -r $x --quiet 817 > hg pull -r $x --quiet
828 > done; 818 > done;
829 $ hg pull --quiet 819 $ hg pull --quiet
830 $ hg showsort --rev 'all()' > ../multiple.random.order 820 $ hg showsort --rev 'all()' > ../multiple.random.order