Skip to content

Combine goto instrument regression tests #453

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion regression/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

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

test:
$(foreach var,$(DIRS), $(MAKE) -C $(var) test || exit 1;)
34 changes: 0 additions & 34 deletions regression/goto-instrument-unwind/Makefile

This file was deleted.

18 changes: 0 additions & 18 deletions regression/goto-instrument-unwind/unwind-chain.sh

This file was deleted.

15 changes: 14 additions & 1 deletion regression/goto-instrument/chain.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,27 @@
#!/bin/bash

set -e

src=../../../src
goto_cc=$src/goto-cc/goto-cc
goto_instrument=$src/goto-instrument/goto-instrument
cbmc=$src/cbmc/cbmc

name=${@:$#}
name=${name%.c}

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

$goto_cc -o $name.gb $name.c
$goto_instrument $args $name.gb
# $goto_instrument --show-goto-functions $name.gb
$goto_instrument $args $name.gb ${name}-mod.gb
if [ ! -e ${name}-mod.gb ] ; then
cp $name.gb ${name}-mod.gb
elif echo "$args" | grep -q -- "--dump-c" ; then
mv ${name}-mod.gb ${name}-mod.c
$goto_cc ${name}-mod.c -o ${name}-mod.gb
rm ${name}-mod.c
fi
$goto_instrument --show-goto-functions ${name}-mod.gb
$cbmc ${name}-mod.gb

2 changes: 1 addition & 1 deletion regression/goto-instrument/const-struct1/test.desc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
KNOWNBUG
main.c
"--show-symbol-table"
--show-symbol-table
^Type\.*: struct struct_tag_name$
^Type\.*: const double$
^EXIT=0$
Expand Down
2 changes: 1 addition & 1 deletion regression/goto-instrument/data-flow1/test.desc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CORE
main.c
"--show-dependence-graph"
--show-dependence-graph
^EXIT=0$
^SIGNAL=0$
Data dependencies: *[0-9]\+,[0-9]\+,[0-9]\+
Expand Down
7 changes: 4 additions & 3 deletions regression/goto-instrument/slice-global-inits1/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ void func2()
s2.a = 7;
}

void func3()
void func3(int a)
{
func3();
if(a>0)
func3(a-1);
}

int main()
Expand All @@ -36,7 +37,7 @@ int main()

func2();

func3();
func3(1);

return 0;
}
2 changes: 1 addition & 1 deletion regression/goto-instrument/slice-global-inits1/test.desc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
CORE
main.c
--slice-global-inits --show-goto-functions
--slice-global-inits
z = 0;$
a =
s2 =
Expand Down
20 changes: 0 additions & 20 deletions regression/inlining/Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions regression/inlining/chain.sh

This file was deleted.

3 changes: 0 additions & 3 deletions regression/inlining/test.sh

This file was deleted.