This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH BuildBot] Discard all glibc source changes from slaves
- From: "Tulio Magno Quites Machado Filho" <tuliom at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: roland at hack dot frob dot com
- Date: Tue, 29 Dec 2015 16:27:39 -0200
- Subject: [PATCH BuildBot] Discard all glibc source changes from slaves
- Authentication-results: sourceware.org; auth=none
Note 1:
I'm trying to fix what's happening with our ppc64 and x86_64 slaves
http://130.211.48.148:8080/builders/glibc-power8-linux/builds/530/steps/sync/logs/stdio
http://130.211.48.148:8080/builders/glibc-x86_64-linux/builds/971/steps/sync/logs/stdio
Note 2:
As this is changing the source code of the build master, I can't test it
myself.
8<-----
This is fixing 2 issues:
- If glibc source code get changed in the slave, the next build will not
run against an identical code from the master branch.
- There is also a change that a new build gets into the master branch
after the build master checked the source code. In that scenario,
the slave would build a commit ID that is not identical to the one
specified by the build master.
---
scripts/master/AnnotatedFactory.py | 3 +++
scripts/slave/glibc-native.sh | 3 ++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/master/AnnotatedFactory.py b/scripts/master/AnnotatedFactory.py
index bd9f924..a3b04c5 100644
--- a/scripts/master/AnnotatedFactory.py
+++ b/scripts/master/AnnotatedFactory.py
@@ -46,6 +46,9 @@ def getGlibcAnnotatedFactory(
selector_script = os.path.join('..', 'glibc-buildbot',
'scripts', 'slave', 'buildbot_selector.py')
+ # Export the commit ID to be built.
+ merged_env['REVISION'] = util.Property('revision')
+
# Run annotated command.
f.addStep(AnnotatedCommand(name='annotate',
description='annotate',
diff --git a/scripts/slave/glibc-native.sh b/scripts/slave/glibc-native.sh
index 3759011..e455989 100755
--- a/scripts/slave/glibc-native.sh
+++ b/scripts/slave/glibc-native.sh
@@ -40,7 +40,8 @@ end_step() {
do_sync() {
start_step sync
if [ -d "${src_dir}" ]; then
- (cd "${src_dir}" && git remote prune origin && git pull)
+ # Discard everything and get the commit specified by the build master.
+ (cd "${src_dir}" && git fetch -p origin && git reset --hard $REVISION)
else
git clone git://sourceware.org/git/glibc.git ${src_dir}
fi
--
2.1.0