Skip to content

Commit 40ae2a6

Browse files
sam-githubtargos
authored andcommitted
tools: move python code out of jenkins shell
https://ci.nodejs.org/job/node-test-commit-v8-linux/configure echoes python code into tools and runs it. Move these scripts into tools for better maintainability. Once this lands and is back-ported into LTS branches a bunch of shell code can be deleted from the job. PR-URL: #28458 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Michael Dawson <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent d38b985 commit 40ae2a6

File tree

4 files changed

+18
-0
lines changed

4 files changed

+18
-0
lines changed

tools/getarch.py

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
from __future__ import print_function
2+
from utils import GuessArchitecture
3+
arch = GuessArchitecture()
4+
5+
# assume 64 bit unless set specifically
6+
print(GuessArchitecture() \
7+
.replace('ia32', 'x64') \
8+
.replace('ppc', 'ppc64') \
9+
.replace('arm', 'arm64') \
10+
.replace('s390', 's390x'))

tools/getendian.py

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
from __future__ import print_function
2+
import sys
3+
# "little" or "big"
4+
print(sys.byteorder)

tools/getmachine.py

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from __future__ import print_function
2+
import platform
3+
print(platform.machine())

tools/getnodeversion.py

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
from __future__ import print_function
12
import os
23
import re
34

0 commit comments

Comments
 (0)