Skip to content

Commit

Permalink
tools: move python code out of jenkins shell
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
sam-github authored and BethGriggs committed Nov 19, 2019
1 parent 7066335 commit 7ff19be
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tools/getarch.py
Original file line number Diff line number Diff line change
@@ -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'))
4 changes: 4 additions & 0 deletions tools/getendian.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from __future__ import print_function
import sys
# "little" or "big"
print(sys.byteorder)
3 changes: 3 additions & 0 deletions tools/getmachine.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from __future__ import print_function
import platform
print(platform.machine())
1 change: 1 addition & 0 deletions tools/getnodeversion.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from __future__ import print_function
import os
import re

Expand Down

0 comments on commit 7ff19be

Please sign in to comment.