authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-12 20:05:34-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-10-12 20:08:23-07:00
log27b04d59056ff8d8ab52f6578b1e0559545efcdd
tree609c5ba38f06451f9194f09de10c29a2c7a47473
parent74e3ffa9b4fec971a18d08cc808f3ed9b884db15

disable the failing std lib freebsd tests

enable std lib freebsd tests on the CI See #1759

2 files changed, 12 insertions(+), 4 deletions(-)

ci/srht/freebsd_script+1-2
...@@ -33,8 +33,7 @@ make $JOBS install...@@ -33,8 +33,7 @@ make $JOBS install
3333
34release/bin/zig build test-fmt34release/bin/zig build test-fmt
35release/bin/zig build test-behavior35release/bin/zig build test-behavior
36# TODO get these tests passing on freebsd and re-enable36release/bin/zig build test-std
37#release/bin/zig build test-std
38release/bin/zig build test-compiler-rt37release/bin/zig build test-compiler-rt
39release/bin/zig build test-compare-output38release/bin/zig build test-compare-output
40release/bin/zig build test-standalone39release/bin/zig build test-standalone
lib/std/fs/test.zig+11-2
...@@ -227,7 +227,7 @@ test "directory operations on files" {...@@ -227,7 +227,7 @@ test "directory operations on files" {
227 testing.expectError(error.NotDir, tmp_dir.dir.openDir(test_file_name, .{}));227 testing.expectError(error.NotDir, tmp_dir.dir.openDir(test_file_name, .{}));
228 testing.expectError(error.NotDir, tmp_dir.dir.deleteDir(test_file_name));228 testing.expectError(error.NotDir, tmp_dir.dir.deleteDir(test_file_name));
229229
230 if (builtin.os.tag != .wasi) {230 if (builtin.os.tag != .wasi and builtin.os.tag != .freebsd) {
231 const absolute_path = try tmp_dir.dir.realpathAlloc(testing.allocator, test_file_name);231 const absolute_path = try tmp_dir.dir.realpathAlloc(testing.allocator, test_file_name);
232 defer testing.allocator.free(absolute_path);232 defer testing.allocator.free(absolute_path);
233233
...@@ -243,6 +243,9 @@ test "directory operations on files" {...@@ -243,6 +243,9 @@ test "directory operations on files" {
243}243}
244244
245test "file operations on directories" {245test "file operations on directories" {
246 // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759
247 if (builtin.os.tag == .freebsd) return error.SkipZigTest;
248
246 var tmp_dir = tmpDir(.{});249 var tmp_dir = tmpDir(.{});
247 defer tmp_dir.cleanup();250 defer tmp_dir.cleanup();
248251
...@@ -261,7 +264,7 @@ test "file operations on directories" {...@@ -261,7 +264,7 @@ test "file operations on directories" {
261 // TODO: Add a read-only test as well, see https://github.com/ziglang/zig/issues/5732264 // TODO: Add a read-only test as well, see https://github.com/ziglang/zig/issues/5732
262 testing.expectError(error.IsDir, tmp_dir.dir.openFile(test_dir_name, .{ .write = true }));265 testing.expectError(error.IsDir, tmp_dir.dir.openFile(test_dir_name, .{ .write = true }));
263266
264 if (builtin.os.tag != .wasi) {267 if (builtin.os.tag != .wasi and builtin.os.tag != .freebsd) {
265 const absolute_path = try tmp_dir.dir.realpathAlloc(testing.allocator, test_dir_name);268 const absolute_path = try tmp_dir.dir.realpathAlloc(testing.allocator, test_dir_name);
266 defer testing.allocator.free(absolute_path);269 defer testing.allocator.free(absolute_path);
267270
...@@ -656,6 +659,9 @@ const FILE_LOCK_TEST_SLEEP_TIME = 5 * std.time.ns_per_ms;...@@ -656,6 +659,9 @@ const FILE_LOCK_TEST_SLEEP_TIME = 5 * std.time.ns_per_ms;
656test "open file with exclusive nonblocking lock twice" {659test "open file with exclusive nonblocking lock twice" {
657 if (builtin.os.tag == .wasi) return error.SkipZigTest;660 if (builtin.os.tag == .wasi) return error.SkipZigTest;
658661
662 // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759
663 if (builtin.os.tag == .freebsd) return error.SkipZigTest;
664
659 const dir = fs.cwd();665 const dir = fs.cwd();
660 const filename = "file_nonblocking_lock_test.txt";666 const filename = "file_nonblocking_lock_test.txt";
661667
...@@ -757,6 +763,9 @@ test "create file, lock and read from multiple process at once" {...@@ -757,6 +763,9 @@ test "create file, lock and read from multiple process at once" {
757test "open file with exclusive nonblocking lock twice (absolute paths)" {763test "open file with exclusive nonblocking lock twice (absolute paths)" {
758 if (builtin.os.tag == .wasi) return error.SkipZigTest;764 if (builtin.os.tag == .wasi) return error.SkipZigTest;
759765
766 // TODO: fix this test on FreeBSD. https://github.com/ziglang/zig/issues/1759
767 if (builtin.os.tag == .freebsd) return error.SkipZigTest;
768
760 const allocator = testing.allocator;769 const allocator = testing.allocator;
761770
762 const file_paths: [1][]const u8 = .{"zig-test-absolute-paths.txt"};771 const file_paths: [1][]const u8 = .{"zig-test-absolute-paths.txt"};