├── .gitignore ├── LICENSE ├── README.md ├── build.zig └── build.zig.zon /.gitignore: -------------------------------------------------------------------------------- 1 | /zig-cache/ 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (Expat) 2 | 3 | Copyright (c) contributors 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # User-Contributed Extra Test Suite for Zig Toolchain 2 | 3 | Ideally, all Zig toolchain tests would have perfect, minimized test cases, and 4 | they would all go into the ziglang/zig repository, and they would not need 5 | network access, but they would somehow also test the network, and the CI would 6 | complete quickly, but also it would have a ton of test coverage, and it would 7 | cover regressions in real world projects, but it would account for intentional 8 | breaking changes, and it wouldn't have any system dependencies, but it would 9 | also test dependencies on system libraries... alas! These requirements are 10 | impossible and downright contradictory. 11 | 12 | This repository exists as a pragmatic strategy to augment what is missed in the 13 | ziglang/zig repository. 14 | 15 | * Network access: OK! 16 | * Depending on large quantities of third party projects: OK! 17 | * Depending on system things to be installed: OK! 18 | * Taking forever for tests to build and run: OK! 19 | 20 | Rust has that project [crater](https://github.com/rust-lang/crater) which fills 21 | a similar role as this. This project is a poor man's crater. Maybe, like a good 22 | Pokemon, it can evolve into something better someday. 23 | 24 | Expect this codebase to be volatile. Breakage in this repository can be helpful 25 | for working on Zig, but unlike the CI in ziglang/zig, it does not stop the flow 26 | of commits when tests are failing. 27 | 28 | ## Running the test suite 29 | 30 | It is recommended to run this in a sandboxed environment. This project does not 31 | currently automatically discover and run code but with user-contributed code, 32 | the chances are much higher for malicious code. 33 | 34 | ``` 35 | zig build 36 | ``` 37 | 38 | Pass `--help` to discover additional options. 39 | 40 | ## Contributing 41 | 42 | Feel free to submit a pull request adding your project to build.zig.zon and 43 | build.zig. 44 | 45 | This gives a chance, but not a guarantee, that Zig contributors will identify 46 | and fix regressions in the Zig toolchain before they affect your project. 47 | 48 | Zig developers may decide to remove projects from this repository if 49 | maintaining them as part of this test suite is deemed not worth the effort. If 50 | your project is removed at some point, feel free to submit another pull request 51 | to add it back after you get it working again. 52 | -------------------------------------------------------------------------------- /build.zig: -------------------------------------------------------------------------------- 1 | const std = @import("std"); 2 | 3 | pub fn build(b: *std.Build) void { 4 | add(b, "transitive_lib_headers_bug"); 5 | add(b, "groovebasin"); 6 | add(b, "nanovg_example"); 7 | add(b, "package_manager_regression_tests"); 8 | add(b, "tls_conformance"); 9 | } 10 | 11 | fn add(b: *std.Build, name: []const u8) void { 12 | b.default_step.dependOn(b.dependency(name, .{}).builder.default_step); 13 | } 14 | -------------------------------------------------------------------------------- /build.zig.zon: -------------------------------------------------------------------------------- 1 | .{ 2 | .name = "contrib-testing", 3 | .version = "0.0.0", 4 | .dependencies = .{ 5 | .transitive_lib_headers_bug = .{ 6 | .url = "https://github.com/vesim987/zig-install-headers-bug/archive/124a41795eb97d8a3830b440846c1ac4563fef2c.tar.gz", 7 | .hash = "12200bc414a73a5f6fe8e49cc2f4e4eb0b26067f18189ea1a77671243cb0e285325e", 8 | }, 9 | .groovebasin = .{ 10 | .url = "https://github.com/andrewrk/groovebasin/archive/4dbd4ba0b0296ebfa6077c15295b444b4aa3dd31.tar.gz", 11 | .hash = "1220a0b048b2fe4d871e25024bd099c655226781b4fb48921c5c5ae2d55b22abba78", 12 | }, 13 | .nanovg_example = .{ 14 | .url = "https://github.com/andrewrk/nanovg-example/archive/aefa183179579a8f51b5cafcca0592b24dad17f0.tar.gz", 15 | .hash = "12208d79b10887a893b49fa9d1df5dd7e10d4b47199c6ec02c90a936a8f633a2080d", 16 | }, 17 | .package_manager_regression_tests = .{ 18 | .url = "https://github.com/Cloudef/zig-package-manager-regression-tests/archive/7987ef6c1eeda1f48870e50149480bc3d5257802.tar.gz", 19 | .hash = "1220c5a50c21fa35c2d519b8343968202648f955d8611deae758a53ccd0000c8ee37", 20 | }, 21 | .tls_conformance = .{ 22 | .url = "git+https://github.com/jacobly0/tls-conformance.git#1538d80d897f002a91ded95a3f58294bb40ffbf0", 23 | .hash = "12203012a78775d7c342953cc75103c91de8c7e6cc5cc31355a1d59a3af6078d2b51", 24 | }, 25 | }, 26 | .paths = .{ 27 | "build.zig", 28 | "build.zig.zon", 29 | "LICENSE", 30 | "README.md", 31 | }, 32 | } 33 | --------------------------------------------------------------------------------