chore: import upstream snapshot with attribution
CI / Deep Native Runtime Cases (1/6) (push) Has been skipped
CI / Native Preflight (push) Failing after 1s
CI / Native Runtime Cases (1/2) (push) Failing after 0s
CI / Native Runtime Cases (2/2) (push) Failing after 1s
CI / Native Metadata Reports (push) Failing after 0s
CI / Native Direct Backend Artifacts (push) Failing after 0s
CI / Native Sanitizer Smoke (push) Failing after 1s
CI / Command Contract Snapshots (push) Failing after 1s
CI / Deep Conformance Suite (push) Has been skipped
CI / Graph Build Perf (push) Failing after 1s
CI / Deep Native Preflight (push) Has been skipped
CI / Deep Native Runtime Cases (2/6) (push) Has been skipped
CI / Deep Native Runtime Cases (3/6) (push) Has been skipped
CI / Conformance Suite (push) Failing after 1s
CI / Workspace Checks (push) Failing after 0s
CI / Deep Native Runtime Cases (5/6) (push) Has been skipped
CI / Deep Native Runtime Cases (6/6) (push) Has been skipped
CI / Deep Native Runtime Cases (4/6) (push) Has been skipped
CI / Deep Graph Build Perf (push) Has been skipped
CI / Deep Native Runtime Cases (1/6) (push) Has been skipped
CI / Native Preflight (push) Failing after 1s
CI / Native Runtime Cases (1/2) (push) Failing after 0s
CI / Native Runtime Cases (2/2) (push) Failing after 1s
CI / Native Metadata Reports (push) Failing after 0s
CI / Native Direct Backend Artifacts (push) Failing after 0s
CI / Native Sanitizer Smoke (push) Failing after 1s
CI / Command Contract Snapshots (push) Failing after 1s
CI / Deep Conformance Suite (push) Has been skipped
CI / Graph Build Perf (push) Failing after 1s
CI / Deep Native Preflight (push) Has been skipped
CI / Deep Native Runtime Cases (2/6) (push) Has been skipped
CI / Deep Native Runtime Cases (3/6) (push) Has been skipped
CI / Conformance Suite (push) Failing after 1s
CI / Workspace Checks (push) Failing after 0s
CI / Deep Native Runtime Cases (5/6) (push) Has been skipped
CI / Deep Native Runtime Cases (6/6) (push) Has been skipped
CI / Deep Native Runtime Cases (4/6) (push) Has been skipped
CI / Deep Graph Build Perf (push) Has been skipped
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
use names
|
||||
|
||||
use validate
|
||||
|
||||
pub fn main(world: World) -> Void raises [NotFound, TooLarge, Io] {
|
||||
let fs: Fs = std.fs.host()
|
||||
var path_storage: [64]u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
let joined: Maybe<String> = std.path.join(path_storage, ".zero", inputName())
|
||||
if !joined.has {
|
||||
raise TooLarge
|
||||
}
|
||||
let path: String = joined.value
|
||||
let created: Maybe<owned<File>> = std.fs.create(fs, path)
|
||||
if created.has {
|
||||
var file: owned<File> = created.value
|
||||
if !std.fs.writeAll(&mut file, std.mem.span("batch3 cli ok\n")) {
|
||||
return
|
||||
}
|
||||
}
|
||||
var read_storage: [64]u8 = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
|
||||
var alloc: FixedBufAlloc = std.mem.fixedBufAlloc(read_storage)
|
||||
var body: owned<ByteBuf> = check std.fs.readAllOrRaise(alloc, fs, path, 64)
|
||||
if isExpected(std.mem.bufBytes(&body)) {
|
||||
check world.out.write("batch3 cli ok\n")
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
pub fn inputName() -> String {
|
||||
return std.args.getOr(1, "batch3.txt")
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
pub fn isExpected(bytes: MutSpan<u8>) -> Bool {
|
||||
return std.mem.eqlBytes(bytes, std.mem.span("batch3 cli ok\n"))
|
||||
}
|
||||
Reference in New Issue
Block a user