aboutsummaryrefslogtreecommitdiff
path: root/test/src
AgeCommit message (Collapse)Author
2025-09-16test: delete old stage1 compile_errors testsAlex Rønne Petersen
generic_function_returning_opaque_type.zig was salvaged as it's still worth having.
2025-09-16test: rename backend=stage2 to backend=selfhosted, and add backend=autoAlex Rønne Petersen
backend=auto (now the default if backend is omitted) means to let the compiler pick whatever backend it wants as the default. This is important for platforms where we don't yet have a self-hosted backend, such as loongarch64. Also purge a bunch of redundant target=native.
2025-09-16test: remove test-compare-output and test-asm-link testsAlex Rønne Petersen
These were low value and unfocused tests. We already have coverage of the important aspects of these tests elsewhere. Additionally, there was really no need for these to have their own test harness.
2025-08-30update tools and other miscellaneous things to new APIsAndrew Kelley
2025-08-30upgrade more old API usesAndrew Kelley
2025-08-15fix: print error set members in a consistent orderWill Lillis
Co-authored-by: Matthew Lugg <mlugg@mlugg.co.uk>
2025-08-11std.ArrayList: make unmanaged the defaultAndrew Kelley
2025-08-02build: add -Dskip-compile-errors optionAlex Rønne Petersen
Skips tests in test/cases/compile_errors.
2025-07-26aarch64: implement some safety checksJacob Young
Closes #24553
2025-07-26Migrate from deprecated `Step.Compile` APIsCarl Åstholm
2025-07-24Revert "disable -fno-llvm -target wasm32-wasi testing"Pavel Verigo
This reverts commit 83960e0eb068f786c46c3fe559016e1e9faea3cd.
2025-07-19disable -fno-llvm -target wasm32-wasi testingAndrew Kelley
no active maintainer, and it's failing to lower some basic stuff
2025-07-11Remove numerous things deprecated during the 0.14 release cycleLinus Groh
Basically everything that has a direct replacement or no uses left. Notable omissions: - std.ArrayHashMap: Too much fallout, needs a separate cleanup. - std.debug.runtime_safety: Too much fallout. - std.heap.GeneralPurposeAllocator: Lots of references to it remain, not a simple find and replace as "debug allocator" is not equivalent to "general purpose allocator". - std.io.Reader: Is being reworked at the moment. - std.unicode.utf8Decode(): No replacement, needs a new API first. - Manifest backwards compat options: Removal would break test data used by TestFetchBuilder. - panic handler needs to be a namespace: Many tests still rely on it being a function, needs a separate cleanup.
2025-07-07update standalone and incremental tests to new APIAndrew Kelley
2025-07-03test: Respect various test skip options in test-casesAlex Rønne Petersen
2025-06-19Target: pass and use locals by pointer instead of by valueJacob Young
This struct is larger than 256 bytes and code that copies it consistently shows up in profiles of the compiler.
2025-06-19Build: change how the target is printed in step namesJacob Young
e.g. `x86_64-windows.win10...win11_dt-gnu` -> `x86_64-windows-gnu` When the OS version is the default this is redundant with checking the default in the standard library.
2025-06-12test-stack-traces: correct expected object file nameJacob Young
The name of the ZCU object file emitted by the LLVM backend has been changed in this branch from e.g. `foo.obj` to `foo_zcu.obj`. This is to avoid name clashes. This commit just updates the stack trace tests which started failing on windows because of the object name change.
2025-06-06restore debug llvm CI coverageAndrew Kelley
and reduce redundant coverage in slow runs to save time
2025-06-01cases: include dirname in case namesmlugg
For instance, the file 'cases/compile_errors/undeclared_identifier.zig' now corresponds to test name 'compile_errors.undeclared_identifier'. This is useful because you can now filter based on the case dirname using `-Dtest-filter`.
2025-05-13Merge pull request #21882 from alexrp/compiler-fixesAlex Rønne Petersen
compiler: Fix some real and theoretical miscompilations with `allowzero` and `volatile`
2025-05-12Merge pull request #23700 from sorairolake/rename-trimsAlex Rønne Petersen
chore(std.mem): Rename `trimLeft` and `trimRight` to `trimStart` and `trimEnd`
2025-05-12std.Build: Make no_builtin a property of Module instead of Step.Compile.Alex Rønne Petersen
This reflects how the compiler actually treats it. Closes #23424.
2025-05-12test: Add test-llvm-ir step and harness for testing generated LLVM IR.Alex Rønne Petersen
2025-05-12test: Fix incorrect interpretation of -Dtest-filter=... for test-debugger.Alex Rønne Petersen
2025-04-27test: Configure emit_asm/emit_bin correctly for some targets in llvm_targets.Alex Rønne Petersen
2025-04-27test: Allow cases to set emit_asm (defaults to false).Alex Rønne Petersen
2025-04-27chore(std.mem): Rename `trimLeft` and `trimRight`Shun Sakai
Rename `trimLeft` to `trimStart`, and `trimRight` to `trimEnd`. `trimLeft` and `trimRight` functions remain as deprecated aliases for these new names.
2025-04-13std: eradicate u29 and embrace std.mem.AlignmentAndrew Kelley
2025-03-05Remove uses of deprecated callconv aliasesLinus Groh
2025-02-25correct some bugsDavid Rubin
2025-02-23cases: remove old incremental case systemmlugg
We now run incremental tests with `tools/incr-check.zig` (with the actual cases being in `test/incremental/`).
2025-02-20test: Disable packet timeout for debugger tests.Alex Rønne Petersen
On my machine, the defaults are 5 seconds (LLDB) and 2 seconds (GDB). These are too low on the CI machines during high load, and the CI system itself already enforces a timeout on jobs anyway, so just disable the timeout altogether.
2025-02-15test: fix windows CIJacob Young
2025-02-03compiler,std: implement ZON supportMason Remaley
This commit allows using ZON (Zig Object Notation) in a few ways. * `@import` can be used to load ZON at comptime and convert it to a normal Zig value. In this case, `@import` must have a result type. * `std.zon.parse` can be used to parse ZON at runtime, akin to the parsing logic in `std.json`. * `std.zon.stringify` can be used to convert arbitrary data structures to ZON at runtime, again akin to `std.json`.
2025-01-25Merge pull request #22581 from jacobly0/x86_64-rewriteAndrew Kelley
x86_64: rewrite `@abs` on floats
2025-01-24x86_64: rewrite float vector `@abs` and equality comparisonsJacob Young
2025-01-24all: update for `panic.unwrapError` and `panic.call` signature changesmlugg
2025-01-23tests: enable stack trace tests for x86_64-selfhostedmlugg
Allows the stack trace tests to be additionally compiled and run with `.use_llvm = false, .use_lld = false` depending on the host target. This is currently enabled for x86_64 targets emitting ELF. Self-hosted backends emit slightly different DWARF info to the LLVM backend, so the checking logic (and the tests themselves) had to be tweaked slightly to support both backends at once.
2025-01-22std.Build: add `addLibrary` function (#22554)BratishkaErik
Acts as a replacement for `addSharedLibrary` and `addStaticLibrary`, but linking mode can be changed more easily in build.zig, for example: In library: ```zig const linkage = b.option(std.builtin.LinkMode, "linkage", "Link mode for a foo_bar library") orelse .static; // or other default const lib = b.addLibrary(.{ .linkage = linkage, .name = "foo_bar", .root_module = mod, }); ``` In consumer: ```zig const dep_foo_bar = b.dependency("foo_bar", .{ .target = target, .optimize = optimize, .linkage = .static // or dynamic }); mod.linkLibrary(dep_foor_bar.artifact("foo_bar")); ``` It also matches nicely with `linkLibrary` name. Signed-off-by: Eric Joldasov <bratishkaerik@landless-city.net>
2025-01-12Dwarf: emit debug info for extern globalsJacob Young
2024-12-18test-debugger: migrate from deprecated std.Build APIsmlugg
2024-12-18test-run-translated-c: migrate from deprecated std.Build APIsmlugg
2024-12-18test-compare-output: migrate from deprecated std.Build APIsmlugg
2024-12-18test-stack-traces: migrate from deprecated std.Build APIsmlugg
2024-12-18test-cases: migrate from deprecated std.Build APIsmlugg
2024-11-28test: Change llvm_targets to actually emit an object for each target.Alex Rønne Petersen
Without doing this, we don't actually test whether the data layout string we generate matches LLVM's. A number of targets had to be commented out due to this change: * Some are using a non-working experimental LLVM backend (arc, csky, ...). * Some don't have working LLD support (lanai, sparc, ...). * Some don't have working self-hosted linker support (nvptx). * Some are using ABIs that haven't been standardized (loongarch32). Finally, all non-x86 uefi targets are hopelessly broken and can't really be fixed until we change our emit logic to lower *-uefi-* verbatim rather than to *-windows-*. See: https://github.com/ziglang/zig/issues/21630
2024-11-28Merge pull request #22067 from alexrp/pie-testsAlex Rønne Petersen
Add PIC/PIE tests and fix some bugs + some improvements to the test harness
2024-11-24dwarf: fix stepping through an inline loop containing one statementJacob Young
Previously, stepping from the single statement within the loop would always exit the loop because all of the code unrolled from the loop is associated with the same line and treated by the debugger as one line.
2024-11-24test: Allow tests to set emit_bin=false.Alex Rønne Petersen