-
Notifications
You must be signed in to change notification settings - Fork 273
Test gen strings update regression #976
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,38 @@ | ||
default: tests.log | ||
|
||
test: | ||
@../test.pl -c ../../../src/cbmc/cbmc | ||
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \ | ||
../failed-tests-printer.pl ; \ | ||
exit 1 ; \ | ||
fi | ||
|
||
testfuture: | ||
@../test.pl -c ../../../src/cbmc/cbmc -CF | ||
@if ! ../test.pl -c ../../../src/cbmc/cbmc -CF ; then \ | ||
../failed-tests-printer.pl ; \ | ||
exit 1 ; \ | ||
fi | ||
|
||
testall: | ||
@../test.pl -c ../../../src/cbmc/cbmc -CFTK | ||
@if ! ../test.pl -c ../../../src/cbmc/cbmc -CFTK ; then \ | ||
../failed-tests-printer.pl ; \ | ||
exit 1 ; \ | ||
fi | ||
|
||
tests.log: ../test.pl | ||
@if ! ../test.pl -c ../../../src/cbmc/cbmc ; then \ | ||
../failed-tests-printer.pl ; \ | ||
exit 1 ; \ | ||
fi | ||
|
||
show: | ||
@for dir in *; do \ | ||
if [ -d "$$dir" ]; then \ | ||
vim -o "$$dir/*.c" "$$dir/*.out"; \ | ||
fi; \ | ||
done; | ||
|
||
clean: | ||
find -name '*.out' -execdir $(RM) '{}' \; | ||
find -name '*.gb' -execdir $(RM) '{}' \; | ||
$(RM) tests.log | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE | ||
FUTURE | ||
test_append_int.class | ||
--refine-strings | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should this and others have the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I understand that |
||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,8 @@ | ||
KNOWNBUG | ||
CORE | ||
test_contains.class | ||
--refine-strings | ||
^EXIT=10$ | ||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^\[.*assertion.1\].* line 8.* SUCCESS$ | ||
^\[.*assertion.2\].* line 9.* FAILURE$ | ||
-- | ||
Issue: diffblue/test-gen#201 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE | ||
FUTURE | ||
test_float.class | ||
--refine-strings | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
CORE | ||
FUTURE | ||
test_insert_int.class | ||
--refine-strings | ||
^EXIT=0$ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
#!/usr/bin/python | ||
|
||
''' | ||
This script collects the running times of the tests present in the current | ||
directory. | ||
|
||
It does not run the tests but reads the already present output files. | ||
|
||
Usage: | ||
python performance.py | ||
|
||
Dependencies: | ||
gnuplot http://www.gnuplot.info/ | ||
''' | ||
|
||
import time | ||
from subprocess import check_output | ||
from subprocess import check_call | ||
|
||
git_output = check_output(['git', 'show', 'HEAD']) | ||
commit = git_output.split('\n')[0] | ||
commit_id = time.strftime('%Y_%m_%d__%H_%M_%S')+'__'+commit[7:] | ||
|
||
process = check_output(['grep', '^Runtime decision procedure', '-R']) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There's no point reading the output into a Python string then writing it back out again-- change this to something like:
Otherwise lgtm There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @smowton As suggested above, this doesn't work because we cannot write the output of a grep in the directory we are currently grepping. I get the following error:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, makes sense |
||
file_name = 'performance_'+commit_id+'.out' | ||
|
||
print 'writing to file', file_name | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If you're fixing this, doesn't this also need the comment here: #976 (comment) (i.e. |
||
|
||
with open(file_name, 'w') as f: | ||
f.write(process) | ||
|
||
print('drawing to file', file_name+'.png') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still using the comma/python2 thing so if you agree I think this should become: print('drawing to file '+file_name+'.png') |
||
check_call(['gnuplot', '-e', 'file="'+file_name+'"', '-e', | ||
'outputfile="'+file_name+'.png"', 'performance_draw.gp']) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
set datafile separator ":" | ||
set term png | ||
set output outputfile | ||
set logscale y 10 | ||
set yrange [0.01:100] | ||
|
||
plot file using 3 with lines |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry don't know anything but how come this is being marked as Future? Is there a corresponding issue to re-enable it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These tests have never actually been enabled, because the test suite was not called from the
regression/Makefile
. For this one in particular, the behaviour might be affected when we add models for strings. It is just easier to go through all these tests once everything is merged, then enable those that work, and create issues for those that don't. There is no particular issue to enable the tests, but it is an ongoing process.