Adapt error messages in tests/scripts/list-*

This commit is contained in:
Manuel Pégourié-Gonnard 2015-04-09 10:15:10 +02:00
parent 45df597028
commit d1ddd29e81
4 changed files with 21 additions and 4 deletions

View File

@ -6,6 +6,8 @@ use strict;
use utf8;
use open qw(:std utf8);
-d 'include/mbedtls' or die "$0: must be run from root\n";
@ARGV = <include/mbedtls/*.h>;
my @consts;

View File

@ -2,7 +2,12 @@
set -eu
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'compat-1.2|openssl|bn_mul' )
if [ -d include/mbedtls ]; then :; else
echo "$0: must be run from root" >&2
exit 1
fi
HEADERS=$( ls include/mbedtls/*.h | egrep -v 'bn_mul' )
rm -f identifiers
@ -22,7 +27,7 @@ if [ $( wc -l < _identifiers ) -eq $( wc -l < _decls ) ]; then
egrep -v '^(u?int(16|32|64)_t)$' _identifiers | sort > identifiers
rm _identifiers
else
echo "Mismatch" 2>&1
echo "$0: oops, lost some identifiers" 2>&1
exit 1
fi

View File

@ -1,6 +1,11 @@
#!/bin/sh
set =eu
set -eu
if [ -d include/mbedtls ]; then :; else
echo "$0: must be run from root" >&2
exit 1
fi
HEADERS=$( ls include/mbedtls/*.h )

View File

@ -2,8 +2,13 @@
set -eu
if [ -d include/mbedtls ]; then :; else
echo "$0: must be run from root" >&2
exit 1
fi
if grep -i cmake Makefile >/dev/null; then
echo "not compatible with cmake" >&2
echo "$0: not compatible with cmake" >&2
exit 1
fi