Mercurial > evolve
comparison tests/test-stablesort-criss-cross.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 |
---|---|
18 > echo "=== checking $node ==="; | 18 > echo "=== checking $node ==="; |
19 > hg log --rev "($seen) and $node::"; | 19 > hg log --rev "($seen) and $node::"; |
20 > seen="${seen}+${node}"; | 20 > seen="${seen}+${node}"; |
21 > done; | 21 > done; |
22 > } | 22 > } |
23 | |
24 $ cat << EOF >> random_rev.py | |
25 > import random | |
26 > import sys | |
27 > | |
28 > loop = int(sys.argv[1]) | |
29 > var = int(sys.argv[2]) | |
30 > for x in range(loop): | |
31 > print(x + random.randint(0, var)) | |
32 > EOF | |
33 | 23 |
34 Check criss cross merge | 24 Check criss cross merge |
35 ======================= | 25 ======================= |
36 | 26 |
37 $ hg init crisscross_A | 27 $ hg init crisscross_A |
818 added 1 changesets with 0 changes to 0 files | 808 added 1 changesets with 0 changes to 0 files |
819 new changesets 1ea73414a91b | 809 new changesets 1ea73414a91b |
820 updating to branch default | 810 updating to branch default |
821 0 files updated, 0 files merged, 0 files removed, 0 files unresolved | 811 0 files updated, 0 files merged, 0 files removed, 0 files unresolved |
822 $ cd crisscross_random | 812 $ cd crisscross_random |
823 $ for x in `python ../random_rev.py 50 44`; do | 813 $ for x in `python "$TESTDIR/testlib/random-revs.py" 50 44`; do |
824 > # using python to benefit from the random seed | 814 > # using python to benefit from the random seed |
825 > hg pull -r $x --quiet | 815 > hg pull -r $x --quiet |
826 > done; | 816 > done; |
827 $ hg pull --quiet | 817 $ hg pull --quiet |
828 | 818 |