##// END OF EJS Templates
ci: run --pyoxidized tests on Windows...
Matt Harbison -
r48635:9261326d stable
parent child Browse files
Show More
@@ -1,178 +1,188 b''
1 1 stages:
2 2 - tests
3 3 - phabricator
4 4
5 5 image: registry.heptapod.net/mercurial/ci-images/mercurial-core:$HG_CI_IMAGE_TAG
6 6
7 7 variables:
8 8 PYTHON: python
9 9 TEST_HGMODULEPOLICY: "allow"
10 10 HG_CI_IMAGE_TAG: "latest"
11 11 TEST_HGTESTS_ALLOW_NETIO: "0"
12 12
13 13 .all_template: &all
14 14 when: always
15 15
16 16 .runtests_template: &runtests
17 17 <<: *all
18 18 stage: tests
19 19 # The runner made a clone as root.
20 20 # We make a new clone owned by user used to run the step.
21 21 before_script:
22 22 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
23 23 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
24 24 - cd /tmp/mercurial-ci/
25 25 - ls -1 tests/test-check-*.* > /tmp/check-tests.txt
26 26 - black --version
27 27 - clang-format --version
28 28 script:
29 29 - echo "python used, $PYTHON"
30 30 - echo "$RUNTEST_ARGS"
31 31 - HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" "$PYTHON" tests/run-tests.py --color=always $RUNTEST_ARGS
32 32
33 33 checks-py2:
34 34 <<: *runtests
35 35 variables:
36 36 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
37 37
38 38 checks-py3:
39 39 <<: *runtests
40 40 variables:
41 41 RUNTEST_ARGS: "--time --test-list /tmp/check-tests.txt"
42 42 PYTHON: python3
43 43
44 44 rust-cargo-test-py2: &rust_cargo_test
45 45 <<: *all
46 46 stage: tests
47 47 script:
48 48 - echo "python used, $PYTHON"
49 49 - make rust-tests
50 50
51 51 rust-cargo-test-py3:
52 52 stage: tests
53 53 <<: *rust_cargo_test
54 54 variables:
55 55 PYTHON: python3
56 56
57 57 phabricator-refresh:
58 58 <<: *all
59 59 stage: phabricator
60 60 variables:
61 61 DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)"
62 62 STABLE_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\n⚠ This patch is intended for stable ⚠\n{image https://media.giphy.com/media/nYI8SmmChYXK0/source.gif}"
63 63 script:
64 64 - |
65 65 if [ `hg branch` == "stable" ]; then
66 66 ./contrib/phab-refresh-stack.sh --comment "$STABLE_COMMENT";
67 67 else
68 68 ./contrib/phab-refresh-stack.sh --comment "$DEFAULT_COMMENT";
69 69 fi
70 70
71 71 test-py2:
72 72 <<: *runtests
73 73 variables:
74 74 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
75 75 TEST_HGMODULEPOLICY: "c"
76 76 TEST_HGTESTS_ALLOW_NETIO: "1"
77 77
78 78 test-py3:
79 79 <<: *runtests
80 80 variables:
81 81 RUNTEST_ARGS: " --no-rust --blacklist /tmp/check-tests.txt"
82 82 PYTHON: python3
83 83 TEST_HGMODULEPOLICY: "c"
84 84 TEST_HGTESTS_ALLOW_NETIO: "1"
85 85
86 86 test-py2-pure:
87 87 <<: *runtests
88 88 variables:
89 89 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
90 90 TEST_HGMODULEPOLICY: "py"
91 91
92 92 test-py3-pure:
93 93 <<: *runtests
94 94 variables:
95 95 RUNTEST_ARGS: "--pure --blacklist /tmp/check-tests.txt"
96 96 PYTHON: python3
97 97 TEST_HGMODULEPOLICY: "py"
98 98
99 99 test-py2-rust:
100 100 <<: *runtests
101 101 variables:
102 102 HGWITHRUSTEXT: cpython
103 103 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
104 104 TEST_HGMODULEPOLICY: "rust+c"
105 105
106 106 test-py3-rust:
107 107 <<: *runtests
108 108 variables:
109 109 HGWITHRUSTEXT: cpython
110 110 RUNTEST_ARGS: "--rust --blacklist /tmp/check-tests.txt"
111 111 PYTHON: python3
112 112 TEST_HGMODULEPOLICY: "rust+c"
113 113
114 114 test-py3-rhg:
115 115 <<: *runtests
116 116 variables:
117 117 HGWITHRUSTEXT: cpython
118 118 RUNTEST_ARGS: "--rust --rhg --blacklist /tmp/check-tests.txt"
119 119 PYTHON: python3
120 120 TEST_HGMODULEPOLICY: "rust+c"
121 121
122 122 test-py2-chg:
123 123 <<: *runtests
124 124 variables:
125 125 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
126 126 TEST_HGMODULEPOLICY: "c"
127 127
128 128 test-py3-chg:
129 129 <<: *runtests
130 130 variables:
131 131 PYTHON: python3
132 132 RUNTEST_ARGS: "--blacklist /tmp/check-tests.txt --chg"
133 133 TEST_HGMODULEPOLICY: "c"
134 134
135 135 check-pytype-py3:
136 136 extends: .runtests_template
137 137 before_script:
138 138 - hg clone . /tmp/mercurial-ci/ --noupdate --config phases.publish=no
139 139 - hg -R /tmp/mercurial-ci/ update `hg log --rev '.' --template '{node}'`
140 140 - cd /tmp/mercurial-ci/
141 141 - make local PYTHON=$PYTHON
142 142 - $PYTHON -m pip install --user -U pytype==2021.04.15
143 143 variables:
144 144 RUNTEST_ARGS: " --allow-slow-tests tests/test-check-pytype.t"
145 145 PYTHON: python3
146 146 TEST_HGMODULEPOLICY: "c"
147 147
148 148 # `sh.exe --login` sets a couple of extra environment variables that are defined
149 149 # in the MinGW shell, but switches CWD to /home/$username. The previous value
150 150 # is stored in OLDPWD. Of the added variables, MSYSTEM is crucial to running
151 151 # run-tests.py- it is needed to make run-tests.py generate a `python3` script
152 152 # that satisfies the various shebang lines and delegates to `py -3`.
153 153 .window_runtests_template: &windows_runtests
154 154 <<: *all
155 155 stage: tests
156 156 before_script:
157 157 - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && ls -1 tests/test-check-*.* > C:/Temp/check-tests.txt'
158 158 # TODO: find/install cvs, bzr, perforce, gpg, sqlite3
159 159
160 160 script:
161 161 - echo "Entering script section"
162 162 - echo "python used, $Env:PYTHON"
163 163 - Invoke-Expression "$Env:PYTHON -V"
164 164 - Invoke-Expression "$Env:PYTHON -m black --version"
165 165 - echo "$Env:RUNTEST_ARGS"
166 166 - echo "$Env:TMP"
167 167 - echo "$Env:TEMP"
168 168
169 169 - C:/MinGW/msys/1.0/bin/sh.exe --login -c 'cd "$OLDPWD" && HGTESTS_ALLOW_NETIO="$TEST_HGTESTS_ALLOW_NETIO" HGMODULEPOLICY="$TEST_HGMODULEPOLICY" $PYTHON tests/run-tests.py --color=always $RUNTEST_ARGS'
170 170
171 171 windows-py3:
172 172 <<: *windows_runtests
173 173 tags:
174 174 - windows
175 175 variables:
176 176 TEST_HGMODULEPOLICY: "c"
177 177 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt"
178 178 PYTHON: py -3
179
180 windows-py3-pyox:
181 <<: *windows_runtests
182 when: manual
183 tags:
184 - windows
185 variables:
186 TEST_HGMODULEPOLICY: "c"
187 RUNTEST_ARGS: "--blacklist C:/Temp/check-tests.txt --pyoxidized"
188 PYTHON: py -3
General Comments 0
You need to be logged in to leave comments. Login now