~checkbox-dev/checkbox/trunk

« back to all changes in this revision

Viewing changes to providers/plainbox-provider-checkbox/bin/gpu_test

  • Committer: Daniel Manrique
  • Author(s): Po-Hsu Lin
  • Date: 2014-05-22 13:58:44 UTC
  • mfrom: (3020.2.1 checkbox)
  • Revision ID: daniel_manrique-20140522135844-1xoj3rwk4z4zibft
"automatic merge by tarmac [r=roadmr][bug=1321995][author=cypressyew]"

Show diffs side-by-side

added added

removed removed

Lines of Context:
140
140
 
141
141
def check_gpu(log=None):
142
142
    if not log:
143
 
        log = '/var/log/kern.log'
144
 
    with open(log, 'rb') as f:
145
 
        if re.findall(r'gpu\s+hung', str(f.read()), flags=re.I):
146
 
            print("GPU hung Detected")
147
 
            return 1
 
143
        log = subprocess.check_output(['dmesg'], universal_newlines=True)
 
144
    if re.findall(r'gpu\s+hung', log, flags=re.I):
 
145
        print("GPU hung Detected")
 
146
        return 1
148
147
 
149
148
 
150
149
def main():