Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions docs/tools/bashrc-alice.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ alias root='root -l'
# Command "recompile O2Physics" will invoke "ninja install" for the "master" branch of O2Physics.
# Command "recompile O2Physics my-branch" will invoke "ninja install" for the "my-branch" branch of O2Physics.
# Command "recompile O2Physics my-branch Common" will invoke "ninja Common/install" for the "my-branch" branch of O2Physics.
# Command "recompile O2Physics my-branch Common -j 1" will invoke "ninja Common/install -j 1" for the "my-branch" branch of O2Physics.
recompile() {
# set -o xtrace # to print out each command
[ "$1" ] || { echo "Provide a package name"; return 1; }
Expand All @@ -27,6 +28,9 @@ recompile() {
target=""
target_name="all"
[ "$3" ] && { target="$3/"; target_name="$3"; }
shift
shift
shift
dir_pwd=$(pwd)
dir_build="$ALIBUILD_WORK_DIR/BUILD/${package}-latest-${branch}/${package}"
log="$(dirname "$dir_build")/log"
Expand All @@ -35,8 +39,11 @@ recompile() {
direnv allow || { echo "Failed to allow direnv"; return 1; }
eval "$(direnv export "$SHELL")"
echo "Recompiling ${package}_${branch}_${target_name}..."
if [[ -n "$*" ]]; then
echo "Additional options:" "$@"
fi
start=$(date +%s)
ninja "${target}install" > "$log" 2>&1
ninja "${target}install" "$@" > "$log" 2>&1
ec=$?
end=$(date +%s)
echo "Compilation exited with: $ec"
Expand All @@ -52,9 +59,9 @@ recompile() {
}

# Recompile O2 with ninja.
recompile-o2() { recompile "O2" "$1" "$2"; }
recompile-o2() { recompile "O2" "$@"; }
# Recompile O2Physics with ninja.
recompile-o2p() { recompile "O2Physics" "$1" "$2"; }
recompile-o2p() { recompile "O2Physics" "$@"; }

# Find the workflow that produces a given table.
# Limited functionality. Use find_dependencies.py for a full search.
Expand Down Expand Up @@ -82,5 +89,5 @@ debug-o2-compile() {
# Find runtime error messages in an execution log.
debug-o2-run() {
[ "$1" ] || { echo "Provide a log file"; return 1; }
grep -n -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " "$1"
grep -n -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " "$1"
}
2 changes: 1 addition & 1 deletion docs/troubleshooting/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ o2-analysis-... > stdout.log 2>&1
Search for keywords related to problems in the log file using the `grep` command:

```bash
grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " stdout.log
grep -e "\\[ERROR\\]" -e "\\[FATAL\\]" -e "\\[CRITICAL\\]" -e "segmentation" -e "Segmentation" -e "SEGMENTATION" -e "command not found" -e "Program crashed" -e "Error:" -e "Error in " -e "\\[WARN\\]" -e "Warning in " stdout.log
```

See also [shell rc utilities](../tools/README.md#shell-rc-utilities).
Expand Down
Loading