File: docker_run_test.sh

package info (click to toggle)
memkind 1.14.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 8,508 kB
  • sloc: ansic: 72,572; cpp: 39,493; sh: 4,594; perl: 4,250; xml: 2,044; python: 1,753; makefile: 1,393; csh: 7
file content (31 lines) | stat: -rwxr-xr-x 967 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
#!/bin/bash
# SPDX-License-Identifier: BSD-2-Clause
# Copyright (C) 2019 - 2020 Intel Corporation.

#
# docker_run_test.sh - is called inside a Docker container;
# runs specified memkind tests
#
# Parameters:
# -heap manager
set -e

HEAP_MANAGER=$1

if [ "$TEST_SUITE_NAME" = "HBW" ]; then
    # running tests and display output in case of failure
    make check || { cat test-suite.log; exit 1; }
elif [ "$TEST_SUITE_NAME" = "PMEM" ]; then
    MEMKIND_HOG_MEMORY=$HOG_MEMORY make PMEM_PATH="$PMEM_CONTAINER_PATH" unit_tests_pmem
    # running pmem examples
    find examples/.libs -name "pmem*" -executable -type f -exec sh -c "MEMKIND_HEAP_MANAGER=$HEAP_MANAGER "{}" $PMEM_CONTAINER_PATH" \;
elif [ "$TEST_SUITE_NAME" = "DAX_KMEM" ]; then
    make unit_tests_dax_kmem
else
    echo "Unknown Test suite ${TEST_SUITE_NAME}"
fi;

# executing coverage script if codecov token is set
if [ -n "$CODECOV_TOKEN" ]; then
    "$UTILS_PREFIX"/docker_run_coverage.sh "$PWD"
fi