Finally Getting To Really Test Styrene!

So after much scripting, I am finally getting to test and see if this thing actually works. It is currently attempting to automate the building of 2000+ Fedora 13 Update packages. I am completely aware and fully expecting there to be many packages that fail requiring manual, user intervention. I am hoping tho, however, that this tool helps to clear a bulk of the packages out of the way for our team. In addition, I will continue working on the visual component of it hopefully allowing our team to manually edit and customize builds. Maybe in the future this tool can attempt to automatically learn what specific fixes were applied to past packages and auto-apply them to future ones, who knows. Anyway, if you want to track the builds of any of our team members, you can run the following bash script below.

$ ./bcomp.sh fossjon 20110628

name:[liferea-1.6.5-1.fc13] date:[20110628]
name:[gwibber-3.0.0.1-2.fc13] date:[20110628]
name:[doxygen-1.7.3-1.fc13] date:[20110628]
name:[dovecot-1.2.17-1.fc13] date:[20110628]
name:[cups-1.4.6-1.fc13] date:[20110628]
name:[bash-completion-1.2-4.fc13] date:[20110628]
name:[NetworkManager-0.8.4-1.fc13] date:[20110628]
name:[dhcp-4.1.2-4.ESV.R2.fc13] date:[20110628]
...


#!/bin/bash
if [ "$1" == "" ]
then
	echo "Usage: $0 <account name> [start date]"
	exit 0
fi
x=0
s=0
if [ "$2" != "" ]
then
	s="$2"
fi
while true
do
	o=`curl -s "http://arm.koji.fedoraproject.org/koji/builds?userID=$1&order=-build_id&state=1&start=${x}" | tr -d '\t\r\n' | awk '{ gsub(/<tr/, "\n<tr"); print; }' | grep -i 'buildinfo?buildID=[0-9]*'`
	if [ "$o" == "" ]
	then
		break
	fi
	echo "$o" | while read l
	do
		p=`echo "$l" | sed -e 's@.*<td><a href="buildinfo?buildID=[0-9][0-9]*">\([^<][^<]*\)</a></td>.*@\1@g'`
		d=`echo "$l" | sed -e 's@.*<td>\([0-9][0-9][0-9][0-9]\)-\([0-9][0-9]\)-\([0-9][0-9]\) [0-9][0-9]:[0-9][0-9]:[0-9][0-9]</td>.*@\1\2\3@g'`
		q="name:[$p] date:[$d]"
		if [ $d -ge $s ]
		then
			echo "$q"
		fi
	done
	let x="$x + 50"
done

Advertisements
Finally Getting To Really Test Styrene!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s