| ... | @@ -165,6 +165,12 @@ const ErrorMsg = union(enum) { | ... | @@ -165,6 +165,12 @@ const ErrorMsg = union(enum) { |
| 165 | } | 165 | } |
| 166 | }; | 166 | }; |
| 167 | | 167 | |
| | 168 | /// Default config values for known test manifest key-value pairings. |
| | 169 | /// Currently handled defaults are: |
| | 170 | /// * backend |
| | 171 | /// * target |
| | 172 | /// * output_mode |
| | 173 | /// * is_test |
| 168 | const TestManifestConfigDefaults = struct { | 174 | const TestManifestConfigDefaults = struct { |
| 169 | /// Asserts if the key doesn't exist - yep, it's an oversight alright. | 175 | /// Asserts if the key doesn't exist - yep, it's an oversight alright. |
| 170 | fn get(@"type": TestManifest.Type, key: []const u8) []const u8 { | 176 | fn get(@"type": TestManifest.Type, key: []const u8) []const u8 { |
| ... | @@ -186,7 +192,7 @@ const TestManifestConfigDefaults = struct { | ... | @@ -186,7 +192,7 @@ const TestManifestConfigDefaults = struct { |
| 186 | } | 192 | } |
| 187 | // Wasm | 193 | // Wasm |
| 188 | defaults = defaults ++ "wasm32-wasi"; | 194 | defaults = defaults ++ "wasm32-wasi"; |
| 189 | return defaults[0 .. defaults.len - 2]; | 195 | return defaults; |
| 190 | } | 196 | } |
| 191 | } else if (std.mem.eql(u8, key, "output_mode")) { | 197 | } else if (std.mem.eql(u8, key, "output_mode")) { |
| 192 | return switch (@"type") { | 198 | return switch (@"type") { |