debian/tests/run-primes
raw| 1 | #!/bin/sh -e |
| 2 | # SPDX-FileCopyrightText: 2021 John Scott <[email protected]> |
| 3 | # SPDX-License-Identifier: GPL-3.0-or-later |
| 4 | # Compute the number of primes that can fit in an int16_t |
| 5 | |
| 6 | sh-elf-gcc debian/tests/primes.c -o "$AUTOPKGTEST_TMP"/primes |
| 7 | cd "$AUTOPKGTEST_TMP" |
| 8 | sim="$(sh-elf-run ./primes)" |
| 9 | |
| 10 | if [ "$sim" != "3512" ] |
| 11 | then |
| 12 | echo "Got '$sim' from the simulator, was expecting '3512'" >&2 |
| 13 | exit 1 |
| 14 | fi |