瀏覽代碼

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

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

@@ -43,7 +43,7 @@ render_with_jinja() {
43 43
         echo '    t = Template(tf.read())'
44 44
         echo ''
45 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 47
         echo '        ef.write(t.render('
48 48
         echo '            session=session'
49 49
         echo '        ))'

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

@@ -234,7 +234,8 @@ class Session(object):
234 234
             raise ParsingError('unsupported log format: %s' % self._format)
235 235
         self.jat_version = doc['jat_version']
236 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 239
         self.finalized = doc.get('finalized', False)
239 240
         self.end = doc.get('end')
240 241
         self.lints = []
@@ -243,7 +244,7 @@ class Session(object):
243 244
         self.eventtree = EventTree(self.eventlog._events)
244 245
         self.lints += self.eventtree.lints
245 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 249
 def load(fpath):
249 250
     with open(fpath) as ylog: