mirror of
				https://github.com/ARM-software/workload-automation.git
				synced 2025-11-04 09:02:12 +00:00 
			
		
		
		
	output_processors/postgresql: Add missing system_id field
				
					
				
			When storing the `TargetInfo` the `system_id` attribute was ommited.
This commit is contained in:
		@@ -968,7 +968,8 @@ class RunDatabaseOutput(DatabaseOutput, RunOutputCommon):
 | 
			
		||||
    def _db_targetfile(self):
 | 
			
		||||
        columns = ['os', 'is_rooted', 'target', 'abi', 'cpus', 'os_version',
 | 
			
		||||
                   'hostid', 'hostname', 'kernel_version', 'kernel_release',
 | 
			
		||||
                   'kernel_sha1', 'kernel_config', 'sched_features',
 | 
			
		||||
                   'kernel_sha1', 'kernel_config', 'sched_features', 'page_size_kb',
 | 
			
		||||
                   'system_id', 'screen_resolution', 'prop', 'android_id',
 | 
			
		||||
                   '_pod_version', '_pod_serialization_version']
 | 
			
		||||
        tables = ['targets']
 | 
			
		||||
        conditions = ['targets.run_oid = \'{}\''.format(self.oid)]
 | 
			
		||||
 
 | 
			
		||||
@@ -24,6 +24,7 @@ try:
 | 
			
		||||
except ImportError as e:
 | 
			
		||||
    psycopg2 = None
 | 
			
		||||
    import_error_msg = e.args[0] if e.args else str(e)
 | 
			
		||||
 | 
			
		||||
from devlib.target import KernelVersion, KernelConfig
 | 
			
		||||
 | 
			
		||||
from wa import OutputProcessor, Parameter, OutputProcessorError
 | 
			
		||||
@@ -88,8 +89,8 @@ class PostgresqlResultProcessor(OutputProcessor):
 | 
			
		||||
                      "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
 | 
			
		||||
        "update_run": "UPDATE Runs SET event_summary=%s, status=%s, timestamp=%s, end_time=%s, duration=%s, state=%s WHERE oid=%s;",
 | 
			
		||||
        "create_job": "INSERT INTO Jobs (oid, run_oid, status, retry, label, job_id, iterations, workload_name, metadata, _pod_version, _pod_serialization_version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s);",
 | 
			
		||||
        "create_target": "INSERT INTO Targets (oid, run_oid, target, cpus, os, os_version, hostid, hostname, abi, is_rooted, kernel_version, kernel_release, kernel_sha1, kernel_config, sched_features, page_size_kb, screen_resolution, prop, android_id, _pod_version, _pod_serialization_version) "
 | 
			
		||||
                         "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
 | 
			
		||||
        "create_target": "INSERT INTO Targets (oid, run_oid, target, cpus, os, os_version, hostid, hostname, abi, is_rooted, kernel_version, kernel_release, kernel_sha1, kernel_config, sched_features, page_size_kb, system_id, screen_resolution, prop, android_id, _pod_version, _pod_serialization_version) "
 | 
			
		||||
                         "VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
 | 
			
		||||
        "create_event": "INSERT INTO Events (oid, run_oid, job_oid, timestamp, message, _pod_version, _pod_serialization_version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s",
 | 
			
		||||
        "create_artifact": "INSERT INTO Artifacts (oid, run_oid, job_oid, name, large_object_uuid, description, kind, _pod_version, _pod_serialization_version) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s)",
 | 
			
		||||
        "create_metric": "INSERT INTO Metrics (oid, run_oid, job_oid, name, value, units, lower_is_better, _pod_version, _pod_serialization_version) VALUES (%s, %s, %s, %s, %s, %s , %s, %s, %s)",
 | 
			
		||||
@@ -205,6 +206,7 @@ class PostgresqlResultProcessor(OutputProcessor):
 | 
			
		||||
                target_info.kernel_config,
 | 
			
		||||
                target_pod['sched_features'],
 | 
			
		||||
                target_pod['page_size_kb'],
 | 
			
		||||
                target_pod['system_id'],
 | 
			
		||||
                # Android Specific
 | 
			
		||||
                list(target_pod.get('screen_resolution', [])),
 | 
			
		||||
                target_pod.get('prop'),
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user