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