aboutsummaryrefslogtreecommitdiff
path: root/crosperf/test_flag.py
diff options
context:
space:
mode:
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]