Commit 1e9649e0 by Calen Pennington Committed by GitHub

Merge pull request #13972 from cpennington/timer-logging

Add timer logging to jenkins test runs
parents 695e5c07 f5f64c03
...@@ -63,8 +63,9 @@ def timed(wrapped, instance, args, kwargs): # pylint: disable=unused-argument ...@@ -63,8 +63,9 @@ def timed(wrapped, instance, args, kwargs): # pylint: disable=unused-argument
log_message.update(exception_info) log_message.update(exception_info)
try: try:
if not exists(dirname(log_path)): log_dir = dirname(log_path)
os.makedirs(dirname(log_path)) if log_dir and not exists(log_dir):
os.makedirs(log_dir)
with open(log_path, 'a') as outfile: with open(log_path, 'a') as outfile:
json.dump( json.dump(
......
...@@ -63,3 +63,8 @@ echo "npm version is `npm --version`" ...@@ -63,3 +63,8 @@ echo "npm version is `npm --version`"
# (In this case, remove it. That ensures from run-to-run, it is a clean npm environment) # (In this case, remove it. That ensures from run-to-run, it is a clean npm environment)
echo "--> Cleaning npm cache" echo "--> Cleaning npm cache"
npm cache clean npm cache clean
# Log any paver or ansible command timing
TIMESTAMP=$(date +%s)
export PAVER_TIMER_LOG="test_root/log/timing.paver.$TIMESTAMP.log"
export ANSIBLE_TIMER_LOG="test_root/log/timing.ansible.$TIMESTAMP.log"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment