Bug 986627 - Find which builders have changed before/after a patch. r=catlee
authorArmen Zambrano Gasparnian <armenzg@mozilla.com>
Tue, 16 Sep 2014 11:06:15 -0400
changeset 451 eaeebcebdf07
parent 450 6b7e97400d4a
child 452 ecfc32463222
push id427
push userarmenzg@mozilla.com
push date2014-09-16 15:06 +0000
reviewerscatlee
bugs986627
Bug 986627 - Find which builders have changed before/after a patch. r=catlee
buildbot-related/list_builder_differences.sh
buildbot-related/pre_buildbot_master_requirements.txt
new file mode 100755
--- /dev/null
+++ b/buildbot-related/list_builder_differences.sh
@@ -0,0 +1,81 @@
+#!/bin/sh
+# Author:   Armen Zambrano Gasparnian
+# Purpose:  It lists the list of builders that get added/removed after
+#           a buildbot-configs patch
+# Usage:    ./list_builder_differences.sh -j path_to_patch_to_test.diff [-w alternative_workdir]
+#
+while getopts j:w: opts; do
+   case ${opts} in
+      j) patch_to_test=${OPTARG} ;;
+      w) workdir=${OPTARG} ;;
+   esac
+done
+
+if [ -z "$patch_to_test" ];
+then
+    echo "Please pass the path to the patch you want information about."
+    exit 1
+fi
+
+if [ -z "$workdir" ];
+then
+    workdir="$HOME/.mozilla/releng"
+fi
+
+venv="$workdir/venv"
+bconfigs="buildbot-configs"
+bcustom="buildbotcustom"
+bdump="braindump"
+bbot="buildbot"
+tools="tools"
+
+if [ ! -d "$workdir" ]
+then
+    mkdir $workdir
+fi
+
+for repo_name in $bconfigs $bcustom $bdump $bbot $tools
+do
+    if [ ! -d "$workdir/$repo_name" ]
+    then
+        hg clone http://hg.mozilla.org/build/$repo_name $workdir/$repo_name
+    else
+        cd $workdir/$repo_name
+        hg pull -u
+        hg up -C
+        cd -
+    fi
+done
+
+bconfigs="$workdir/$bconfigs"
+bcustom="$workdir/$bcustom"
+bdump="$workdir/$bdump"
+bbot="$workdir/$bbot"
+tools="$workdir/$tools"
+
+if [ ! -d $venv ]
+then
+    virtualenv $venv
+    /bin/bash -c ". $venv/bin/activate"
+    export PATH=$venv/bin:$PATH
+    #pip install pyOpenSSL
+    #pip install Twisted==10.1.0
+    pip install -r ~/repos/releng/braindump/buildbot-related/pre_buildbot_master_requirements.txt
+    cd $bbot/master
+    python setup.py install
+fi
+
+/bin/bash -c ". $venv/bin/activate"
+export PATH=$venv/bin:$PATH
+# So we can reach buildbotcustom
+export PYTHONPATH=$tools/lib/python:$workdir
+
+cd $bconfigs
+rm -rf test-output
+patch -p1 < $patch_to_test || exit
+$bdump/buildbot-related/dump_allthethings.sh $workdir/allthethings_with_patch.json
+hg up -C
+$bdump/buildbot-related/dump_allthethings.sh $workdir/allthethings_without_patch.json
+cd -
+$bdump/buildbot-related/diff_allthethings.py $workdir/allthethings_without_patch.json $workdir/allthethings_with_patch.json > differences.txt
+echo "Here's the file that contains your changes: differences.txt"
new file mode 100644
--- /dev/null
+++ b/buildbot-related/pre_buildbot_master_requirements.txt
@@ -0,0 +1,13 @@
+Jinja2==2.7.3
+MarkupSafe==0.23
+Twisted==10.1.0
+argparse==1.2.1
+cffi==0.8.6
+cryptography==0.5.4
+pyOpenSSL==0.14
+pyasn1==0.1.7
+pycparser==2.10
+pycrypto==2.6.1
+six==1.7.3
+wsgiref==0.1.2
+zope.interface==4.1.1