File: codegen-validator.sh

package info (click to toggle)
bpftrace 0.24.1-1.1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,496 kB
  • sloc: cpp: 60,982; ansic: 10,952; python: 953; yacc: 665; sh: 536; lex: 295; makefile: 22
file content (30 lines) | stat: -rwxr-xr-x 576 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
#!/bin/bash

## Don't add to this
EXIT=0
LLVM_VERSION=18

if ! LLVM=$(command -v "llvm-as-${LLVM_VERSION}" || command -v llvm-as); then
  echo "llvm-as not found, exiting"
  exit 1
fi

if ! $LLVM --version | grep -q "LLVM version ${LLVM_VERSION}"; then
  echo "llvm-as is not version ${LLVM_VERSION}"
fi

if [[ -z "$1" ]]; then
  echo "Usage: $0 <source dir>"
  exit 1
fi

for file in "${1}"/tests/codegen/llvm/*.ll; do
    if $LLVM -o /dev/null "${file}"; then
      echo -e "[   OK   ]\t$file"
    else
      echo -e "[ FAILED ]\t$file"
      EXIT=1
    fi
done

exit $EXIT