Module Name: othersrc
Committed By: agc
Date: Tue May 31 20:34:01 UTC 2016
Added Files:
othersrc/external/bsd/sqlite3db/bin: Testspec
Log Message:
Add a Testspec file which can be used by human2atf to derive the unit tests.
The Testspec file is derived from the Makefile tests. It includes 2 examples
of on-the-fly gzip(1) compression of large test files.
Running the generated test script produces the following output:
[23:28:33] agc@netbsd-002 ...tests/usr.bin/sqlite3db [3696] > sudo make
test
*** WARNING: make test is experimental
***
*** Using this test does not preclude you from running the tests
*** installed in /usr/tests. This test run may raise false
*** positives and/or false negatives.
Tests root: /usr/tests/usr.bin/sqlite3db
t_sqlite3db (1/1): 6 test cases
sqlite3db_testset_1_basic_test_set: [0.046954s] Passed.
sqlite3db_testset_2_convert_small: [0.092268s] Passed.
sqlite3db_testset_3_convert_large: [68.611927s] Passed.
sqlite3db_testset_4_get: [0.046001s] Passed.
sqlite3db_testset_5_get: [0.045498s] Passed.
sqlite3db_testset_6_get: [0.045098s] Passed.
[68.897778s]
Summary for 1 test programs:
6 passed test cases.
0 failed test cases.
0 expected failed test cases.
0 skipped test cases.
*** The verbatim output of atf-run has been saved to
/usr/tests/usr.bin/sqlite3db/atf-run.log
*** Once again, note that make test is unsupported.
[23:29:46] agc@netbsd-002 ...tests/usr.bin/sqlite3db [3697] >
To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 othersrc/external/bsd/sqlite3db/bin/Testspec
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Added files:
Index: othersrc/external/bsd/sqlite3db/bin/Testspec
diff -u /dev/null othersrc/external/bsd/sqlite3db/bin/Testspec:1.1
--- /dev/null Tue May 31 20:34:01 2016
+++ othersrc/external/bsd/sqlite3db/bin/Testspec Tue May 31 20:34:01 2016
@@ -0,0 +1,80 @@
+#! /bin/sh
+
+# $NetBSD: Testspec,v 1.1 2016/05/31 20:34:01 agc Exp $
+
+# Copyright (c) 2016 Alistair Crooks <[email protected]>
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in the
+# documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+
+TESTNAME=sqlite3db
+
+TESTSET_1_NAME=basic_test_set
+TESTSET_1_FILES='
+1.in
+2.expected
+'
+TESTSET_1_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_1_CASE_2="-s eq:0 -o file:2.expected -e empty sqlite3db dump sql1.db"
+
+TESTSET_2_NAME=convert_small
+TESTSET_2_FILES='
+pkgdb.byfile.db
+3.expected
+'
+TESTSET_2_CASE_1="-s eq:0 -o empty -e empty sqlite3db convert pkgdb.byfile.db"
+TESTSET_2_CASE_2="-s eq:0 -o file:3.expected -e empty db btree pkgdb.byfile.db"
+TESTSET_2_CASE_3="-s eq:0 -o file:3.expected -e empty sqlite3db dump sql3pkgdb.byfile.db"
+
+TESTSET_3_NAME=convert_large
+TESTSET_3_FILES='
+large.pkgdb.byfile.db:gzip
+3.large.expected:gzip
+'
+TESTSET_3_CASE_1="-s eq:0 -o empty -e empty sqlite3db convert large.pkgdb.byfile.db"
+TESTSET_3_CASE_2="-s eq:0 -o file:3.large.expected -e empty db btree large.pkgdb.byfile.db"
+TESTSET_3_CASE_3="-s eq:0 -o file:3.large.expected -e empty sqlite3db dump sql3large.pkgdb.byfile.db"
+
+TESTSET_4_NAME=get
+TESTSET_4_FILES='
+1.in
+4.expected
+'
+TESTSET_4_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_4_CASE_2="-s eq:0 -o file:4.expected -e empty sqlite3db get sql1.db equals hey yowza"
+
+TESTSET_5_NAME=get
+TESTSET_5_FILES='
+1.in
+5.expected
+'
+TESTSET_5_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql1.db < 1.in"
+TESTSET_5_CASE_2="-s eq:0 -o file:5.expected -e empty sqlite3db del sql1.db equals"
+
+TESTSET_6_NAME=get
+TESTSET_6_FILES='
+6.in
+6.expected
+'
+TESTSET_6_CASE_1="-s eq:0 -o empty -e empty sqlite3db create sql6.db < 6.in"
+TESTSET_6_CASE_2="-s eq:0 -o file:6.expected -e empty sqlite3db dump sql6.db"
+