Index: native_client_sdk/src/build_tools/buildbot_common.py |
diff --git a/native_client_sdk/src/build_tools/buildbot_common.py b/native_client_sdk/src/build_tools/buildbot_common.py |
index e1e29ddbddc7cbbab586dcdefc8bfb1107814f58..5275cd4ad8548ad930da1247f1a833402c62daf4 100644 |
--- a/native_client_sdk/src/build_tools/buildbot_common.py |
+++ b/native_client_sdk/src/build_tools/buildbot_common.py |
@@ -18,6 +18,22 @@ sys.path.append(os.path.join(SDK_SRC_DIR, 'tools')) |
import oshelpers |
+def IsSDKBuilder(): |
+ """Returns True if this script is running on an SDK builder. |
+ |
+ False means it is either running on a trybot, or a user's machine. |
+ |
+ Trybot names: |
+ naclsdkm-((pnacl-)?linux|mac|windows(32|64)) |
+ |
+ Builder names: |
+ (pnacl-)?(windows|mac|linux)-sdk-multi(rel)? |
+ |
+ except there are currently no pnacl multirel bots, and |
+ pnacl-windows-sdk-multi is actually called pnacl-win-sdk-multi.""" |
+ return '-sdk-multi' in os.getenv('BUILDBOT_BUILDERNAME', '') |
+ |
+ |
def ErrorExit(msg): |
"""Write and error to stderr, then exit with 1 signaling failure.""" |
sys.stderr.write(msg + '\n') |