File: test_scrypt.sh

package info (click to toggle)
scrypt 1.2.0%2Bgit.3.c1a9826-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 456 kB
  • ctags: 328
  • sloc: ansic: 3,307; sh: 391; makefile: 103
file content (34 lines) | stat: -rwxr-xr-x 981 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
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh

# Build directory (allowing flexible out-of-tree builds).
bindir=$1

# Constants used in multiple scenarios.
password="hunter2"

# Find script directory and load helper functions.
scriptdir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
. ${scriptdir}/shared_test_functions.sh

# We need a ${bindir}.
if [ -z ${bindir} ]; then
	printf "Warning: Scrypt binary directory not given.\n"
	printf "Attempting to use default values for in-source-tree build.\n"
	bindir=".."
fi

# Find system scrypt, and ensure it supports -P.
system_scrypt=$( find_system scrypt enc -P )

# Check for optional valgrind.
check_optional_valgrind

# Clean up previous directories, and create new ones.
prepare_directories

# Generate valgrind suppression file if it is required.  Must be
# done after preparing directories.
ensure_valgrind_suppression ${bindir}/tests/valgrind/potential-memleaks

# Run the test scenarios; this will exit on the first failure.
run_scenarios ${scriptdir}/??-*.sh