Skip to content

Commit 2beb8fb

Browse files
author
Daniel Kroening
authored
Merge pull request #453 from tautschnig/combine-goto-instrument-regr
Combine goto instrument regression tests
2 parents d494bf6 + 6f73ade commit 2beb8fb

File tree

90 files changed

+22
-102
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+22
-102
lines changed

regression/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
DIRS = ansi-c cbmc cpp goto-instrument goto-instrument-unwind goto-analyzer inlining
2+
DIRS = ansi-c cbmc cpp goto-instrument goto-analyzer
33

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

regression/goto-instrument-unwind/Makefile

Lines changed: 0 additions & 34 deletions
This file was deleted.

regression/goto-instrument-unwind/unwind-chain.sh

Lines changed: 0 additions & 18 deletions
This file was deleted.

regression/goto-instrument/chain.sh

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,27 @@
11
#!/bin/bash
22

3+
set -e
4+
35
src=../../../src
46
goto_cc=$src/goto-cc/goto-cc
57
goto_instrument=$src/goto-instrument/goto-instrument
8+
cbmc=$src/cbmc/cbmc
69

710
name=${@:$#}
811
name=${name%.c}
912

1013
args=${@:1:$#-1}
1114

1215
$goto_cc -o $name.gb $name.c
13-
$goto_instrument $args $name.gb
16+
# $goto_instrument --show-goto-functions $name.gb
17+
$goto_instrument $args $name.gb ${name}-mod.gb
18+
if [ ! -e ${name}-mod.gb ] ; then
19+
cp $name.gb ${name}-mod.gb
20+
elif echo "$args" | grep -q -- "--dump-c" ; then
21+
mv ${name}-mod.gb ${name}-mod.c
22+
$goto_cc ${name}-mod.c -o ${name}-mod.gb
23+
rm ${name}-mod.c
24+
fi
25+
$goto_instrument --show-goto-functions ${name}-mod.gb
26+
$cbmc ${name}-mod.gb
1427

regression/goto-instrument/const-struct1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
KNOWNBUG
22
main.c
3-
"--show-symbol-table"
3+
--show-symbol-table
44
^Type\.*: struct struct_tag_name$
55
^Type\.*: const double$
66
^EXIT=0$

regression/goto-instrument/data-flow1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
main.c
3-
"--show-dependence-graph"
3+
--show-dependence-graph
44
^EXIT=0$
55
^SIGNAL=0$
66
Data dependencies: *[0-9]\+,[0-9]\+,[0-9]\+

regression/goto-instrument/slice-global-inits1/main.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ void func2()
2424
s2.a = 7;
2525
}
2626

27-
void func3()
27+
void func3(int a)
2828
{
29-
func3();
29+
if(a>0)
30+
func3(a-1);
3031
}
3132

3233
int main()
@@ -36,7 +37,7 @@ int main()
3637

3738
func2();
3839

39-
func3();
40+
func3(1);
4041

4142
return 0;
4243
}

regression/goto-instrument/slice-global-inits1/test.desc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
CORE
22
main.c
3-
--slice-global-inits --show-goto-functions
3+
--slice-global-inits
44
z = 0;$
55
a =
66
s2 =

regression/inlining/Makefile

Lines changed: 0 additions & 20 deletions
This file was deleted.

regression/inlining/chain.sh

Lines changed: 0 additions & 19 deletions
This file was deleted.

regression/inlining/test.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

0 commit comments

Comments
 (0)