From 0555e68c7c783e608eb36ad18558b43c5e1daf2c Mon Sep 17 00:00:00 2001 From: Pascal Terjan Date: Wed, 25 Mar 2020 22:29:13 +0000 Subject: Update to what is currently running --- autobuild.rb | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/autobuild.rb b/autobuild.rb index c52986c..35acf7e 100755 --- a/autobuild.rb +++ b/autobuild.rb @@ -124,8 +124,8 @@ def find_attributes(build_dir) end attr_line = '' - attr.keys.sort.each do |key| - attr_line = attr_line + ' ' + key.to_s + attr.keys.map{|key| key.to_s}.sort.each do |key| + attr_line = attr_line + ' ' + key end attr_line = attr_line.strip() return attr_line @@ -149,20 +149,25 @@ def insert_run(db, status_file) release = $3 result = $4 if result == 'rejected' then - next + next end result_id = get_or_add_resultvalue(db, result) package_id = get_or_add_package(db, name, version, release) - puts name - db.execute "INSERT INTO Results(Package, Run, Result) VALUES(#{package_id}, #{run_id}, #{result_id})" - + begin + next db.execute "INSERT INTO Results(Package, Run, Result) VALUES(#{package_id}, #{run_id}, #{result_id})" + rescue Exception => e + puts name + end # Store some interesting attributes about the build attr = find_attributes(File.dirname(status_file) + '/' + name + '-' + version + '-' + release + '.src.rpm') #puts "\t\t\tAttributes: " + attr if attr then - db.execute "INSERT INTO Attributes(Package, Run, Attr) VALUES(#{package_id}, #{run_id}, '#{attr}')" + begin + db.execute "INSERT INTO Attributes(Package, Run, Attr) VALUES(#{package_id}, #{run_id}, '#{attr}')" + rescue Exception => e + puts name + end end - } db.commit } @@ -210,11 +215,11 @@ def report(db) elsif (d[1] == "build_failure" || d[1] == "missing_dep" || d[1] == "install_deps_failure" || d[1] == "recreate_srpm_failure") failure += d[0] end - results[run_id]['success'] = success - results[run_id]['failure'] = failure - results[run_id]['total'] = total - results[run_id]['success_rate'] = (1000*success/(success+failure)).round.to_f/10 } + results[run_id]['success'] = success + results[run_id]['failure'] = failure + results[run_id]['total'] = total + results[run_id]['success_rate'] = (1000*success/(success+failure)).round.to_f/10 results[run_id].merge!(diff_runs(db, prev_run, run_id)) prev_run = run_id } -- cgit v1.2.1