6c0aacfd46
Add echo to explain what this test does. Change-Id: I7c43c287125e70b7dc89deeed22bf6a9208b4c54
14 lines
466 B
Bash
Executable File
14 lines
466 B
Bash
Executable File
#!/bin/bash
|
|
|
|
T=$(mktemp -d)
|
|
trap "rm -rf $T" EXIT
|
|
|
|
channels_file=${1:-gerritbot/channels.yaml}
|
|
|
|
# strip comments so that output can be compared meaningfully
|
|
(printf "# This file is sorted alphabetically by channel name.\n"; sed '/^[[:space:]]*#.*$/d;s/[[:space:]]*#.*$//' gerritbot/channels.yaml) > $T/comments-removed
|
|
./tools/normalize_channels_yaml.py >$T/regenned
|
|
|
|
echo "Checking whether entries are sorted alphabetically"
|
|
diff -u $T/comments-removed $T/regenned
|