diff --git a/tests-pl/issue_delete_directory.pl b/tests-pl/issue_delete_directory.pl index 6e422d944..9543c3120 100644 --- a/tests-pl/issue_delete_directory.pl +++ b/tests-pl/issue_delete_directory.pl @@ -21,7 +21,8 @@ main :- call_cleanup( - (setenv("TARGET_DIRECTORY", "delete_directory_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_DIRECTORY", "delete_directory_test"), shell("mkdir delete_directory_test", 0), check), shell("test -d delete_directory_test && rmdir delete_directory_test || true", 0) diff --git a/tests-pl/issue_delete_file.pl b/tests-pl/issue_delete_file.pl index b75a2e69f..64dd63a06 100644 --- a/tests-pl/issue_delete_file.pl +++ b/tests-pl/issue_delete_file.pl @@ -21,7 +21,8 @@ main :- call_cleanup( - (setenv("TARGET_FILE", "delete_file_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_FILE", "delete_file_test"), shell("touch delete_file_test", 0), check), shell("test -e delete_file_test && rm delete_file_test || true", 0) diff --git a/tests-pl/issue_directory_files.pl b/tests-pl/issue_directory_files.pl index 2f5a8e34b..914b0d3c1 100644 --- a/tests-pl/issue_directory_files.pl +++ b/tests-pl/issue_directory_files.pl @@ -16,7 +16,8 @@ main :- path_segments(Path, ["directory_files_test_parent", "directory_files_test_file"]), call_cleanup( - (setenv("TARGET_DIRECTORY", "directory_files_test_parent"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_DIRECTORY", "directory_files_test_parent"), shell("test -d directory_files_test_parent || mkdir directory_files_test_parent", 0), append(["test -e ", Path, " || touch ", Path], Cmd), shell(Cmd, 0), diff --git a/tests-pl/issue_file_copy.pl b/tests-pl/issue_file_copy.pl index 21b404ea1..02ae3c860 100644 --- a/tests-pl/issue_file_copy.pl +++ b/tests-pl/issue_file_copy.pl @@ -26,7 +26,8 @@ main :- call_cleanup( - (setenv("SOURCE", "file_copy_test_source"), + (setenv("SHELL", "/bin/sh"), + setenv("SOURCE", "file_copy_test_source"), setenv("DESTINATION", "file_copy_test_destination"), shell("touch file_copy_test_source", 0), check), diff --git a/tests-pl/issue_file_exists.pl b/tests-pl/issue_file_exists.pl index 27a72c5d9..b1f6eefa0 100644 --- a/tests-pl/issue_file_exists.pl +++ b/tests-pl/issue_file_exists.pl @@ -16,7 +16,8 @@ main :- call_cleanup( - (setenv("TARGET_FILE", "file_exists_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_FILE", "file_exists_test"), shell("touch file_exists_test", 0), check), shell("rm -f file_exists_test", 0) diff --git a/tests-pl/issue_file_size.pl b/tests-pl/issue_file_size.pl index ef654e5b5..62ec1f325 100644 --- a/tests-pl/issue_file_size.pl +++ b/tests-pl/issue_file_size.pl @@ -14,7 +14,8 @@ main :- call_cleanup( - (setenv("TARGET_FILE", "file_size_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_FILE", "file_size_test"), shell("echo '1' > file_size_test", 0), check), shell("rm -f file_size_test", 0) diff --git a/tests-pl/issue_file_time.pl b/tests-pl/issue_file_time.pl index 98e05ac46..febeb2692 100644 --- a/tests-pl/issue_file_time.pl +++ b/tests-pl/issue_file_time.pl @@ -16,7 +16,8 @@ main :- call_cleanup( - (setenv("TARGET_FILE", "file_time_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_FILE", "file_time_test"), shell("touch file_time_test", 0), findall(T, check(T), Ts), length(Ts, 3)), diff --git a/tests-pl/issue_make_directory.pl b/tests-pl/issue_make_directory.pl index 79ba06484..3cac6d32b 100644 --- a/tests-pl/issue_make_directory.pl +++ b/tests-pl/issue_make_directory.pl @@ -21,7 +21,8 @@ main :- call_cleanup( - (setenv("TARGET_DIRECTORY", "make_directory_test"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_DIRECTORY", "make_directory_test"), check), shell("test -d make_directory_test && rmdir make_directory_test || true", 0) ). diff --git a/tests-pl/issue_make_directory_path.pl b/tests-pl/issue_make_directory_path.pl index f8d1ace6b..6b312f2de 100644 --- a/tests-pl/issue_make_directory_path.pl +++ b/tests-pl/issue_make_directory_path.pl @@ -21,7 +21,8 @@ main :- call_cleanup( - (setenv("TARGET_DIRECTORY", "make_directory_test/subdir"), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_DIRECTORY", "make_directory_test/subdir"), check), (shell("test -d make_directory_test/subdir && rmdir make_directory_test/subdir || true", 0), shell("test -d make_directory_test && rmdir make_directory_test || true", 0)) diff --git a/tests-pl/issue_path_canonical.pl b/tests-pl/issue_path_canonical.pl index fc048b226..df5e95d37 100644 --- a/tests-pl/issue_path_canonical.pl +++ b/tests-pl/issue_path_canonical.pl @@ -18,7 +18,8 @@ main :- path_segments(Path, ["path_canonical_test", "..", "path_canonical_test"]), call_cleanup( - (setenv("TARGET_PATH", Path), + (setenv("SHELL", "/bin/sh"), + setenv("TARGET_PATH", Path), shell("mkdir path_canonical_test", 0), check), shell("test -d path_canonical_test && rmdir path_canonical_test || true", 0) diff --git a/tests-pl/issue_rename_file.pl b/tests-pl/issue_rename_file.pl index b86d1d474..4b1ba1e80 100644 --- a/tests-pl/issue_rename_file.pl +++ b/tests-pl/issue_rename_file.pl @@ -22,7 +22,8 @@ main :- call_cleanup( - (setenv("SOURCE", "rename_file_test"), + (setenv("SHELL", "/bin/sh"), + setenv("SOURCE", "rename_file_test"), setenv("DESTINATION", "rename_file_test_renamed"), shell("touch rename_file_test", 0), check), diff --git a/tests/scryer/issues.rs b/tests/scryer/issues.rs index cb3217464..6145205fc 100644 --- a/tests/scryer/issues.rs +++ b/tests/scryer/issues.rs @@ -55,6 +55,10 @@ fn issue2725_dcg_without_module() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_delete_directory() { load_module_test("tests-pl/issue_delete_directory.pl", "directory_deleted"); } @@ -62,6 +66,10 @@ fn issue_delete_directory() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_delete_file() { load_module_test("tests-pl/issue_delete_file.pl", "file_deleted"); } @@ -76,6 +84,10 @@ fn issue_directory_exists() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_directory_files() { load_module_test("tests-pl/issue_directory_files.pl", "1"); } @@ -83,6 +95,10 @@ fn issue_directory_files() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_file_copy() { load_module_test("tests-pl/issue_file_copy.pl", "file_copied"); } @@ -90,6 +106,10 @@ fn issue_file_copy() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_file_exists() { load_module_test("tests-pl/issue_file_exists.pl", ""); } @@ -97,6 +117,10 @@ fn issue_file_exists() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_file_size() { load_module_test("tests-pl/issue_file_size.pl", ""); } @@ -104,6 +128,10 @@ fn issue_file_size() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_file_time() { load_module_test("tests-pl/issue_file_time.pl", ""); } @@ -111,6 +139,10 @@ fn issue_file_time() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_make_directory() { load_module_test("tests-pl/issue_make_directory.pl", "directory_made"); } @@ -118,6 +150,10 @@ fn issue_make_directory() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_make_directory_path() { load_module_test( "tests-pl/issue_make_directory_path.pl", @@ -128,6 +164,10 @@ fn issue_make_directory_path() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_path_canonical() { load_module_test("tests-pl/issue_path_canonical.pl", "path_canonicalized"); } @@ -135,6 +175,10 @@ fn issue_path_canonical() { #[serial] #[test] #[cfg_attr(miri, ignore = "it takes too long to run")] +#[cfg_attr( + not(unix), + ignore = "uses shell/2 and it's not portable outside of POSIX" +)] fn issue_rename_file() { load_module_test("tests-pl/issue_rename_file.pl", "file_renamed"); }