mirror of
https://github.com/zigzap/zap.git
synced 2025-10-20 23:24:09 +00:00
tests: build exe
This commit is contained in:
parent
b69599dcda
commit
5147aa05d4
2 changed files with 9 additions and 2 deletions
|
@ -129,12 +129,17 @@ pub fn build(b: *std.build.Builder) !void {
|
||||||
});
|
});
|
||||||
auth_tests.linkLibrary(facil_dep.artifact("facil.io"));
|
auth_tests.linkLibrary(facil_dep.artifact("facil.io"));
|
||||||
auth_tests.addModule("zap", zap_module);
|
auth_tests.addModule("zap", zap_module);
|
||||||
auth_tests.step.dependOn(&http_client_runner_build_step.step);
|
|
||||||
|
|
||||||
const run_auth_tests = b.addRunArtifact(auth_tests);
|
const run_auth_tests = b.addRunArtifact(auth_tests);
|
||||||
|
// TODO: for some reason, tests aren't run more than once unless
|
||||||
|
// dependencies have changed.
|
||||||
|
// So, for now, we just force the exe to be built, so in order that
|
||||||
|
// we can call it again when needed.
|
||||||
|
const install_auth_tests = b.addInstallArtifact(auth_tests);
|
||||||
|
|
||||||
const test_step = b.step("test", "Run unit tests");
|
const test_step = b.step("test", "Run unit tests [REMOVE zig-cache!]");
|
||||||
test_step.dependOn(&run_auth_tests.step);
|
test_step.dependOn(&run_auth_tests.step);
|
||||||
|
test_step.dependOn(&install_auth_tests.step);
|
||||||
|
|
||||||
// pkghash
|
// pkghash
|
||||||
//
|
//
|
||||||
|
|
|
@ -619,4 +619,6 @@ test "BasicAuth UserPass authenticateRequest test-unauthorized" {
|
||||||
});
|
});
|
||||||
|
|
||||||
try std.testing.expectEqualStrings("UNAUTHORIZED", received_response);
|
try std.testing.expectEqualStrings("UNAUTHORIZED", received_response);
|
||||||
|
|
||||||
|
std.debug.print("\n\nFINISHED!", .{});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue