aboutsummaryrefslogtreecommitdiff
path: root/crosperf/test_flag.py
diff options
context:
space:
mode:
authorAhmad Sharif <asharif@chromium.org>2012-12-20 12:09:49 -0800
committerAhmad Sharif <asharif@chromium.org>2012-12-20 12:09:49 -0800
commit4467f004e7f0854963bec90daff1879fbd9d2fec (patch)
treeaac36caa6279aa532e2d6234e50ee812f2db0c8d /crosperf/test_flag.py
parentf395c26437cbdabc2960447fba89b226f4409e82 (diff)
downloadtoolchain-utils-4467f004e7f0854963bec90daff1879fbd9d2fec.tar.gz
Synced repos to: 64740
Diffstat (limited to 'crosperf/test_flag.py')
-rw-r--r--crosperf/test_flag.py16
1 files changed, 16 insertions, 0 deletions
diff --git a/crosperf/test_flag.py b/crosperf/test_flag.py
new file mode 100644
index 00000000..613138b2
--- /dev/null
+++ b/crosperf/test_flag.py
@@ -0,0 +1,16 @@
+#!/usr/bin/python
+#
+# Copyright 2011 Google Inc. All Rights Reserved.
+
+"""A global variable for testing."""
+
+
+_is_test = [False]
+
+
+def SetTestMode(flag):
+ _is_test[0] = flag
+
+
+def GetTestMode():
+ return _is_test[0]