File: test

package info (click to toggle)
onevpl 2023.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 10,300 kB
  • sloc: cpp: 119,395; python: 7,297; ansic: 6,495; sh: 1,105; makefile: 11
file content (45 lines) | stat: -rwxr-xr-x 1,113 bytes parent folder | download
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
#!/bin/bash
###############################################################################
# Copyright (C) Intel Corporation
#
# SPDX-License-Identifier: MIT
###############################################################################
# Run basic tests on base.

if [ -z "$BASH_VERSION" ]
then
  echo "This script must be run under bash"
  exit 1
fi

if [ "$0" = "$BASH_SOURCE" ]
then
  set -o errexit
else
  echo "Warning: This script should not be sourced. Skipping exit on error."
fi


SCRIPT_DIR="$( cd "$(dirname "${BASH_SOURCE[0]:-$0}")" >/dev/null 2>&1 ; pwd -P )"

# Read command line options
. "${SCRIPT_DIR}/_buildopts.sh" \
    --name test \
    --desc "Run basic tests on base." \
    -- "$@"

###############################################################################
# Globals
if [ -z "${VPL_DISP_BUILD_DIR}" ]
then
  VPL_DISP_BUILD_DIR="${PROJ_DIR}/_build"
fi
###############################################################################

BUILD_DIR="${VPL_DISP_BUILD_DIR}"
pushd "${BUILD_DIR}"
  ctest --output-on-failure -C "${COFIG_OPT}" -T test
  result_all=$?
popd

exit $result_all