Initial commit
[authen-passphrase-scrypt.git] / scrypt-1.2.1 / tests / test_scrypt.sh
CommitLineData
0c1f3509
MG
1#!/bin/sh
2
3# Build directory (allowing flexible out-of-tree builds).
4bindir=$1
5
6# Constants used in multiple scenarios.
7password="hunter2"
8
9# Find script directory and load helper functions.
10scriptdir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd -P)
11. ${scriptdir}/shared_test_functions.sh
12
13# We need a ${bindir}.
14if [ -z ${bindir} ]; then
15 printf "Warning: Scrypt binary directory not given.\n"
16 printf "Attempting to use default values for in-source-tree build.\n"
17 bindir=".."
18fi
19
20# Find system scrypt, and ensure it supports -P.
21system_scrypt=$( find_system scrypt enc -P )
22
23# Check for optional valgrind.
24check_optional_valgrind
25
26# Clean up previous directories, and create new ones.
27prepare_directories
28
29# Generate valgrind suppression file if it is required. Must be
30# done after preparing directories.
31ensure_valgrind_suppression ${bindir}/tests/valgrind/potential-memleaks
32
33# Run the test scenarios; this will exit on the first failure.
34run_scenarios ${scriptdir}/??-*.sh
This page took 0.011781 seconds and 4 git commands to generate.