aboutsummaryrefslogtreecommitdiff
path: root/wa
diff options
context:
space:
mode:
authorMarc Bonnici <marc.bonnici@arm.com>2018-10-31 14:33:37 +0000
committersetrofim <setrofim@gmail.com>2018-12-07 09:55:17 +0000
commit423882a8e6cde8d071e06e4f548a84b9e4dee67d (patch)
tree303c1d08a744e49aa26222a6d77935873c3ed7c8 /wa
parent86287831b3d687b8d7d24c2f2b5e3cdc8cf3c8a9 (diff)
output_processors/postgres: Update target info to use POD representation
Instead of taking values directly when storing target information use the POD representation to allow for restoring the state.
Diffstat (limited to 'wa')
-rw-r--r--wa/output_processors/postgresql.py23
1 files changed, 12 insertions, 11 deletions
diff --git a/wa/output_processors/postgresql.py b/wa/output_processors/postgresql.py
index c237ee2a..9866d2b5 100644
--- a/wa/output_processors/postgresql.py
+++ b/wa/output_processors/postgresql.py
@@ -171,26 +171,27 @@ class PostgresqlResultProcessor(OutputProcessor):
run_output.metadata))
self.target_uuid = uuid.uuid4()
target_info = context.target_info
+ target_pod = target_info.to_pod()
self.cursor.execute(
self.sql_command['create_target'],
(
self.target_uuid,
self.run_uuid,
- target_info.target,
- target_info.cpus,
- target_info.os,
- target_info.os_version,
- target_info.hostid,
- target_info.hostname,
- target_info.abi,
- target_info.is_rooted,
+ target_pod['target'],
+ target_pod['cpus'],
+ target_pod['os'],
+ target_pod['os_version'],
+ target_pod['hostid'],
+ target_pod['hostname'],
+ target_pod['abi'],
+ target_pod['is_rooted'],
# Important caveat: kernel_version is the name of the column in the Targets table
# However, this refers to kernel_version.version, not to kernel_version as a whole
- target_info.kernel_version.version,
- target_info.kernel_version.release,
+ target_pod['kernel_version'],
+ target_pod['kernel_release'],
target_info.kernel_version.sha1,
target_info.kernel_config,
- target_info.sched_features))
+ target_pod['sched_features']))
# Commit cursor commands
self.conn.commit()