xref: /freebsd/contrib/kyua/store/testdata_v3_2.sql (revision b0d29bc47dba79f6f38e67eabadfb4b32ffd9390)
1*b0d29bc4SBrooks Davis-- Copyright 2014 The Kyua Authors.
2*b0d29bc4SBrooks Davis-- All rights reserved.
3*b0d29bc4SBrooks Davis--
4*b0d29bc4SBrooks Davis-- Redistribution and use in source and binary forms, with or without
5*b0d29bc4SBrooks Davis-- modification, are permitted provided that the following conditions are
6*b0d29bc4SBrooks Davis-- met:
7*b0d29bc4SBrooks Davis--
8*b0d29bc4SBrooks Davis-- * Redistributions of source code must retain the above copyright
9*b0d29bc4SBrooks Davis--   notice, this list of conditions and the following disclaimer.
10*b0d29bc4SBrooks Davis-- * Redistributions in binary form must reproduce the above copyright
11*b0d29bc4SBrooks Davis--   notice, this list of conditions and the following disclaimer in the
12*b0d29bc4SBrooks Davis--   documentation and/or other materials provided with the distribution.
13*b0d29bc4SBrooks Davis-- * Neither the name of Google Inc. nor the names of its contributors
14*b0d29bc4SBrooks Davis--   may be used to endorse or promote products derived from this software
15*b0d29bc4SBrooks Davis--   without specific prior written permission.
16*b0d29bc4SBrooks Davis--
17*b0d29bc4SBrooks Davis-- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18*b0d29bc4SBrooks Davis-- "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19*b0d29bc4SBrooks Davis-- LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20*b0d29bc4SBrooks Davis-- A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21*b0d29bc4SBrooks Davis-- OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22*b0d29bc4SBrooks Davis-- SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23*b0d29bc4SBrooks Davis-- LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24*b0d29bc4SBrooks Davis-- DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25*b0d29bc4SBrooks Davis-- THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26*b0d29bc4SBrooks Davis-- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27*b0d29bc4SBrooks Davis-- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28*b0d29bc4SBrooks Davis
29*b0d29bc4SBrooks Davis-- \file store/testdata_v3.sql
30*b0d29bc4SBrooks Davis-- Populates a v3 database with some test data.
31*b0d29bc4SBrooks Davis--
32*b0d29bc4SBrooks Davis-- This contains 5 test programs, each with one test case, and each
33*b0d29bc4SBrooks Davis-- reporting one of all possible result types.
34*b0d29bc4SBrooks Davis
35*b0d29bc4SBrooks Davis
36*b0d29bc4SBrooks DavisBEGIN TRANSACTION;
37*b0d29bc4SBrooks Davis
38*b0d29bc4SBrooks Davis
39*b0d29bc4SBrooks Davis-- context
40*b0d29bc4SBrooks DavisINSERT INTO contexts (cwd) VALUES ('/test/suite/root');
41*b0d29bc4SBrooks DavisINSERT INTO env_vars (var_name, var_value)
42*b0d29bc4SBrooks Davis    VALUES ('HOME', '/home/test');
43*b0d29bc4SBrooks DavisINSERT INTO env_vars (var_name, var_value)
44*b0d29bc4SBrooks Davis    VALUES ('PATH', '/bin:/usr/bin');
45*b0d29bc4SBrooks Davis
46*b0d29bc4SBrooks Davis-- metadata_id 1
47*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'allowed_architectures', '');
48*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'allowed_platforms', '');
49*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'description', '');
50*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'has_cleanup', 'false');
51*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'required_configs', '');
52*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'required_files', '');
53*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'required_memory', '0');
54*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'required_programs', '');
55*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'required_user', '');
56*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (1, 'timeout', '300');
57*b0d29bc4SBrooks Davis
58*b0d29bc4SBrooks Davis-- test_program_id 1
59*b0d29bc4SBrooks DavisINSERT INTO test_programs (test_program_id, absolute_path, root,
60*b0d29bc4SBrooks Davis                           relative_path, test_suite_name, metadata_id,
61*b0d29bc4SBrooks Davis                           interface)
62*b0d29bc4SBrooks Davis    VALUES (1, '/test/suite/root/foo_test', '/test/suite/root',
63*b0d29bc4SBrooks Davis            'foo_test', 'suite-name', 1, 'plain');
64*b0d29bc4SBrooks Davis
65*b0d29bc4SBrooks Davis-- test_case_id 1
66*b0d29bc4SBrooks DavisINSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
67*b0d29bc4SBrooks Davis    VALUES (1, 1, 'main', 1);
68*b0d29bc4SBrooks DavisINSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
69*b0d29bc4SBrooks Davis                          end_time)
70*b0d29bc4SBrooks Davis    VALUES (1, 'passed', NULL, 1357643611000000, 1357643621000500);
71*b0d29bc4SBrooks Davis
72*b0d29bc4SBrooks Davis-- metadata_id 2
73*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'allowed_architectures', '');
74*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'allowed_platforms', '');
75*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'description', '');
76*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'has_cleanup', 'false');
77*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'required_configs', '');
78*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'required_files', '');
79*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'required_memory', '0');
80*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'required_programs', '');
81*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'required_user', '');
82*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (2, 'timeout', '10');
83*b0d29bc4SBrooks Davis
84*b0d29bc4SBrooks Davis-- test_program_id 2
85*b0d29bc4SBrooks DavisINSERT INTO test_programs (test_program_id, absolute_path, root,
86*b0d29bc4SBrooks Davis                           relative_path, test_suite_name, metadata_id,
87*b0d29bc4SBrooks Davis                           interface)
88*b0d29bc4SBrooks Davis    VALUES (2, '/test/suite/root/subdir/another_test', '/test/suite/root',
89*b0d29bc4SBrooks Davis            'subdir/another_test', 'subsuite-name', 2, 'plain');
90*b0d29bc4SBrooks Davis
91*b0d29bc4SBrooks Davis-- test_case_id 2
92*b0d29bc4SBrooks DavisINSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
93*b0d29bc4SBrooks Davis    VALUES (2, 2, 'main', 2);
94*b0d29bc4SBrooks DavisINSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
95*b0d29bc4SBrooks Davis                          end_time)
96*b0d29bc4SBrooks Davis    VALUES (2, 'failed', 'Exited with code 1',
97*b0d29bc4SBrooks Davis            1357643622001200, 1357643622900021);
98*b0d29bc4SBrooks Davis
99*b0d29bc4SBrooks Davis-- file_id 1
100*b0d29bc4SBrooks DavisINSERT INTO files (file_id, contents) VALUES (1, x'54657374207374646f7574');
101*b0d29bc4SBrooks DavisINSERT INTO test_case_files (test_case_id, file_name, file_id)
102*b0d29bc4SBrooks Davis    VALUES (2, '__STDOUT__', 1);
103*b0d29bc4SBrooks Davis
104*b0d29bc4SBrooks Davis-- file_id 2
105*b0d29bc4SBrooks DavisINSERT INTO files (file_id, contents) VALUES (2, x'5465737420737464657272');
106*b0d29bc4SBrooks DavisINSERT INTO test_case_files (test_case_id, file_name, file_id)
107*b0d29bc4SBrooks Davis    VALUES (2, '__STDERR__', 2);
108*b0d29bc4SBrooks Davis
109*b0d29bc4SBrooks Davis-- metadata_id 3
110*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'allowed_architectures', '');
111*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'allowed_platforms', '');
112*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'description', '');
113*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'has_cleanup', 'false');
114*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'required_configs', '');
115*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'required_files', '');
116*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'required_memory', '0');
117*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'required_programs', '');
118*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'required_user', '');
119*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (3, 'timeout', '300');
120*b0d29bc4SBrooks Davis
121*b0d29bc4SBrooks Davis-- test_program_id 3
122*b0d29bc4SBrooks DavisINSERT INTO test_programs (test_program_id, absolute_path, root,
123*b0d29bc4SBrooks Davis                           relative_path, test_suite_name, metadata_id,
124*b0d29bc4SBrooks Davis                           interface)
125*b0d29bc4SBrooks Davis    VALUES (3, '/test/suite/root/subdir/bar_test', '/test/suite/root',
126*b0d29bc4SBrooks Davis            'subdir/bar_test', 'subsuite-name', 3, 'plain');
127*b0d29bc4SBrooks Davis
128*b0d29bc4SBrooks Davis-- test_case_id 3
129*b0d29bc4SBrooks DavisINSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
130*b0d29bc4SBrooks Davis    VALUES (3, 3, 'main', 3);
131*b0d29bc4SBrooks DavisINSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
132*b0d29bc4SBrooks Davis                          end_time)
133*b0d29bc4SBrooks Davis    VALUES (3, 'broken', 'Received signal 1',
134*b0d29bc4SBrooks Davis            1357643623500000, 1357643630981932);
135*b0d29bc4SBrooks Davis
136*b0d29bc4SBrooks Davis-- metadata_id 4
137*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'allowed_architectures', '');
138*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'allowed_platforms', '');
139*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'description', '');
140*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'has_cleanup', 'false');
141*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'required_configs', '');
142*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'required_files', '');
143*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'required_memory', '0');
144*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'required_programs', '');
145*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'required_user', '');
146*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (4, 'timeout', '300');
147*b0d29bc4SBrooks Davis
148*b0d29bc4SBrooks Davis-- test_program_id 4
149*b0d29bc4SBrooks DavisINSERT INTO test_programs (test_program_id, absolute_path, root,
150*b0d29bc4SBrooks Davis                           relative_path, test_suite_name, metadata_id,
151*b0d29bc4SBrooks Davis                           interface)
152*b0d29bc4SBrooks Davis    VALUES (4, '/test/suite/root/top_test', '/test/suite/root',
153*b0d29bc4SBrooks Davis            'top_test', 'suite-name', 4, 'plain');
154*b0d29bc4SBrooks Davis
155*b0d29bc4SBrooks Davis-- test_case_id 4
156*b0d29bc4SBrooks DavisINSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
157*b0d29bc4SBrooks Davis    VALUES (4, 4, 'main', 4);
158*b0d29bc4SBrooks DavisINSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
159*b0d29bc4SBrooks Davis                          end_time)
160*b0d29bc4SBrooks Davis    VALUES (4, 'expected_failure', 'Known bug',
161*b0d29bc4SBrooks Davis            1357643631000000, 1357643631020000);
162*b0d29bc4SBrooks Davis
163*b0d29bc4SBrooks Davis-- metadata_id 5
164*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'allowed_architectures', '');
165*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'allowed_platforms', '');
166*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'description', '');
167*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'has_cleanup', 'false');
168*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'required_configs', '');
169*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'required_files', '');
170*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'required_memory', '0');
171*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'required_programs', '');
172*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'required_user', '');
173*b0d29bc4SBrooks DavisINSERT INTO metadatas VALUES (5, 'timeout', '300');
174*b0d29bc4SBrooks Davis
175*b0d29bc4SBrooks Davis-- test_program_id 5
176*b0d29bc4SBrooks DavisINSERT INTO test_programs (test_program_id, absolute_path, root,
177*b0d29bc4SBrooks Davis                           relative_path, test_suite_name, metadata_id,
178*b0d29bc4SBrooks Davis                           interface)
179*b0d29bc4SBrooks Davis    VALUES (5, '/test/suite/root/last_test', '/test/suite/root',
180*b0d29bc4SBrooks Davis            'last_test', 'suite-name', 5, 'plain');
181*b0d29bc4SBrooks Davis
182*b0d29bc4SBrooks Davis-- test_case_id 5
183*b0d29bc4SBrooks DavisINSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
184*b0d29bc4SBrooks Davis    VALUES (5, 5, 'main', 5);
185*b0d29bc4SBrooks DavisINSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
186*b0d29bc4SBrooks Davis                          end_time)
187*b0d29bc4SBrooks Davis    VALUES (5, 'skipped', 'Does not apply', 1357643632000000, 1357643638000000);
188*b0d29bc4SBrooks Davis
189*b0d29bc4SBrooks Davis
190*b0d29bc4SBrooks DavisCOMMIT TRANSACTION;
191