Browse Source

Fix to r21104: redirect output to logfile before checking for stalled processes; otherwise no output in log

svn path=/trunk/; revision=21107
tags/stw2018
cri 8 years ago
parent
commit
afecfe2aea
3 changed files with 12 additions and 10 deletions
  1. 3
    3
      tools/build-test.sh
  2. 3
    3
      tools/build.sh
  3. 6
    4
      tools/build.sh.test.patch

+ 3
- 3
tools/build-test.sh View File

@@ -19,6 +19,9 @@ SVNUPERRFILE=/tmp/fsfe-test-svnup-err
# let's ensure we get English messages
export LANG=C

# Redirect output
exec 1> ${STATUS}/status.txt 2>&1

# If there is a build-test.pl script started more than 10 minutes ago, kill it and mail alarm
BUILD_STARTED=$(ps --no-headers -C build-test.pl -o etime | cut -c 7-8 | sort -r | head -n 1)
if [[ -n "$BUILD_STARTED" && "10#${BUILD_STARTED}" -gt 10 ]] ; then
@@ -37,9 +40,6 @@ if [[ -n "$BUILD_STARTED" && "10#${BUILD_STARTED}" -gt 10 ]] ; then
exit
fi

# Redirect output
exec 1> ${STATUS}/status.txt 2>&1

# If some build script is already running, don't run it.
if ps -C "build-df.sh,build-test.sh,build.sh" -o pid= | grep -q -v "$$"; then
echo "$(date) Another build script is currently running. Build postponed."

+ 3
- 3
tools/build.sh View File

@@ -19,6 +19,9 @@ SVNUPERRFILE=/tmp/fsfe-svnup-err
# let's ensure we get English messages
export LANG=C

# Redirect output
exec 1> ${STATUS}/status.txt 2>&1

# If there is a build.pl script started more than 10 minutes ago, kill it and mail alarm
BUILD_STARTED=$(ps --no-headers -C build.pl -o etime | cut -c 7-8 | sort -r | head -n 1)
if [[ -n "$BUILD_STARTED" && "10#${BUILD_STARTED}" -gt 10 ]] ; then
@@ -37,9 +40,6 @@ if [[ -n "$BUILD_STARTED" && "10#${BUILD_STARTED}" -gt 10 ]] ; then
exit
fi

# Redirect output
exec 1> ${STATUS}/status.txt 2>&1

# If some build script is already running, don't run it.
if ps -C "build-df.sh,build-test.sh,build.sh" -o pid= | grep -q -v "$$"; then
echo "$(date) Another build script is currently running. Build postponed."

+ 6
- 4
tools/build.sh.test.patch View File

@@ -1,6 +1,6 @@
--- build.sh 2011-09-25 21:55:14.000000000 +0200
+++ build-test.sh 2011-09-25 21:54:36.000000000 +0200
@@ -2,38 +2,38 @@
--- build.sh 2011-09-25 22:43:17.000000000 +0200
+++ build-test.sh 2011-09-25 22:43:35.000000000 +0200
@@ -2,18 +2,18 @@
# -----------------------------------------------------------------------------
# Web page build script
# -----------------------------------------------------------------------------
@@ -27,7 +27,9 @@
# Since we must grep for svn output messages,
# let's ensure we get English messages
export LANG=C
@@ -22,21 +22,21 @@
# Redirect output
exec 1> ${STATUS}/status.txt 2>&1
-# If there is a build.pl script started more than 10 minutes ago, kill it and mail alarm
-BUILD_STARTED=$(ps --no-headers -C build.pl -o etime | cut -c 7-8 | sort -r | head -n 1)

Loading…
Cancel
Save