Skip to content

Commit b1ff52f

Browse files
committed
Add test for special aoc return code
1 parent 63c7bf4 commit b1ff52f

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

clang/test/Driver/Inputs/SYCL/aoc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#!/bin/sh
2+
## Simple aoc replacement script that returns '42' that is used to test
3+
## special return code processing for FPGA AOT.
4+
5+
while [[ $# -gt 0 ]] ; do
6+
opt="$1"
7+
case $opt in
8+
-o)
9+
shift
10+
OUTFILE=$1
11+
;;
12+
*)
13+
shift
14+
;;
15+
esac
16+
done
17+
18+
if [ "$OUTFILE" != "" ] ; then
19+
echo "dummy file contents" > $OUTFILE
20+
fi
21+
22+
exit 42
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
// REQUIRES: system-linux
2+
3+
/// Tests behavior with aoc -fintelpga.
4+
/// Uses a dummy aoc which returns '42' to make sure we properly emit a
5+
/// diagnostic and also do not stop compilation
6+
// RUN: env PATH=%S/Inputs/SYCL:$PATH \
7+
// RUN: not %clangxx -fsycl -fintelfpga -Xshardware %s -v 2>&1 \
8+
// RUN: | FileCheck %s -check-prefix ERROR_OUTPUT
9+
// ERROR_OUTPUT: ld{{.*}} -o a.out
10+
// ERROR_OUTPUT: The FPGA image generated during this compile contains timing violations
11+
12+
int main()
13+
{
14+
return 0;
15+
}

0 commit comments

Comments
 (0)