Skip to content
Permalink
Browse files

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>
  • Loading branch information
sam-github authored and MylesBorins committed Jun 27, 2019
1 parent 4879b80 commit 4ae8d204cbb18829218e3987c8fd59803f4ccab0
Showing with 18 additions and 0 deletions.
  1. +10 −0 tools/getarch.py
  2. +4 −0 tools/getendian.py
  3. +3 −0 tools/getmachine.py
  4. +1 −0 tools/getnodeversion.py
@@ -0,0 +1,10 @@
from __future__ import print_function
from utils import GuessArchitecture
arch = GuessArchitecture()

# assume 64 bit unless set specifically
print(GuessArchitecture() \
.replace('ia32', 'x64') \
.replace('ppc', 'ppc64') \
.replace('arm', 'arm64') \
.replace('s390', 's390x'))
@@ -0,0 +1,4 @@
from __future__ import print_function
import sys
# "little" or "big"
print(sys.byteorder)
@@ -0,0 +1,3 @@
from __future__ import print_function
import platform
print(platform.machine())
@@ -1,3 +1,4 @@
from __future__ import print_function
import os
import re

0 comments on commit 4ae8d20

Please sign in to comment.
You can’t perform that action at this time.