Created
April 13, 2010 03:19
-
-
Save zed9h/364276 to your computer and use it in GitHub Desktop.
[WIP] openlink virtuoso regression test script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://sourceforge.net/tracker/?func=detail&aid=2984276&group_id=161622&atid=820574 | |
sparql | |
CLEAR GRAPH <http://test.com/> | |
; | |
sparql | |
MODIFY GRAPH <http://test.com/> | |
delete { | |
?s ?p ?o . | |
} | |
insert { | |
<server> <still> <up-and-running> . | |
} | |
where { | |
optional { | |
filter( ?s = <http://test.com/1> ) | |
?s ?p ?o . | |
} | |
} | |
; | |
sparql | |
define input:default-graph-uri <http://test.com/> | |
select * { <server> <still> ?q . } | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear <http://test.com/> -- done | |
.* | |
Modify <http://test.com/>, delete 0 and insert 1 triples -- done | |
.*__ | |
up-and-running | |
1 Rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# http://sourceforge.net/tracker/?func=detail&aid=2984885&group_id=161622&atid=820574 | |
sparql | |
clear <http://test.com/> | |
; | |
sparql | |
prefix : <http://test.com/> | |
insert data into <http://test.com/> { | |
owl:Thing a owl:Class . | |
:A a owl:Class ; rdfs:subClassOf owl:Thing . | |
:B a owl:Class ; rdfs:subClassOf owl:Thing . | |
:C a owl:Class ; rdfs:subClassOf :A . | |
:D a owl:Class ; rdfs:subClassOf :B . | |
:E a owl:Class ; rdfs:subClassOf :B . | |
:F a owl:Class ; rdfs:subClassOf :E . | |
} | |
; | |
sparql | |
define input:default-graph-uri <http://test.com/> | |
prefix : <http://test.com/> | |
SELECT ?n ?ancestror | |
WHERE { | |
FILTER(?domain = :F) | |
?domain rdfs:subClassOf ?ancestror option (transitive, t_step('step_no') as ?n, t_min(0)) . | |
?ancestror a owl:Class . | |
} | |
; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Clear <http://test.com/> -- done | |
.* | |
Insert into <http://test.com/>, 13 triples -- done | |
.*_____ | |
0 *http://test.com/F | |
1 *http://test.com/E | |
2 *http://test.com/B | |
3 *http://www.w3.org/2002/07/owl#Thing | |
4 Rows |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
for t in test/*.isql | |
do | |
for v in /usr/local/virtuoso-opensource* | |
do | |
echo -n "$t $v " | |
killall virtuoso-t &> /dev/null | |
for i in 1 2 3 4 5 6 7 8 9 ; do pidof virtuoso-t &> /dev/null || break ; sleep 1 ; done | |
killall -9 virtuoso-t &> /dev/null | |
mv db db-$(date +%s) &> /dev/null | |
mkdir db | |
cp $v/var/lib/virtuoso/db/virtuoso.ini db/ | |
(cd db && $v/bin/virtuoso-t) & | |
while ! wget -q -O /dev/null http://localhost:8890/sparql ; do sleep 1 ; done | |
$v/bin/isql < $t &> db/isql.result | |
perl -e '($_, $p) = @ARGV; chomp $p; exit(m{$p}ms ? 0 : 1)' \ | |
"$(cat db/isql.result)" \ | |
"$(cat $t.result)" \ | |
&& echo OK || echo FAIL | |
killall virtuoso-t &> /dev/null | |
for i in 1 2 3 4 5 6 7 8 9 ; do pidof virtuoso-t &> /dev/null || break ; sleep 1 ; done | |
killall -9 virtuoso-t &> /dev/null | |
mv db db-$(date +%s)-$(echo "$t $v" | sed 's/[^a-z0-9]\+/-/g') &> /dev/null | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment