aboutsummaryrefslogtreecommitdiff
path: root/src/test.zig
AgeCommit message (Collapse)Author
2020-12-29stage2 tests: improve C backend testingAndrew Kelley
Add -Werror -pedantic -std=c89 to make sure our outputted C code is squeaky clean. Allow garbage to be printed to stderr for Execution tests because wasmtime is printing a bogus warning, causing the CI to fail.
2020-12-29stage2: C backend improvementsAndrew Kelley
* Module: improve doc comments * C backend: improve const-correctness * C backend: introduce renderTypeAndName * C backend: put `static` on functions when appropriate * C backend: fix not handling errors in genBinOp * C backend: handle more IR instructions - alloc, store, boolean comparisons, ret_ptr * C backend: call instruction properly stores its result * test harness: ensure execution tests have empty stderr
2020-12-29stage2 tests: pass cwd to child process to fix exe pathAndrew Kelley
Previous commit broke the tests for non-Windows because we were intending to change the cwd when running the child process. However, for Windows we don't support passing a directory handle for cwd when spawning child processes yet. However on Linux we do. This commit reverts the previous one but then fixes things for all systems by passing both cwd_dir and cwd to the child process.
2020-12-28stage2 tests: fix incorrect path used for execution binaryAndrew Kelley
2020-12-28stage2 tests: better failure reporting for failed executionAndrew Kelley
2020-12-28stage2: improve test harness to support executing generated C codeAndrew Kelley
2020-12-28stage2: C backend: implement `@breakpoint` and clean up test harnessAndrew Kelley
2020-12-23Don't use emit-h in test cases for other backends.Alex Cameron
2020-12-23Fix a dumbNoam Preil
2020-12-23Add header test harnessNoam Preil
2020-12-20update stage2 test harness to new std.Progress APIAndrew Kelley
2020-12-20use kprotty's ThreadPool implementation (v5)Andrew Kelley
2020-12-18std: introduce a thread-local CSPRNG for general useAndrew Kelley
std.crypto.random * cross platform, even freestanding * can't fail. on initialization for some systems requires calling os.getrandom(), in which case there are rare but theoretically possible errors. The code panics in these cases, however the application may choose to override the default seed function and then handle the failure another way. * thread-safe * supports the full Random interface * cryptographically secure * no syscall required to initialize on Linux (AT_RANDOM) * calls arc4random on systems that support it `std.crypto.randomBytes` is removed in favor of `std.crypto.random.bytes`. I moved some of the Random implementations into their own files in the interest of organization. stage2 no longer requires passing a RNG; instead it uses this API. Closes #6704
2020-12-13stage2: link musl dynamically by default if nativeIsaac Freund
If targeting the native OS and the system libc is musl, link against it dynamically by default.
2020-12-04stage2: introduce Module.failed_root_source_fileAndrew Kelley
Use case: zig build-exe non_existent_file.zig Previous behavior: error.FileNotFound, followed by an error return trace Behavior after this commit: error: unable to read non_existent_file.zig: FileNotFound (end of stderr, exit code 1) This turns AllErrors.Message into a tagged union which now has the capability to represent both "plain" errors as well as source-based errors (with file, line, column, byte offset). The "no entry point found" error has moved to be a plain error message.
2020-12-02wire up -Dskip-non-native to stage2 testsAndrew Kelley
2020-10-30stage2: fix test harness tmp path handlingVexu
2020-09-30stage2: support multiple files in testsVexu
2020-09-24fix a round of regressions in this branchAndrew Kelley
* Don't try to generate C header files yet since it will only cause a crash saying the feature is unimplemented. * Rename the CLI options for release modes to use the `-O` prefix to match C compiler precedent. Options are now `-ODebug`, `-OReleaseFast`, `-OReleaseSafe`, `-OReleaseSmall`. The optimization mode matches the enum tags of std.builtin.Mode. It is planned to, at some point, rename std.builtin.Mode to std.builtin.OptimizationMode and modify the tags to be lower case to match the style convention. - Update build.zig code to support this new CLI. * update std.zig.binNameAlloc to support an optional Version and update the implementation to correctly deal with dynamic library version suffixes.
2020-09-22stage2: implement using the global cache dirAndrew Kelley
2020-09-21fix regressed stage2 test harnessAndrew Kelley
2020-09-21rename src-self-hosted/ to src/Andrew Kelley