]>
Commit | Line | Data |
---|---|---|
f91f0fd5 TL |
1 | #!/usr/bin/env bash |
2 | ||
3 | set -e #exit on fail | |
4 | ||
5 | # Override defaults if exist | |
6 | READLINK=readlink | |
7 | command -V greadlink >/dev/null 2>&1 && READLINK=greadlink | |
8 | ||
9 | # Run in build directory | |
10 | out="$PWD" | |
11 | src=$($READLINK -f $(dirname $0))/.. | |
12 | cd "$src" | |
13 | ||
14 | # Echo environment info | |
15 | if test -d .git; then | |
16 | branch=$(git describe --always) | |
17 | commitid=$(git rev-parse HEAD) | |
18 | brief=$(git log -1 --format='%s') | |
19 | branch_changes=$(git diff --shortstat) | |
20 | fi | |
21 | if command -V uname >/dev/null 2>&1; then | |
22 | node=$(uname -n) | |
23 | os_name=$(uname -s) | |
24 | os_all=$(uname -a) | |
25 | fi | |
26 | ||
27 | echo "Test report v1" | |
28 | echo "branch: $branch" | |
29 | echo "brief: $brief" | |
30 | echo "commitid: $commitid" | |
31 | echo "node: $node" | |
32 | echo "os_name: $os_name" | |
33 | echo "os_all: $os_all" | |
34 | echo "test_args: $@" | |
35 | echo "changes: $branch_changes" | |
36 | command -V lscpu > /dev/null 2>&1 && lscpu | |
37 | ||
38 | # Start tests | |
39 | ||
40 | [ -z "$1" ] && ./tools/test_checks.sh | |
41 | ||
42 | while [ -n "$1" ]; do | |
43 | case "$1" in | |
44 | check ) | |
45 | ./tools/test_checks.sh | |
46 | shift ;; | |
47 | ext ) | |
48 | ./tools/test_extended.sh | |
49 | shift ;; | |
50 | format ) | |
51 | shift ;; | |
52 | all ) | |
53 | ./tools/test_checks.sh | |
54 | ./tools/test_extended.sh | |
55 | shift ;; | |
56 | * ) | |
57 | echo $0 undefined option: $1 | |
58 | shift ;; | |
59 | esac | |
60 | done | |
61 | ||
62 | ./tools/check_format.sh | |
63 |