File: upstream-binaries

package info (click to toggle)
rocalution 5.7.1-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,676 kB
  • sloc: cpp: 73,704; python: 1,114; sh: 434; xml: 203; makefile: 27
file content (37 lines) | stat: -rw-r--r-- 828 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
#!/bin/sh
# autopkgtest driver for ROCm upstream binaries
#
# Expects argument "$1" to be the name of a sub-directory, such that the
# following following directory exists:
#
#   /usr/libexec/rocm/$1
#
# Will run all executables in that directory, and exit with status=1 if
# any failure occured, otherwise with status=0. A failure is defined as an
# executable exiting with a status != 0.


TESTSDIR="/usr/libexec/rocm/$1"

if [ -z "$1" ]
then
	echo "This script needs to be called with a directory name as an argument." >&2
	echo "Aborting." >&2
	exit 1
elif [ ! -d "$TESTSDIR" ]
then
	echo "The directory $TESTSDIR does not exist." >&2
	echo "Aborting." >&2
	exit 1
fi

cd "$AUTOPKGTEST_TMP"

# Any individual failure is overall failure
EXITCODE=0
for TESTNAME in $TESTSDIR/*
do
	$TESTNAME || EXITCODE=1
done

exit $EXITCODE