Makes Scripts Fail Fast and Loud
This commit is contained in:
parent
46994e87be
commit
1d994da12b
@ -1,10 +1,15 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Runs the Static Analyzer on the code base.
|
# Runs the Static Analyzer on the code base.
|
||||||
# This is a wrapper intended to be used with like this:
|
# This is a wrapper intended to be used with like this:
|
||||||
# 1/ analyze cmake ..
|
# 1/ analyze cmake ..
|
||||||
# 2/ analyze cmake --build .
|
# 2/ analyze cmake --build .
|
||||||
|
|
||||||
|
|
||||||
exec scan-build -analyze-headers -no-failure-reports --keep-going --status-bugs \
|
exec scan-build -analyze-headers -no-failure-reports --keep-going --status-bugs \
|
||||||
-enable-checker alpha.core.BoolAssignment \
|
-enable-checker alpha.core.BoolAssignment \
|
||||||
-enable-checker alpha.core.IdenticalExpr \
|
-enable-checker alpha.core.IdenticalExpr \
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Automates bisecting cucumber tests in a portable way; usage:
|
# Automates bisecting cucumber tests in a portable way; usage:
|
||||||
#
|
#
|
||||||
# git bisect start GOODGITSHA BADGITSHA
|
# git bisect start GOODGITSHA BADGITSHA
|
||||||
@ -9,9 +13,6 @@
|
|||||||
# to /tmp, otherwise jumping through commits will change this script, too.
|
# to /tmp, otherwise jumping through commits will change this script, too.
|
||||||
|
|
||||||
|
|
||||||
# e: exit on first error, x: print commands
|
|
||||||
set -ex
|
|
||||||
|
|
||||||
BUILD_DIR=build
|
BUILD_DIR=build
|
||||||
|
|
||||||
cmake -E remove_directory $BUILD_DIR
|
cmake -E remove_directory $BUILD_DIR
|
||||||
|
@ -1,12 +1,14 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Runs the Clang Formatter in parallel on the code base.
|
# Runs the Clang Formatter in parallel on the code base.
|
||||||
# Return codes:
|
# Return codes:
|
||||||
# - 1 there are files to be formatted
|
# - 1 there are files to be formatted
|
||||||
# - 0 everything looks fine
|
# - 0 everything looks fine
|
||||||
|
|
||||||
set -eu -o pipefail
|
|
||||||
|
|
||||||
# Get CPU count
|
# Get CPU count
|
||||||
OS=$(uname)
|
OS=$(uname)
|
||||||
NPROC=1
|
NPROC=1
|
||||||
|
@ -1,3 +1,5 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
# here we set up the node version on the fly. currently only node 4, but can be used for more values if need be
|
# here we set up the node version on the fly. currently only node 4, but can be used for more values if need be
|
||||||
# This is done manually so that the build works the same on OS X
|
# This is done manually so that the build works the same on OS X
|
||||||
rm -rf ~/.nvm/ && git clone --depth 1 --branch v0.30.1 https://github.com/creationix/nvm.git ~/.nvm
|
rm -rf ~/.nvm/ && git clone --depth 1 --branch v0.30.1 https://github.com/creationix/nvm.git ~/.nvm
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Runs the Clang Modernizer in parallel on the code base.
|
# Runs the Clang Modernizer in parallel on the code base.
|
||||||
# Requires a compilation database in the build directory.
|
# Requires a compilation database in the build directory.
|
||||||
|
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Runs the Clang Tidy Tool in parallel on the code base.
|
# Runs the Clang Tidy Tool in parallel on the code base.
|
||||||
# Requires a compilation database in the build directory.
|
# Requires a compilation database in the build directory.
|
||||||
|
|
||||||
|
@ -1,4 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
TIMINGS_FILE=/tmp/osrm.timings
|
TIMINGS_FILE=/tmp/osrm.timings
|
||||||
NAME=$1
|
NAME=$1
|
||||||
|
@ -1,5 +1,9 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o pipefail
|
||||||
|
set -o nounset
|
||||||
|
|
||||||
# Note: once the subtree merge from this script has been committed and pushed to
|
# Note: once the subtree merge from this script has been committed and pushed to
|
||||||
# a branch do not attempt to rebase the branch back onto master or the subdirectory
|
# a branch do not attempt to rebase the branch back onto master or the subdirectory
|
||||||
# structure will be lost.
|
# structure will be lost.
|
||||||
|
Loading…
Reference in New Issue
Block a user