File: gencontrol-cpptest.sh

package info (click to toggle)
pytorch-cuda 2.6.0%2Bdfsg-7
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid, trixie
  • size: 161,620 kB
  • sloc: python: 1,278,832; cpp: 900,322; ansic: 82,710; asm: 7,754; java: 3,363; sh: 2,811; javascript: 2,443; makefile: 597; ruby: 195; xml: 84; objc: 68
file content (27 lines) | stat: -rwxr-xr-x 819 bytes parent folder | download | duplicates (3)
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
#!/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 "#"

# Add the test names that are known to fail or flaky
PERMISSIVE_LIST=(
inline_container_test
pow_test
native_test
op_registration_test
)

for (( i = 0; i < ${#FILES[@]}; i++ )); do
	echo "# C++ test $((${i}+1))/${#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