mirror of
https://github.com/clearlinux/swupd-client.git
synced 2026-08-23 22:46:03 +00:00
34 lines
740 B
Bash
Executable File
34 lines
740 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# shellcheck disable=SC1090,SC1091
|
|
# SC1091: Not following, SC couldn't follow the dynamic path
|
|
# We already process that file, so it's fine to ignore
|
|
SCRIPT_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
source "$SCRIPT_PATH/../functional/testlib.bash"
|
|
|
|
set -e
|
|
|
|
#Check if there's no dupicated test
|
|
list_tests --all| cut -f 1 -d ':'|sort -cu
|
|
|
|
last_lbl=""
|
|
last_num=0
|
|
for t in $(list_tests --all| cut -f 1 -d ':'|sort); do
|
|
lbl=$(echo "$t" | cut -b 1-3)
|
|
num=$(echo "$t" | cut -b 4-6)
|
|
if [ "$last_lbl" != "$lbl" ]; then
|
|
last_lbl="$lbl"
|
|
last_num=0
|
|
fi
|
|
|
|
last_num=$((last_num + 1))
|
|
if [ "$last_num" -ne "$num" ]; then
|
|
echo "Test $t has an incorrect number"
|
|
exit 1
|
|
fi
|
|
done
|
|
|
|
echo "All tests have valid IDs."
|
|
|
|
exit 0
|