浏览代码

Update log data model with session and test identifiers

Alois Mahdal 6 年前
父节点
当前提交
2998fdd1c5
共有 3 个文件被更改,包括 5 次插入4 次删除
  1. 1
    1
      src/jinja2/html.j2
  2. 1
    1
      src/libexec/jattool-export.skel
  3. 3
    2
      src/python/jat.py

+ 1
- 1
src/jinja2/html.j2 查看文件

34
 <!doctype html>
34
 <!doctype html>
35
 <html>
35
 <html>
36
     <head>
36
     <head>
37
-        <title>JAT report {{ session.sessid }}</title>
37
+        <title>JAT report {{ session.id }}</title>
38
 
38
 
39
         <style type="text/css">
39
         <style type="text/css">
40
             body {
40
             body {

+ 1
- 1
src/libexec/jattool-export.skel 查看文件

43
         echo '    t = Template(tf.read())'
43
         echo '    t = Template(tf.read())'
44
         echo ''
44
         echo ''
45
         echo 'for session in sessions:'
45
         echo 'for session in sessions:'
46
-        echo '    with open(epath % session.sessid, "w") as ef:'
46
+        echo '    with open(epath % session.id, "w") as ef:'
47
         echo '        ef.write(t.render('
47
         echo '        ef.write(t.render('
48
         echo '            session=session'
48
         echo '            session=session'
49
         echo '        ))'
49
         echo '        ))'

+ 3
- 2
src/python/jat.py 查看文件

234
             raise ParsingError('unsupported log format: %s' % self._format)
234
             raise ParsingError('unsupported log format: %s' % self._format)
235
         self.jat_version = doc['jat_version']
235
         self.jat_version = doc['jat_version']
236
         self.start = doc['start']
236
         self.start = doc['start']
237
-        self.sessid = doc.get('sessid', 'noid')
237
+        self.id = doc.get('id', 'noid')
238
+        self.test = doc.get('test')
238
         self.finalized = doc.get('finalized', False)
239
         self.finalized = doc.get('finalized', False)
239
         self.end = doc.get('end')
240
         self.end = doc.get('end')
240
         self.lints = []
241
         self.lints = []
243
         self.eventtree = EventTree(self.eventlog._events)
244
         self.eventtree = EventTree(self.eventlog._events)
244
         self.lints += self.eventtree.lints
245
         self.lints += self.eventtree.lints
245
         if not self.finalized:
246
         if not self.finalized:
246
-            self.lints.append(Lint("session not finalized", self.sessid))
247
+            self.lints.append(Lint("session not finalized", self.id))
247
 
248
 
248
 def load(fpath):
249
 def load(fpath):
249
     with open(fpath) as ylog:
250
     with open(fpath) as ylog: