summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mageia.org>2020-03-25 22:29:13 +0000
committerPascal Terjan <pterjan@mageia.org>2020-03-25 22:29:13 +0000
commit0555e68c7c783e608eb36ad18558b43c5e1daf2c (patch)
tree26c61d35f009859efc8c12fc4c20bd16eff91f22
parenta93198ca0fb136b1f5d693d1a42eb59f420c7fad (diff)
downloadautobuild-0555e68c7c783e608eb36ad18558b43c5e1daf2c.tar
autobuild-0555e68c7c783e608eb36ad18558b43c5e1daf2c.tar.gz
autobuild-0555e68c7c783e608eb36ad18558b43c5e1daf2c.tar.bz2
autobuild-0555e68c7c783e608eb36ad18558b43c5e1daf2c.tar.xz
autobuild-0555e68c7c783e608eb36ad18558b43c5e1daf2c.zip
Update to what is currently running
-rwxr-xr-xautobuild.rb29
1 files 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
}