Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Merge pull request #208 from dminor/bug-1092383-fix
Browse files Browse the repository at this point in the history
Bug 1092383 - Support touch command on flame-kk builds
  • Loading branch information
Jonathan Griffin committed Nov 7, 2014
2 parents b772792 + a5dc447 commit c072578
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion certsuite/adb_b2g.py
@@ -1,4 +1,5 @@
import ConfigParser
import datetime
import os
import posixpath
import re
Expand Down Expand Up @@ -153,7 +154,15 @@ def wait_for_device_ready(self, timeout=None, wait_polling_interval=None, after_
current_date = int(self.shell_output('date +\"%s\"'))
set_date = current_date - (365 * 24 * 3600 + 24 * 3600 + 3600 + 60 + 1)

self.shell_output("touch -t %i %s" % (set_date, prefs_file))
try:
self.shell_output("touch -t %i %s" % (set_date, prefs_file))
except adb.ADBError:
# See Bug 1092383, the format for the touch command
# has changed for flame-kk builds.
set_date = datetime.datetime.fromtimestamp(set_date)
self.shell_output("touch -t %s %s" %
(set_date.strftime('%Y%m%d.%H%M%S'),
prefs_file))

def prefs_modified():
times = [None, None]
Expand Down

0 comments on commit c072578

Please sign in to comment.