summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatarzyna Gorska <k.gorska@samsung.com>2018-10-03 11:34:58 (GMT)
committerKatarzyna Gorska <k.gorska@samsung.com>2018-11-22 12:17:06 (GMT)
commit63da454f4bb52a83a026d683f180f241727987d5 (patch)
tree2cb76885952b42803509deb7dfde4fd0dc2b93c1
parenteceead4cd10ad5b801780452676e4052b40c4b2d (diff)
downloadhost-63da454f4bb52a83a026d683f180f241727987d5.zip
host-63da454f4bb52a83a026d683f180f241727987d5.tar.gz
host-63da454f4bb52a83a026d683f180f241727987d5.tar.bz2
Add show_alllogs modifiedrefs/changes/36/190536/4
show_alllogs author: Adam Malinowski modifications author: Katarzyna Górska show_alllogs can be used to show all logs concerning given build and target. Modifications prevent logs flood when run from any directory and without arguments. Change-Id: Ie1fe92fb02613a7f091fc25f1b28bc778c09938a Signed-off-by: Katarzyna Gorska <k.gorska@samsung.com>
-rw-r--r--util/aliases24
1 files changed, 24 insertions, 0 deletions
diff --git a/util/aliases b/util/aliases
index a0ac661..a8ea5d1 100644
--- a/util/aliases
+++ b/util/aliases
@@ -137,3 +137,27 @@ thanos_snap() {
# remove unneeded /dev/sd* files
ls -alF /dev/sd* | awk '$0 !~ /^b/{print $NF}' | xargs sudo rm
}
+
+# show_alllogs displays logs for given expression (build_nr, device, etc...)
+show_alllogs() {
+ local target_logs=/var/tmp/tl-runner-"$1"
+ if [ $# -ne 2 ] || [ ! -d $target_logs ]; then
+ echo "Wrong arguments provided"
+ echo "Example: show_alllogs odroid 123456"
+ echo "Example: show_alllogs odroid odroid_1"
+ echo "Possible targets: $TARGET_LIST"
+ else
+ exp="$2"
+ cd $target_logs
+
+ for f in $(grep -l -s "$exp" * | xargs ls -tr); do
+ echo
+ echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;
+ echo -n ":: "
+ stat -c "%n %y" $f;
+ echo :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::;
+ cat $f;
+ done
+ cd -
+ fi
+}