]> git.proxmox.com Git - ceph.git/blame - ceph/src/isa-l/tools/test_autorun.sh
Import ceph 15.2.8
[ceph.git] / ceph / src / isa-l / tools / test_autorun.sh
CommitLineData
f91f0fd5
TL
1#!/usr/bin/env bash
2
3set -e #exit on fail
4
5# Override defaults if exist
6READLINK=readlink
7command -V greadlink >/dev/null 2>&1 && READLINK=greadlink
8
9# Run in build directory
10out="$PWD"
11src=$($READLINK -f $(dirname $0))/..
12cd "$src"
13
14# Echo environment info
15if 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)
20fi
21if command -V uname >/dev/null 2>&1; then
22 node=$(uname -n)
23 os_name=$(uname -s)
24 os_all=$(uname -a)
25fi
26
27echo "Test report v1"
28echo "branch: $branch"
29echo "brief: $brief"
30echo "commitid: $commitid"
31echo "node: $node"
32echo "os_name: $os_name"
33echo "os_all: $os_all"
34echo "test_args: $@"
35echo "changes: $branch_changes"
36command -V lscpu > /dev/null 2>&1 && lscpu
37
38# Start tests
39
40[ -z "$1" ] && ./tools/test_checks.sh
41
42while [ -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
60done
61
62./tools/check_format.sh
63