Home | History | Annotate | Download | only in tests
      1 #!/bin/bash
      2 FILECHECK=$1
      3 CXX=$2
      4 PREFIX=$3
      5 shift 3
      6 SOURCE=$(echo "$@" | grep -oP '\S+\.cpp\b')
      7 OBJ=$(echo "$@" | grep -oP '\S+\.o\b')
      8 $CXX "$@" -Wno-error 2>&1 | $FILECHECK -check-prefix=$PREFIX $SOURCE
      9 if [ "$?" -eq 0 ]; then
     10   touch $OBJ
     11 else
     12   exit 1
     13 fi
     14