summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorKevin Rocard <kevinx.rocard@intel.com>2014-04-23 19:27:28 +0200
committerMattijs Korpershoek <mattijsx.korpershoek@intel.com>2014-06-25 10:52:23 +0200
commit0b3ff885d8b82405e20476f2248523b806af9740 (patch)
tree4698afe979a20198ae26210e0abf0fb614148dce /tools
parent30095b3c0b84e85caf253a27e41254eaf35e4ca7 (diff)
downloadexternal_parameter-framework-0b3ff885d8b82405e20476f2248523b806af9740.zip
external_parameter-framework-0b3ff885d8b82405e20476f2248523b806af9740.tar.gz
external_parameter-framework-0b3ff885d8b82405e20476f2248523b806af9740.tar.bz2
Add log in case of failure
BZ: 189977 The hostDomainGenerator.sh script generates xml files a build time. Sometimes it fails but the log information are no sufficient to found the root cause. Add some log information in order to be able to find it. Change-Id: I505577ee30503dccf25375b0ea262461ec4cce14 Signed-off-by: Kevin Rocard <kevinx.rocard@intel.com> Signed-off-by: Mattijs Korpershoek <mattijsx.korpershoek@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/xmlGenerator/hostDomainGenerator.sh16
1 files changed, 13 insertions, 3 deletions
diff --git a/tools/xmlGenerator/hostDomainGenerator.sh b/tools/xmlGenerator/hostDomainGenerator.sh
index 47bfa82..1af42ba 100755
--- a/tools/xmlGenerator/hostDomainGenerator.sh
+++ b/tools/xmlGenerator/hostDomainGenerator.sh
@@ -45,11 +45,11 @@ then
shift
exec 1>/dev/null
else
- exec 1> >(sed 's/^/Info: /' >&2)
+ exec 1> >(sed "s/^/($$) Info: /" >&2)
fi
# Prefix all warning and error log lines and redirect them to stderr
-exec 5> >(sed 's/^/Warning: /' >&2)
-exec 2> >(sed 's/^/Error: /' >&2)
+exec 5> >(sed "s/^/($$) Warning: /" >&2)
+exec 2> >(sed "s/^/($$) Error: /" >&2)
# Get script arguments
PFWconfigurationFilePath="$1"; shift
@@ -91,6 +91,16 @@ export LD_LIBRARY_PATH="$HostRoot/lib:${LD_LIBRARY_PATH:-}"
# Setup clean trap, it will be called automatically on exit
clean_up () {
status=$?
+ set +e # An error should not abort clean up
+
+ ( if test $status -ne 0
+ then
+ echo "$0 is exiting on error, printing debug information."
+ echo "Test platform port: $TPSocket"
+ echo "PFW port: $PFWSocket"
+ netstat --program --all --numeric --extend --tcp
+ ps -ejHlf
+ fi ) >&5
# Exit the test-platform only if it was created by this process
if $TPCreated