| author | |
| committer | |
| log | 6f0d1255260410441c377a52dd73c308517276cd |
| tree | 1687a11910c70ccf8a718fbc33d2cfef64b58d41 |
| parent | 840e25a18ee33d8bc08f2134fc1595aec56c09cc |
| signature |
4 files changed, 18 insertions(+), 9 deletions(-)
build.zig+13-8| ... | ... | @@ -4,13 +4,15 @@ const deps = @import("./deps.zig"); |
| 4 | 4 | |
| 5 | 5 | pub fn build(b: *std.Build) void { |
| 6 | 6 | const target = b.standardTargetOptions(.{}); |
| 7 | const mode = b.option(std.builtin.Mode, "mode", "") orelse .Debug; | |
| 7 | const mode = b.option(std.builtin.OptimizeMode, "mode", "") orelse .Debug; | |
| 8 | 8 | const disable_llvm = b.option(bool, "disable_llvm", "use the non-llvm zig codegen") orelse false; |
| 9 | 9 | |
| 10 | 10 | const test_exe = b.addTest(.{ |
| 11 | .root_source_file = b.path("test.zig"), | |
| 12 | .target = target, | |
| 13 | .optimize = mode, | |
| 11 | .root_module = b.createModule(.{ | |
| 12 | .root_source_file = b.path("test.zig"), | |
| 13 | .target = target, | |
| 14 | .optimize = mode, | |
| 15 | }), | |
| 14 | 16 | }); |
| 15 | 17 | deps.addAllTo(test_exe); |
| 16 | 18 | test_exe.use_llvm = !disable_llvm; |
| ... | ... | @@ -45,11 +47,14 @@ pub fn build(b: *std.Build) void { |
| 45 | 47 | } |
| 46 | 48 | |
| 47 | 49 | fn addFuzzer(b: *std.Build, target: std.Build.ResolvedTarget, comptime name: []const u8, afl_clang_args: []const []const u8) *std.Build.Step.InstallFile { |
| 48 | const fuzz_lib = b.addStaticLibrary(.{ | |
| 50 | const fuzz_lib = b.addLibrary(.{ | |
| 51 | .linkage = .static, | |
| 49 | 52 | .name = "fuzz-" ++ name ++ "-lib", |
| 50 | .root_source_file = b.path("fuzz/main.zig"), | |
| 51 | .target = target, | |
| 52 | .optimize = .Debug, | |
| 53 | .root_module = b.createModule(.{ | |
| 54 | .root_source_file = b.path("fuzz/main.zig"), | |
| 55 | .target = target, | |
| 56 | .optimize = .Debug, | |
| 57 | }), | |
| 53 | 58 | }); |
| 54 | 59 | fuzz_lib.want_lto = true; |
| 55 | 60 | fuzz_lib.bundle_compiler_rt = true; |
licenses.txt+1| ... | ... | @@ -1,6 +1,7 @@ |
| 1 | 1 | MIT: |
| 2 | 2 | = https://spdx.org/licenses/MIT |
| 3 | 3 | - This |
| 4 | - git https://github.com/nektro/zig-expect | |
| 4 | 5 | - git https://github.com/nektro/zig-extras |
| 5 | 6 | - git https://github.com/nektro/zig-sys-darwin |
| 6 | 7 | - git https://github.com/nektro/zig-sys-linux |
test.zig+2-1| ... | ... | @@ -3,6 +3,7 @@ const json = @import("json"); |
| 3 | 3 | const build_options = @import("build_options"); |
| 4 | 4 | const nfs = @import("nfs"); |
| 5 | 5 | const nio = @import("nio"); |
| 6 | const expect = @import("expect").expect; | |
| 6 | 7 | |
| 7 | 8 | const JSONTestSuite_root = build_options.JSONTestSuite_root; |
| 8 | 9 | |
| ... | ... | @@ -579,7 +580,7 @@ fn expectCanonical(buffer: []const u8) !void { |
| 579 | 580 | defer doc.deinit(alloc); |
| 580 | 581 | doc.acquire(); |
| 581 | 582 | defer doc.release(); |
| 582 | try std.testing.expectFmt(buffer, "{}", .{doc}); | |
| 583 | try expect(buffer).toEqualNFmt("{}", .{doc}); | |
| 583 | 584 | |
| 584 | 585 | var buf: [4096]u8 = undefined; |
| 585 | 586 | var out: nio.FixedBufferStream([]u8) = .init(&buf); |
zig.mod+2| ... | ... | @@ -12,6 +12,8 @@ dependencies: |
| 12 | 12 | root_dependencies: |
| 13 | 13 | - src: git https://github.com/nektro/zig-nio |
| 14 | 14 | - src: git https://github.com/nektro/zig-nfs |
| 15 | - src: git https://github.com/nektro/zig-expect | |
| 16 | ||
| 15 | 17 | - src: git https://github.com/nst/JSONTestSuite commit-984defc2deaa653cb73cd29f4144a720ec9efe7c |
| 16 | 18 | id: bebdygynna6kk8zbbprkva6yd28x9wmf57vtzxjn |
| 17 | 19 | license: MIT |