File: gencontrol-cpptest.sh

package info (click to toggle)
pytorch 1.13.1%2Bdfsg-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 139,252 kB
  • sloc: cpp: 1,100,274; python: 706,454; ansic: 83,052; asm: 7,618; java: 3,273; sh: 2,841; javascript: 612; makefile: 323; xml: 269; ruby: 185; yacc: 144; objc: 68; lex: 44
file content (29 lines) | stat: -rwxr-xr-x 1,008 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
#!/bin/bash
set -e
echo "# Generating Autopkgtest Test Cases for the C++ Testing Programs"
FILES=( $(find /usr/lib/libtorch-test/ -type f -executable | sort) )
echo "# Found" ${#FILES[@]} "tests"
echo "#"

PERMISSIVE_LIST=(
/usr/lib/libtorch-test/mpi_test
/usr/lib/libtorch-test/bound_shape_inference_test
/usr/lib/libtorch-test/cpuid_test
/usr/lib/libtorch-test/c10_string_view_test
/usr/lib/libtorch-test/blob_test
/usr/lib/libtorch-test/generate_proposals_op_util_boxes_test
/usr/lib/libtorch-test/generate_proposals_op_util_nms_test
)

for (( i = 0; i < ${#FILES[@]}; i++ )); do
	echo "# C++ test ${i}/${#FILES[@]}"
	if echo ${PERMISSIVE_LIST[@]} | grep -o ${FILES[$i]} >/dev/null 2>/dev/null; then
		echo "Test-Command: ${FILES[$i]} || true"
	else
		echo "Test-Command: ${FILES[$i]}"
	fi
	echo "Depends: build-essential, ninja-build, libtorch-dev, libtorch-test"
	echo "Features: test-name=$((${i}+1))_of_${#FILES[@]}__cpptest__$(basename ${FILES[$i]})"
	echo "Restrictions: allow-stderr"
	echo ""
done