brintos

brintos / llvm-project-archived public Read only

0
0
Text · 422 B · db6a472 Raw
17 lines · bash
1#!/bin/sh2 3# Create temporary files that are automatically deleted after the script's4# execution.5stdout_file=$(mktemp /tmp/stdout.XXXXXX)6stderr_file=$(mktemp /tmp/stderr.XXXXXX)7 8# Tests for the keyword "failure" in the stderr of the optimization pass9mlir-opt $1 -test-mlir-reducer > $stdout_file 2> $stderr_file10 11if [ $? -ne 0 ] && grep 'failure' $stderr_file; then12  exit 113  #Interesting behavior14else 15  exit 016fi17