[buildbot] phase1: move cleanup.sh script out of build/ subdir
LEDE Commits
lede-commits at lists.infradead.org
Tue Jan 9 06:35:35 PST 2018
jow pushed a commit to buildbot.git, branch master:
https://git.lede-project.org/14cd42c5b9448d63296cfa4bbb572c43b5d2b180
commit 14cd42c5b9448d63296cfa4bbb572c43b5d2b180
Author: Jo-Philipp Wich <jo at mein.io>
AuthorDate: Tue Jan 9 15:33:04 2018 +0100
phase1: move cleanup.sh script out of build/ subdir
When cleanup.sh itself is placed into the build/ subdir, subsequent Git()
source steps will fail with a directory not empty error.
Signed-off-by: Jo-Philipp Wich <jo at mein.io>
---
phase1/cleanup.sh | 9 ++++++---
phase1/master.cfg | 4 +++-
2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/phase1/cleanup.sh b/phase1/cleanup.sh
index f2d0bcc..4260958 100755
--- a/phase1/cleanup.sh
+++ b/phase1/cleanup.sh
@@ -60,7 +60,7 @@ if [ "$current_mode" = full ]; then
exit 1
fi
- for build_dir in ../../*; do
+ for build_dir in ../*; do
build_dir="$(readlink -f "$build_dir")"
@@ -86,14 +86,17 @@ if [ "$current_mode" = full ]; then
)
done
-) 200>../../cleanup.lock
+) 200>../cleanup.lock
#
# Clean up current build
#
else
- do_cleanup
+ if [ -d build ]; then (
+ cd build
+ do_cleanup
+ ); fi
fi
exit 0
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 8f53f9d..94bbfad 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -404,7 +404,7 @@ for target in targets:
# cleanup.sh if needed
factory.addStep(FileDownload(
mastersrc = "cleanup.sh",
- slavedest = "cleanup.sh",
+ slavedest = "../cleanup.sh",
mode = 0755,
doStepIf = IsCleanupRequested))
@@ -412,6 +412,7 @@ for target in targets:
name = "cleanold",
description = "Cleaning previous builds",
command = ["./cleanup.sh", c['buildbotURL'], WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "full"],
+ workdir = ".",
haltOnFailure = True,
doStepIf = IsCleanupRequested,
timeout = 2400))
@@ -420,6 +421,7 @@ for target in targets:
name = "cleanup",
description = "Cleaning work area",
command = ["./cleanup.sh", c['buildbotURL'], WithProperties("%(slavename)s"), WithProperties("%(buildername)s"), "single"],
+ workdir = ".",
haltOnFailure = True,
doStepIf = IsCleanupRequested,
timeout = 2400))
More information about the lede-commits
mailing list