comparison tests/test-stablesort-branchpoint.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
20 > echo "=== checking $node ==="; 20 > echo "=== checking $node ===";
21 > hg log --rev "($seen) and $node::"; 21 > hg log --rev "($seen) and $node::";
22 > seen="${seen}+${node}"; 22 > seen="${seen}+${node}";
23 > done; 23 > done;
24 > } 24 > }
25
26 $ cat << EOF >> random_rev.py
27 > import random
28 > import sys
29 >
30 > loop = int(sys.argv[1])
31 > var = int(sys.argv[2])
32 > for x in range(loop):
33 > print(x + random.randint(0, var))
34 > EOF
35 25
36 Basic tests 26 Basic tests
37 =========== 27 ===========
38 (no criss cross merge) 28 (no criss cross merge)
39 29
665 added 1 changesets with 0 changes to 0 files 655 added 1 changesets with 0 changes to 0 files
666 new changesets 1ea73414a91b 656 new changesets 1ea73414a91b
667 updating to branch default 657 updating to branch default
668 0 files updated, 0 files merged, 0 files removed, 0 files unresolved 658 0 files updated, 0 files merged, 0 files removed, 0 files unresolved
669 $ cd recursion_random 659 $ cd recursion_random
670 $ for x in `python ../random_rev.py 15 5`; do 660 $ for x in `python "$TESTDIR/testlib/random-revs.py" 15 5`; do
671 > # using python to benefit from the random seed 661 > # using python to benefit from the random seed
672 > hg pull -r $x --quiet 662 > hg pull -r $x --quiet
673 > done; 663 > done;
674 $ hg pull --quiet 664 $ hg pull --quiet
675 $ hg showsort --rev 'all()' > ../multiple.random.order 665 $ hg showsort --rev 'all()' > ../multiple.random.order