diff options
| author | Jacob Young <jacobly0@users.noreply.github.com> | 2024-02-20 10:15:10 +0100 |
|---|---|---|
| committer | Jacob Young <jacobly0@users.noreply.github.com> | 2024-02-20 18:44:43 +0100 |
| commit | 2291560424b3cfa614cb0320d73e41aa1f5fa221 (patch) | |
| tree | f3f131f6bb5baf8e7afb44df953c83070877cba7 /test/tests.zig | |
| parent | 556db2ca36afccd623d80b620139a1428c7b65fa (diff) | |
| download | zig-2291560424b3cfa614cb0320d73e41aa1f5fa221.tar.gz zig-2291560424b3cfa614cb0320d73e41aa1f5fa221.zip | |
c_import: extract behavior tests that use `@cImport`
This introduces the new test step `test-c-import`, and removes the
ability of the behavior tests to `@cImport` paths relative to `test`.
This allows the behavior tests to be run without translate c.
Diffstat (limited to 'test/tests.zig')
| -rw-r--r-- | test/tests.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/tests.zig b/test/tests.zig index a749719c83..b07bc50f69 100644 --- a/test/tests.zig +++ b/test/tests.zig @@ -1037,6 +1037,7 @@ const ModuleTestOptions = struct { name: []const u8, desc: []const u8, optimize_modes: []const OptimizeMode, + include_paths: []const []const u8, skip_single_threaded: bool, skip_non_native: bool, skip_cross_glibc: bool, @@ -1140,7 +1141,7 @@ pub fn addModuleTests(b: *std.Build, options: ModuleTestOptions) *Step { const use_lld = if (test_target.use_lld == false) "-no-lld" else ""; const use_pic = if (test_target.pic == true) "-pic" else ""; - these_tests.addIncludePath(.{ .path = "test" }); + for (options.include_paths) |include_path| these_tests.addIncludePath(.{ .path = include_path }); if (target.os.tag == .wasi) { // WASI's default stack size can be too small for some big tests. |
