From 11f7e1ad82370255ad46986e7cb77fb47377b739 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Mon, 30 Jan 2023 18:01:01 -0800 Subject: [PATCH] CI: fix tests --- ci/launcher | 10 ++++++++++ toolchain/launcher.zig | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/ci/launcher b/ci/launcher index 011f83b..3a4f31f 100755 --- a/ci/launcher +++ b/ci/launcher @@ -3,6 +3,16 @@ set -xeuo pipefail ZIG=${ZIG:-bazel run "$@" @zig_sdk//:zig --} +for target in \ + aarch64-linux-gnu.2.19 \ + aarch64-macos-none \ + x86_64-linux-gnu.2.19 \ + x86_64-macos-none \ + x86_64-windows-gnu +do + $ZIG build-exe -fno-emit-bin -target $target toolchain/launcher.zig +done + # until bazel-zig-cc gets a zig toolchain, run launcher's unit tests here. $ZIG test toolchain/launcher.zig diff --git a/toolchain/launcher.zig b/toolchain/launcher.zig index 1043f49..b2a907a 100644 --- a/toolchain/launcher.zig +++ b/toolchain/launcher.zig @@ -121,7 +121,7 @@ pub fn main() u8 { switch (action) { .early_ok => return 0, - .early_err => |msg| return fatal(msg), + .early_err => |msg| return fatal("{s}", .{msg}), .exec => |params| { if (builtin.os.tag == .windows) return spawnWindows(arena, params) @@ -240,7 +240,7 @@ fn parseFatal( } pub fn fatal(comptime fmt: []const u8, args: anytype) u8 { - fmt.debug.print(fmt, args); + std.debug.print(fmt, args); return 1; }