diff options
author | Sam Roberts <vieuxtech@gmail.com> | 2019-06-27 14:39:15 -0700 |
---|---|---|
committer | Daniel Bevenius <daniel.bevenius@gmail.com> | 2019-07-02 06:08:03 +0200 |
commit | ed14aa6d512e682850a39b6081507c9970cf93c9 (patch) | |
tree | f6d9dd7971f8173cd12daab1882b31ec51f7e49a | |
parent | e669b8154cbf3bd5364b6b63321cbf615cc14fce (diff) | |
download | android-node-v8-ed14aa6d512e682850a39b6081507c9970cf93c9.tar.gz android-node-v8-ed14aa6d512e682850a39b6081507c9970cf93c9.tar.bz2 android-node-v8-ed14aa6d512e682850a39b6081507c9970cf93c9.zip |
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: https://github.com/nodejs/node/pull/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>
-rw-r--r-- | tools/getarch.py | 10 | ||||
-rw-r--r-- | tools/getendian.py | 4 | ||||
-rw-r--r-- | tools/getmachine.py | 3 | ||||
-rw-r--r-- | tools/getnodeversion.py | 1 |
4 files changed, 18 insertions, 0 deletions
diff --git a/tools/getarch.py b/tools/getarch.py new file mode 100644 index 0000000000..3c36652546 --- /dev/null +++ b/tools/getarch.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')) diff --git a/tools/getendian.py b/tools/getendian.py new file mode 100644 index 0000000000..0f9fcc1c86 --- /dev/null +++ b/tools/getendian.py @@ -0,0 +1,4 @@ +from __future__ import print_function +import sys +# "little" or "big" +print(sys.byteorder) diff --git a/tools/getmachine.py b/tools/getmachine.py new file mode 100644 index 0000000000..046d8b17a7 --- /dev/null +++ b/tools/getmachine.py @@ -0,0 +1,3 @@ +from __future__ import print_function +import platform +print(platform.machine()) diff --git a/tools/getnodeversion.py b/tools/getnodeversion.py index 59f8aabe49..c9f82160c0 100644 --- a/tools/getnodeversion.py +++ b/tools/getnodeversion.py @@ -1,3 +1,4 @@ +from __future__ import print_function import os import re |