summaryrefslogtreecommitdiff
path: root/suite/api_test.py
diff options
context:
space:
mode:
authornegasora <negasora@gmail.com>2018-06-07 20:27:27 -0400
committerRyan Snyder <ryan@vector35.com>2018-07-10 18:10:57 -0400
commit8028bd325bc94a385f99122d87ac906ba717ecbf (patch)
treec8607ebf40c1dc97113f316897cfaa0d5cc2cce3 /suite/api_test.py
parent838cb56a8505fc78d09befedd58dd632eeb2ee62 (diff)
updated unit tests with descriptive output
move logging endpoint to environment variable
Diffstat (limited to 'suite/api_test.py')
-rw-r--r--suite/api_test.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/suite/api_test.py b/suite/api_test.py
index a162d26a..f6468941 100644
--- a/suite/api_test.py
+++ b/suite/api_test.py
@@ -259,6 +259,8 @@ class TimingTest(unittest.TestCase):
if os.path.exists(temp_name):
os.unlink(temp_name)
- time_s = time.time() - start_time
- commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[:-1]
- conn = urllib.urlopen("https://script.google.com/macros/s/AKfycbxrZtlgLaWt3l95_7RyH9ceDdFIBm0VaR6jG1-4UDt6CFFCFzQ/exec?BuildID=%s&Test1=%.2f" % (commit, time_s))
+ log_url = os.environ.get('BINJA_LOG_URL')
+ if log_url:
+ time_s = time.time() - start_time
+ commit = subprocess.check_output(["git", "rev-parse", "HEAD"])[:-1]
+ conn = urllib.urlopen("%s?BuildID=%s&Test1=%.2f" % (log_url, commit, time_s))