Skip to content

Commit 0c6ad51

Browse files
committed
restore returns regression tests
1 parent f2619a4 commit 0c6ad51

File tree

7 files changed

+92
-1
lines changed

7 files changed

+92
-1
lines changed

regression/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DIRS = ansi-c cbmc cpp
1+
DIRS = ansi-c cbmc cpp goto-instrument
22

33
test:
44
$(foreach var,$(DIRS), $(MAKE) -C $(var) test || exit 1;)

regression/goto-instrument/Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
2+
default: tests.log
3+
4+
test:
5+
@if ! ../test.pl -c ../chain.sh ; then \
6+
../failed-tests-printer.pl ; \
7+
exit 1; \
8+
fi
9+
10+
tests.log:
11+
@if ! ../test.pl -c ../chain.sh ; then \
12+
../failed-tests-printer.pl ; \
13+
exit 1; \
14+
fi
15+
16+
show:
17+
@for dir in *; do \
18+
if [ -d "$$dir" ]; then \
19+
vim -o "$$dir/*.c" "$$dir/*.out"; \
20+
fi; \
21+
done;
22+
23+
clean:
24+
@for dir in *; do \
25+
rm -f tests.log; \
26+
if [ -d "$$dir" ]; then \
27+
cd "$$dir"; \
28+
rm -f *.out *.gb; \
29+
cd ..; \
30+
fi \
31+
done
32+

regression/goto-instrument/chain.sh

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/bin/bash
2+
3+
SRC=../../../src
4+
5+
GC=$SRC/goto-cc/goto-cc
6+
GI=$SRC/goto-instrument/goto-instrument
7+
8+
OPTS=$1
9+
NAME=${2%.c}
10+
11+
$GC $NAME.c -o $NAME.gb
12+
$GI $OPTS $NAME.gb
13+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
2+
int foo()
3+
{
4+
int x;
5+
return x;
6+
}
7+
8+
int main()
9+
{
10+
foo();
11+
return 0;
12+
}
13+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
ret.c
3+
"--escape-analysis --dump-c"
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
2+
int foo()
3+
{
4+
int x;
5+
int y;
6+
if (x)
7+
{
8+
return 0;
9+
}
10+
int z;
11+
return 1;
12+
}
13+
14+
int main()
15+
{
16+
foo();
17+
return 0;
18+
}
19+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
CORE
2+
ret.c
3+
"--escape-analysis --dump-c"
4+
^EXIT=0$
5+
^SIGNAL=0$
6+
--
7+
^warning: ignoring

0 commit comments

Comments
 (0)