Merge pull request #1742 from nealsid/remove-illumos-jemalloc
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Changes to support building/testing fd on Illumos
authored by Thayne McCombs · committed by GitHub · parents ba35c5e, e76e7ff · Browse files · 3 files·+12 added−7 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
3 files+12 added−7 removed
- tests:+6 added−6 removed
- other:+6 added−1 removed
Provenance
- Commit
b7fe2ce- Tree
7bb9cad- Author
Thayne McCombs <astrothayne@gmail.com>- Committer
GitHub <noreply@github.com>- Parent 1
ba35c5e- Parent 2
e76e7ff
3 files changed+12 added−7 removed
modified:src/main.rs+3 added
34 unmodified lines35 use crate::regex_helper::{pattern_has_uppercase_char, pattern_matches_strings_with_leading_dot};36 37 // We use jemalloc for performance reasons, see https://github.com/sharkdp/fd/pull/48138 // FIXME: re-enable jemalloc on macOS, see comment in Cargo.toml file for more infos39+// This has to be kept in sync with the Cargo.toml file section that declares a40+// dependency on tikv-jemallocator.41 #[cfg(all(42 not(windows),43 not(target_os = "android"),44 not(target_os = "macos"),45 not(target_os = "freebsd"),46 not(target_os = "openbsd"),47+ not(target_os = "illumos"),48 not(all(target_env = "musl", target_pointer_width = "32")),49 not(target_arch = "riscv64"),50 feature = "use-jemalloc"51 ))]440 unmodified linesmodified:tests/tests.rs+6 added-6 removed
1763 unmodified lines1764 te.assert_output(&["e1", "--exec", "printf", "%s.%s\n"], "./e1 e2.");1765 }1766 }1767 1768+// TODO test for windows1769+#[cfg(not(windows))]1770 #[test]1771 fn test_exec_multi() {1770- // TODO test for windows1771- if cfg!(windows) {1772- return;1773- }1772 let (te, abs_path) = get_test_env_with_abs_path(DEFAULT_DIRS, DEFAULT_FILES);1773 1774 te.assert_output(1775 &[34 unmodified lines1810 .1811 e1 e2",1812 );1813 1814+ // We use printf here because we need to suppress a newline and1815+ // echo -n is not POSIX-compliant.1816 te.assert_output(1817 &[1818- "foo", "--exec", "echo", "-n", "{/}: ", ";", "--exec", "echo", "{//}",1818+ "foo", "--exec", "printf", "%s", "{/}: ", ";", "--exec", "printf", "%s\\n", "{//}",1819 ],1820 "a.foo: .1821 b.foo: ./one1822 C.Foo2: ./one/two777 unmodified lines2600 2601 /// When fd is ran from a non-existent working directory, but an existent2602 /// directory is passed in the arguments, it should still run fine2603 #[test]2604-#[cfg(not(windows))]2604+#[cfg(all(not(windows), not(target_os = "illumos")))]2605 fn test_invalid_cwd() {2606 let te = TestEnv::new(&[], &[]);2607 2608 let root = te.test_root().join("foo");86 unmodified linesmodified:Cargo.toml+3 added-1 removed
67 unmodified lines68697071727372747576777814 unmodified lines67 unmodified lines
# FIXME: Re-enable jemalloc on macOS# jemalloc is currently disabled on macOS due to a bug in jemalloc in combination with macOS# Catalina. See https://github.com/sharkdp/fd/issues/498 for details.# This has to be kept in sync with src/main.rs where the allocator for# the program is set.[target.'cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies][target.'cfg(all(not(windows), not(target_os = "android"), not(target_os = "macos"), not(target_os = "freebsd"), not(target_os = "openbsd"), not(target_os = "illumos"), not(all(target_env = "musl", target_pointer_width = "32")), not(target_arch = "riscv64")))'.dependencies]tikv-jemallocator = {version = "0.6.0", optional = true}
[dev-dependencies]diff = "0.1"14 unmodified lines