]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/kyua/store/testdata_v3_4.sql
MFV r365599: import fix for a libexecinfo warning at higher WARNS
[FreeBSD/FreeBSD.git] / contrib / kyua / store / testdata_v3_4.sql
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 -- Mixture of test programs.
33
34
35 BEGIN TRANSACTION;
36
37
38 -- context
39 INSERT INTO contexts (cwd) VALUES ('/usr/tests');
40 INSERT INTO env_vars (var_name, var_value)
41     VALUES ('LANG', 'C');
42 INSERT INTO env_vars (var_name, var_value)
43     VALUES ('PATH', '/bin:/usr/bin');
44 INSERT INTO env_vars (var_name, var_value)
45     VALUES ('TERM', 'xterm');
46
47 -- metadata_id 12
48 INSERT INTO metadatas VALUES (12, 'allowed_architectures', '');
49 INSERT INTO metadatas VALUES (12, 'allowed_platforms', '');
50 INSERT INTO metadatas VALUES (12, 'description', '');
51 INSERT INTO metadatas VALUES (12, 'has_cleanup', 'false');
52 INSERT INTO metadatas VALUES (12, 'required_configs', '');
53 INSERT INTO metadatas VALUES (12, 'required_files', '');
54 INSERT INTO metadatas VALUES (12, 'required_memory', '0');
55 INSERT INTO metadatas VALUES (12, 'required_programs', '');
56 INSERT INTO metadatas VALUES (12, 'required_user', '');
57 INSERT INTO metadatas VALUES (12, 'timeout', '10');
58
59 -- test_program_id 8
60 INSERT INTO test_programs (test_program_id, absolute_path, root,
61                            relative_path, test_suite_name, metadata_id,
62                            interface)
63     VALUES (8, '/usr/tests/subdir/another_test', '/usr/tests',
64             'subdir/another_test', 'subsuite-name', 12, 'plain');
65
66 -- test_case_id 10
67 INSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
68     VALUES (10, 8, 'main', 12);
69 INSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
70                           end_time)
71     VALUES (10, 'failed', 'Exit failure', 1357644395000000, 1357644396000000);
72
73 -- file_id 5
74 INSERT INTO files (file_id, contents) VALUES (5, x'54657374207374646f7574');
75 INSERT INTO test_case_files (test_case_id, file_name, file_id)
76     VALUES (10, '__STDOUT__', 5);
77
78 -- file_id 6
79 INSERT INTO files (file_id, contents) VALUES (6, x'5465737420737464657272');
80 INSERT INTO test_case_files (test_case_id, file_name, file_id)
81     VALUES (10, '__STDERR__', 6);
82
83 -- metadata_id 13
84 INSERT INTO metadatas VALUES (13, 'allowed_architectures', '');
85 INSERT INTO metadatas VALUES (13, 'allowed_platforms', '');
86 INSERT INTO metadatas VALUES (13, 'description', '');
87 INSERT INTO metadatas VALUES (13, 'has_cleanup', 'false');
88 INSERT INTO metadatas VALUES (13, 'required_configs', '');
89 INSERT INTO metadatas VALUES (13, 'required_files', '');
90 INSERT INTO metadatas VALUES (13, 'required_memory', '0');
91 INSERT INTO metadatas VALUES (13, 'required_programs', '');
92 INSERT INTO metadatas VALUES (13, 'required_user', '');
93 INSERT INTO metadatas VALUES (13, 'timeout', '300');
94
95 -- test_program_id 9
96 INSERT INTO test_programs (test_program_id, absolute_path, root,
97                            relative_path, test_suite_name, metadata_id,
98                            interface)
99     VALUES (9, '/usr/tests/complex_test', '/usr/tests',
100             'complex_test', 'suite-name', 14, 'atf');
101
102 -- metadata_id 15
103 INSERT INTO metadatas VALUES (15, 'allowed_architectures', '');
104 INSERT INTO metadatas VALUES (15, 'allowed_platforms', '');
105 INSERT INTO metadatas VALUES (15, 'description', '');
106 INSERT INTO metadatas VALUES (15, 'has_cleanup', 'false');
107 INSERT INTO metadatas VALUES (15, 'required_configs', '');
108 INSERT INTO metadatas VALUES (15, 'required_files', '');
109 INSERT INTO metadatas VALUES (15, 'required_memory', '0');
110 INSERT INTO metadatas VALUES (15, 'required_programs', '');
111 INSERT INTO metadatas VALUES (15, 'required_user', '');
112 INSERT INTO metadatas VALUES (15, 'timeout', '300');
113
114 -- test_case_id 11
115 INSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
116     VALUES (11, 9, 'this_passes', 15);
117 INSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
118                           end_time)
119     VALUES (11, 'passed', NULL, 1357644396500000, 1357644397000000);
120
121 -- metadata_id 16
122 INSERT INTO metadatas VALUES (16, 'allowed_architectures', '');
123 INSERT INTO metadatas VALUES (16, 'allowed_platforms', '');
124 INSERT INTO metadatas VALUES (16, 'description', 'Test description');
125 INSERT INTO metadatas VALUES (16, 'has_cleanup', 'false');
126 INSERT INTO metadatas VALUES (16, 'required_configs', '');
127 INSERT INTO metadatas VALUES (16, 'required_files', '');
128 INSERT INTO metadatas VALUES (16, 'required_memory', '0');
129 INSERT INTO metadatas VALUES (16, 'required_programs', '');
130 INSERT INTO metadatas VALUES (16, 'required_user', 'root');
131 INSERT INTO metadatas VALUES (16, 'timeout', '300');
132
133 -- test_case_id 12
134 INSERT INTO test_cases (test_case_id, test_program_id, name, metadata_id)
135     VALUES (12, 9, 'this_fails', 16);
136 INSERT INTO test_results (test_case_id, result_type, result_reason, start_time,
137                           end_time)
138     VALUES (12, 'failed', 'Some reason', 1357644397100000, 1357644399005000);
139
140
141 COMMIT TRANSACTION;