-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrelease_checks.sh
executable file
·65 lines (56 loc) · 1.53 KB
/
release_checks.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/sh
#
# release-checks.sh
#
# Does some consistency checks that should be run at least for each release.
#
#
REPOSITORIES="osmium-tool osmium-contrib osm-gis-export osmcoastline osm-area-tools osmium-filter osmium-surplus"
CATCH_REPOSITORIES="osmium-tool osmium-filter"
ALL_REPOSITORIES="libosmium $REPOSITORIES"
cd ..
#set -x
set -e
BOLD="\033[1m"
NORM="\033[0m"
GREEN="\033[1;32m"
DARKRED="\033[31m"
RED="\033[1;31m"
echo "== Comparing cmake files..."
for repos in $REPOSITORIES; do
for file in FindLZ4 FindOsmium FindProtozero; do
if diff -u libosmium/cmake/${file}.cmake $repos/cmake/${file}.cmake; then
echo "[${GREEN}OK ${NORM}] ${file}"
else
echo "[${RED}ERR${NORM}] ${file}"
fi
done
done
echo "== Done."
echo "== Comparing catch files..."
for repos in $CATCH_REPOSITORIES; do
if diff -u libosmium/test/catch/catch.hpp $repos/test/include/catch.hpp; then
echo "[${GREEN}OK ${NORM}] test/catch/catch.hpp"
else
echo "[${RED}ERR${NORM}] test/catch/catch.hpp"
fi
done
echo "== Done."
echo "== Finding tests not run..."
cd libosmium
BUILD="build-test-check"
mkdir -p $BUILD
cd $BUILD
skipped_tests=`cmake -L .. 2>/dev/null | grep "OSMIUM_SKIPPED_TESTS" | cut -d= -f2`
if [ -n "${skipped_tests}" ]; then
echo "Skipped tests:${skipped_tests}"
fi
cd ..
rm -fr $BUILD
cd ..
echo "== Done."
echo "== Finding left over test build directories..."
for repos in $ALL_REPOSITORIES; do
find $repos -mindepth 1 -maxdepth 1 -type d -name build-test-\*
done
echo "== Done."