diff options
author | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2021-08-27 11:32:09 +0100 |
---|---|---|
committer | Dan Goodliffe <dan.goodliffe@octal.co.uk> | 2021-08-27 11:32:09 +0100 |
commit | 30ba3d4f2f7ccda42879d118ce369a69fa89fe34 (patch) | |
tree | d56112715c0e3604ed60964b0d164d5c59c66b21 /bashrc | |
parent | Functions to support useful prompts (diff) | |
download | util-30ba3d4f2f7ccda42879d118ce369a69fa89fe34.tar.bz2 util-30ba3d4f2f7ccda42879d118ce369a69fa89fe34.tar.xz util-30ba3d4f2f7ccda42879d118ce369a69fa89fe34.zip |
Functions to run b2 build tests through various tools
Diffstat (limited to 'bashrc')
-rw-r--r-- | bashrc | 39 |
1 files changed, 36 insertions, 3 deletions
@@ -119,13 +119,46 @@ title() { echo -ne "\033]0;$@\007" } vg() { - valgrind \ + launcher=/tmp/$$.sh + cat << EOF > $launcher +valgrind \ --show-leak-kinds=all \ --suppressions=$HOME/dev/valgrind.suppressions \ --leak-check=full \ - --log-file=/var/tmp/vg.log \ - $@ + --log-file=/var/tmp/vg-\$(basename \$1).log \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher $@ + rm -f $launcher +} + +vgc() { + launcher=/tmp/$$.sh + cat << EOF > $launcher +valgrind \ + --tool=callgrind \ + --trace-children=no \ + --callgrind-out-file=/var/tmp/callgrind-\$(basename \$1).out \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher variant=release debug-symbols=on $@ + rm -f $launcher } + +str() { + launcher=/tmp/$$.sh + cat << EOF > $launcher +strace -s400 \ + -o /var/tmp/str-\$(basename \$1).out \ + \$@ +EOF + chmod +x $launcher + build testing.launcher=$launcher $@ + rm -f $launcher +} + build() { title "Build in progress" CCACHE_BASEDIR=$(git root) nice -n5 b2 -j$TASKS $@ |