Skip to content
This repository was archived by the owner on Sep 27, 2019. It is now read-only.

Commit 23e1005

Browse files
authored
Merge pull request #1127 from schedutron/scripts
Lint Python files and port them to Python3
2 parents b7a035b + a8ee625 commit 23e1005

File tree

7 files changed

+377
-315
lines changed

7 files changed

+377
-315
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
language: c++
2+
python: 3.6
23
matrix:
34
fast_finish: true
45

@@ -141,7 +142,7 @@ install:
141142

142143
before_script:
143144
# first, run source_validator
144-
- python ./script/validators/source_validator.py
145+
- python script/validators/source_validator.py
145146

146147
# build peloton (override this value to execute tests)
147148
script:

Jenkinsfile

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ pipeline {
1414
}
1515
steps {
1616
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
17-
sh 'python ./script/validators/source_validator.py'
17+
sh 'python script/validators/source_validator.py'
1818
sh 'mkdir build'
1919
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
2020
sh 'cd build && make check -j4 || true'
@@ -30,7 +30,7 @@ pipeline {
3030
agent { docker { image 'ubuntu:xenial' } }
3131
steps {
3232
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
33-
sh 'python ./script/validators/source_validator.py'
33+
sh 'python script/validators/source_validator.py'
3434
sh 'mkdir build'
3535
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
3636
sh 'cd build && make check -j4 || true'
@@ -45,7 +45,7 @@ pipeline {
4545
agent { docker { image 'ubuntu:trusty' } }
4646
steps {
4747
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
48-
sh 'python ./script/validators/source_validator.py'
48+
sh 'python script/validators/source_validator.py'
4949
sh 'mkdir build'
5050
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
5151
sh 'cd build && make check -j4 || true'
@@ -60,7 +60,7 @@ pipeline {
6060
agent { docker { image 'ubuntu:trusty' } }
6161
steps {
6262
sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
63-
sh 'python ./script/validators/source_validator.py'
63+
sh 'python script/validators/source_validator.py'
6464
sh 'mkdir build'
6565
sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
6666
sh 'cd build && make check -j4 || true'
@@ -85,7 +85,7 @@ pipeline {
8585
// agent { docker { image 'debian:stretch' } }
8686
// steps {
8787
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
88-
// sh 'python ./script/validators/source_validator.py'
88+
// sh 'python script/validators/source_validator.py'
8989
// sh 'mkdir build'
9090
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
9191
// sh 'cd build && make check -j4 || true'
@@ -100,7 +100,7 @@ pipeline {
100100
// agent { docker { image 'debian:stretch' } }
101101
// steps {
102102
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
103-
// sh 'python ./script/validators/source_validator.py'
103+
// sh 'python script/validators/source_validator.py'
104104
// sh 'mkdir build'
105105
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
106106
// sh 'cd build && make check -j4 || true'
@@ -115,7 +115,7 @@ pipeline {
115115
// agent { docker { image 'fedora:26' } }
116116
// steps {
117117
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
118-
// sh 'python ./script/validators/source_validator.py'
118+
// sh 'python script/validators/source_validator.py'
119119
// sh 'mkdir build'
120120
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Debug -DUSE_SANITIZER=Address -DCOVERALLS=False .. && make -j4'
121121
// sh 'cd build && make check -j4 || true'
@@ -130,7 +130,7 @@ pipeline {
130130
// agent { docker { image 'fedora:26' } }
131131
// steps {
132132
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
133-
// sh 'python ./script/validators/source_validator.py'
133+
// sh 'python script/validators/source_validator.py'
134134
// sh 'mkdir build'
135135
// sh 'cd build && cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
136136
// sh 'cd build && make check -j4 || true'
@@ -175,7 +175,7 @@ pipeline {
175175
// agent { docker { image 'centos:7' } }
176176
// steps {
177177
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
178-
// sh 'python ./script/validators/source_validator.py'
178+
// sh 'python script/validators/source_validator.py'
179179
// sh 'mkdir build'
180180
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
181181
// sh 'cd build && make check -j4 || true'
@@ -190,7 +190,7 @@ pipeline {
190190
// agent { docker { image 'centos:7' } }
191191
// steps {
192192
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
193-
// sh 'python ./script/validators/source_validator.py'
193+
// sh 'python script/validators/source_validator.py'
194194
// sh 'mkdir build'
195195
// sh 'cd build && cmake3 -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
196196
// sh 'cd build && make check -j4 || true'
@@ -207,7 +207,7 @@ pipeline {
207207
// agent { docker { image 'ubuntu:xenial' } }
208208
// steps {
209209
// sh 'sudo /bin/bash -c "source ./peloton/script/installation/packages.sh"'
210-
// sh 'python ./script/validators/source_validator.py'
210+
// sh 'python script/validators/source_validator.py'
211211
// sh 'mkdir build'
212212
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4 && make install'
213213
// }
@@ -217,7 +217,7 @@ pipeline {
217217
// agent { docker { image 'ubuntu:xenial' } }
218218
// steps {
219219
// sh 'sudo /bin/bash -c "source ./peloton/script/installation/packages.sh"'
220-
// sh 'python ./script/validators/source_validator.py'
220+
// sh 'python script/validators/source_validator.py'
221221
// sh 'mkdir build'
222222
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4 && make install'
223223
// }
@@ -227,7 +227,7 @@ pipeline {
227227
// agent { docker { image 'ubuntu:trusty' } }
228228
// steps {
229229
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
230-
// sh 'python ./script/validators/source_validator.py'
230+
// sh 'python script/validators/source_validator.py'
231231
// sh 'mkdir build'
232232
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
233233
// }
@@ -237,7 +237,7 @@ pipeline {
237237
// agent { docker { image 'ubuntu:trusty' } }
238238
// steps {
239239
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
240-
// sh 'python ./script/validators/source_validator.py'
240+
// sh 'python script/validators/source_validator.py'
241241
// sh 'mkdir build'
242242
// sh 'cd build && CC=clang-3.7 CXX=clang++-3.7 cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
243243
// }
@@ -247,7 +247,7 @@ pipeline {
247247
// agent { docker { image 'fedora:26' } }
248248
// steps {
249249
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
250-
// sh 'python ./script/validators/source_validator.py'
250+
// sh 'python script/validators/source_validator.py'
251251
// sh 'mkdir build'
252252
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
253253
// }
@@ -257,7 +257,7 @@ pipeline {
257257
// agent { docker { image 'fedora:26' } }
258258
// steps {
259259
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
260-
// sh 'python ./script/validators/source_validator.py'
260+
// sh 'python script/validators/source_validator.py'
261261
// sh 'mkdir build'
262262
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
263263
// }
@@ -267,7 +267,7 @@ pipeline {
267267
// agent { docker { image 'fedora:27' } }
268268
// steps {
269269
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
270-
// sh 'python ./script/validators/source_validator.py'
270+
// sh 'python script/validators/source_validator.py'
271271
// sh 'mkdir build'
272272
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Debug -DCOVERALLS=False .. && make -j4'
273273
// }
@@ -277,7 +277,7 @@ pipeline {
277277
// agent { docker { image 'fedora:27' } }
278278
// steps {
279279
// sh 'sudo /bin/bash -c "source ./script/installation/packages.sh"'
280-
// sh 'python ./script/validators/source_validator.py'
280+
// sh 'python script/validators/source_validator.py'
281281
// sh 'mkdir build'
282282
// sh 'cd build && CC=clang CXX=clang++ cmake -DCMAKE_BUILD_TYPE=Release -DCOVERALLS=False .. && make -j4'
283283
// }

0 commit comments

Comments
 (0)