Refactor tests/integration/run.sh (#1016)
This commit is contained in:
parent
7fb3f62703
commit
cf1a86ed13
17
.github/workflows/diff.yaml
vendored
17
.github/workflows/diff.yaml
vendored
@ -196,22 +196,7 @@ jobs:
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
cd tests/integration
|
||||
for name in *; do
|
||||
if [ ! -d $name ]; then continue; fi
|
||||
pushd $name >/dev/null
|
||||
echo "Running: $name"
|
||||
if [ -x prepare.sh ]; then
|
||||
./prepare.sh
|
||||
fi
|
||||
if [ -x runner.py ]; then
|
||||
./runner.py
|
||||
elif [ -x runner.sh ]; then
|
||||
./runner.sh
|
||||
fi
|
||||
echo
|
||||
popd >/dev/null
|
||||
done
|
||||
tests/integration/run.sh
|
||||
|
||||
- name: Run cppcheck and clang-format
|
||||
run: |
|
||||
|
17
.github/workflows/release_centos8.yaml
vendored
17
.github/workflows/release_centos8.yaml
vendored
@ -146,22 +146,7 @@ jobs:
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
cd tests/integration
|
||||
for name in *; do
|
||||
if [ ! -d $name ]; then continue; fi
|
||||
pushd $name >/dev/null
|
||||
echo "Running: $name"
|
||||
if [ -x prepare.sh ]; then
|
||||
./prepare.sh
|
||||
fi
|
||||
if [ -x runner.py ]; then
|
||||
./runner.py
|
||||
elif [ -x runner.sh ]; then
|
||||
./runner.sh
|
||||
fi
|
||||
echo
|
||||
popd >/dev/null
|
||||
done
|
||||
tests/integration/run.sh
|
||||
|
||||
- name: Run cppcheck and clang-format
|
||||
run: |
|
||||
|
17
.github/workflows/release_debian10.yaml
vendored
17
.github/workflows/release_debian10.yaml
vendored
@ -146,22 +146,7 @@ jobs:
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
cd tests/integration
|
||||
for name in *; do
|
||||
if [ ! -d $name ]; then continue; fi
|
||||
pushd $name >/dev/null
|
||||
echo "Running: $name"
|
||||
if [ -x prepare.sh ]; then
|
||||
./prepare.sh
|
||||
fi
|
||||
if [ -x runner.py ]; then
|
||||
./runner.py
|
||||
elif [ -x runner.sh ]; then
|
||||
./runner.sh
|
||||
fi
|
||||
echo
|
||||
popd >/dev/null
|
||||
done
|
||||
tests/integration/run.sh
|
||||
|
||||
- name: Run cppcheck and clang-format
|
||||
run: |
|
||||
|
17
.github/workflows/release_ubuntu2004.yaml
vendored
17
.github/workflows/release_ubuntu2004.yaml
vendored
@ -146,22 +146,7 @@ jobs:
|
||||
|
||||
- name: Run integration tests
|
||||
run: |
|
||||
cd tests/integration
|
||||
for name in *; do
|
||||
if [ ! -d $name ]; then continue; fi
|
||||
pushd $name >/dev/null
|
||||
echo "Running: $name"
|
||||
if [ -x prepare.sh ]; then
|
||||
./prepare.sh
|
||||
fi
|
||||
if [ -x runner.py ]; then
|
||||
./runner.py
|
||||
elif [ -x runner.sh ]; then
|
||||
./runner.sh
|
||||
fi
|
||||
echo
|
||||
popd >/dev/null
|
||||
done
|
||||
tests/integration/run.sh
|
||||
|
||||
- name: Run cppcheck and clang-format
|
||||
run: |
|
||||
|
1
tests/integration/audit/.gitignore
vendored
Normal file
1
tests/integration/audit/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
*.log
|
47
tests/integration/run.sh
Executable file
47
tests/integration/run.sh
Executable file
@ -0,0 +1,47 @@
|
||||
#!/bin/bash -e
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
|
||||
print_help() {
|
||||
echo -e "$0 => run all under tests/integration"
|
||||
echo -e "$0 folder_name => run single test under tests/integration"
|
||||
exit 1
|
||||
}
|
||||
|
||||
test_one() {
|
||||
cd "$DIR"
|
||||
integration_test_folder_name="$1"
|
||||
pushd "$integration_test_folder_name" >/dev/null
|
||||
echo "Running: $integration_test_folder_name"
|
||||
if [ -x prepare.sh ]; then
|
||||
./prepare.sh
|
||||
fi
|
||||
if [ -x runner.py ]; then
|
||||
./runner.py
|
||||
elif [ -x runner.sh ]; then
|
||||
./runner.sh
|
||||
fi
|
||||
echo
|
||||
popd >/dev/null
|
||||
}
|
||||
|
||||
test_all() {
|
||||
cd "$DIR"
|
||||
for name in *; do
|
||||
if [ ! -d "$name" ]; then continue; fi
|
||||
test_one "$name"
|
||||
done
|
||||
}
|
||||
|
||||
if [ "$#" -eq 0 ]; then
|
||||
test_all
|
||||
else
|
||||
if [ "$#" -gt 1 ]; then
|
||||
print_help
|
||||
else
|
||||
if [ -d "$DIR/$1" ]; then
|
||||
test_one "$1"
|
||||
else
|
||||
print_help
|
||||
fi
|
||||
fi
|
||||
fi
|
Loading…
Reference in New Issue
Block a user