File: selftest

package info (click to toggle)
mbedtls 2.16.9-0.1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 15,308 kB
  • sloc: ansic: 86,671; sh: 9,787; python: 2,585; perl: 1,500; makefile: 1,321; cpp: 93; tcl: 4
file content (23 lines) | stat: -rw-r--r-- 716 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/bin/sh
# autopkgtest check: Build and run the mbedtls "selftest" program

set -e

# Require $AUTOPKGTEST_TMP for temporary build files
if [ -z "$AUTOPKGTEST_TMP" ]
then
	echo "Required envvar \"$AUTOPKGTEST_TMP\"is not set" >&2
	exit 1
fi

# Build mbedtls_selftest shared / statically
cc -Wall -Werror programs/test/selftest.c -o "$AUTOPKGTEST_TMP/mbedtls_selftest" -lmbedtls -lmbedx509 -lmbedcrypto
echo "build1: OK"
cc -Wall -Werror -static programs/test/selftest.c -o "$AUTOPKGTEST_TMP/mbedtls_selftest_static" -lmbedtls -lmbedx509 -lmbedcrypto -pthread
echo "build2: OK"

# Run the testsuite twice
"$AUTOPKGTEST_TMP/mbedtls_selftest"
echo "run1: OK"
"$AUTOPKGTEST_TMP/mbedtls_selftest_static"
echo "run2: OK"