Skip to content

Commit ca759a9

Browse files
committed
[scripts/build] Include timestamps in logs by enabling Bash tracing
Example log line: ``` + 2019-11-17 17:49:34+00:00 make -j 2 target-files-package brillo_update_payload ```
1 parent 1b1ef47 commit ca759a9

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

scripts/build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ function build_external(){
7272
function build_platform(){
7373
cd "$base_dir"
7474
choosecombo "${build_type}" "aosp_${device}" "${build_variant}"
75-
make -j "${cores}" target-files-package brillo_update_payload
75+
(set -o xtrace; make -j "${cores}" target-files-package brillo_update_payload)
7676
cd -
7777
}
7878

scripts/environment

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ environment = {
4848
strftime('%m%d%H%M', gmtime(config['datetime'])),
4949
"KCONFIG_NOTIMESTAMP": 1,
5050
"RANDFILE": "%s/randfile.bin" % base_dir,
51-
"LC_ALL":"C"
51+
"LC_ALL":"C",
52+
"PS4": '+ $(date --rfc-3339=seconds) ',
5253
}
5354

5455
environment['BUILD_KERNEL'] = "true"

scripts/retry

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/bash
22
## Credits go to Samuel `sj26` Cochran, ref: https://gist.github.com/sj26/88e1c6584397bb7c13bd11108a579746
33

4-
set -o nounset -o pipefail -o errexit;
4+
set -o nounset -o pipefail -o errexit
55

66
[[ $# -le 1 ]] && { echo "Usage $0 <retry_number> <command>"; }
77

0 commit comments

Comments
 (0)