[Swift-commit] r2698 - provenancedb/tests/provenancedb
noreply at svn.ci.uchicago.edu
noreply at svn.ci.uchicago.edu
Mon Mar 16 13:30:11 CDT 2009
Author: benc
Date: 2009-03-16 13:30:10 -0500 (Mon, 16 Mar 2009)
New Revision: 2698
Added:
provenancedb/tests/provenancedb/counts.out.expected
provenancedb/tests/provenancedb/counts.sql
provenancedb/tests/provenancedb/run
Log:
Some tests for the provenance code, based around sqlite3 and a set of
supplied log files.
Added: provenancedb/tests/provenancedb/counts.out.expected
===================================================================
--- provenancedb/tests/provenancedb/counts.out.expected (rev 0)
+++ provenancedb/tests/provenancedb/counts.out.expected 2009-03-16 18:30:10 UTC (rev 2698)
@@ -0,0 +1,8 @@
+505
+629
+419
+226
+0
+259
+145
+144
Added: provenancedb/tests/provenancedb/counts.sql
===================================================================
--- provenancedb/tests/provenancedb/counts.sql (rev 0)
+++ provenancedb/tests/provenancedb/counts.sql 2009-03-16 18:30:10 UTC (rev 2698)
@@ -0,0 +1,9 @@
+select count(*) from dataset_containment;
+select count(*) from dataset_filenames;
+select count(*) from dataset_usage;
+select count(*) from executes;
+select count(*) from executes_in_workflows;
+select count(*) from invocation_procedure_names;
+select count(*) from known_workflows;
+select count(*) from workflow_events;
+
Added: provenancedb/tests/provenancedb/run
===================================================================
--- provenancedb/tests/provenancedb/run (rev 0)
+++ provenancedb/tests/provenancedb/run 2009-03-16 18:30:10 UTC (rev 2698)
@@ -0,0 +1,44 @@
+#!/bin/bash
+
+# assumes that provenance directory is on path (to get the commands)
+# and that an appropriate configuration for sqlite3 exists.
+
+# the latter could (and should) be automated to get logs from this
+# test directory
+
+echo starting provenance tests
+
+# delete the db
+
+rm -f provdb
+
+if [ -f "provdb" ]; then
+ echo FAIL - provdb should have been deleted but still exists
+ exit 1
+fi
+
+# import
+
+swift-prov-import-all-logs rebuild
+
+if [ "$?" != "0" ]; then
+ echo FAIL - import of all logs returned non-zero
+ exit 2
+fi
+
+if ! [ -f "provdb" ]; then
+ echo FAIL - provdb should now exist but does not
+ exit 3
+fi
+
+echo checking row counts:
+
+cat counts.sql | sqlite3 provdb > counts.out
+diff -q counts.out counts.out.expected
+if [ "$?" -ne "0" ]; then
+ echo FAIL - row counts differ
+ exit 4
+fi
+
+echo ending provenance tests without failures
+exit 0
Property changes on: provenancedb/tests/provenancedb/run
___________________________________________________________________
Name: svn:executable
+ *
More information about the Swift-commit
mailing list