Skip to content

Commit 4ae8d20

Browse files
sam-githubMylesBorins
authored andcommittedDec 17, 2019
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 <riclau@uk.ibm.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent 4879b80 commit 4ae8d20

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)
Please sign in to comment.