dev-util/fnm: rev 1.31.0-r2

Skip npm installation tests: https://github.com/Schniz/fnm/issues/755

Closes: https://bugs.gentoo.org/854366
Signed-off-by: Alexey Zapparov <alexey@zapparov.com>
This commit is contained in:
Alexey Zapparov
2022-06-27 05:34:50 +02:00
parent d2a1cda96e
commit 09f6cd199e
3 changed files with 36 additions and 1 deletions

View File

@@ -0,0 +1,29 @@
--- a/src/downloader.rs
+++ b/src/downloader.rs
@@ -149,26 +149,6 @@ mod tests {
assert_eq!(result.trim(), "v12.0.0");
}
- #[test_log::test]
- fn test_installing_npm() {
- let installations_dir = tempdir().unwrap();
- let npm_path = install_in(installations_dir.path()).join(if cfg!(windows) {
- "npm.cmd"
- } else {
- "npm"
- });
-
- let stdout = duct::cmd(npm_path.to_str().unwrap(), vec!["--version"])
- .stdout_capture()
- .run()
- .expect("Can't run npm")
- .stdout;
-
- let result = String::from_utf8(stdout).expect("Can't read npm output");
-
- assert_eq!(result.trim(), "6.9.0");
- }
-
fn install_in(path: &Path) -> PathBuf {
let version = Version::parse("12.0.0").unwrap();
let arch = Arch::X64;

View File

@@ -388,8 +388,14 @@ QA_FLAGS_IGNORED="usr/bin/${PN}"
src_prepare() {
eapply "${FILESDIR}/${P}-cargo.patch"
eapply "${FILESDIR}/${P}-tests.patch"
sed -i "s|@@REQWEST_PATH@@|\"${WORKDIR}/reqwest-${REQWEST_COMMIT}\"|g" "${S}/Cargo.toml" || die "Cannot patch reqwuest cargo dependency"
# Skip testing against PowerShell and WinCmd
eapply "${FILESDIR}/${P}-skip-windows-related-tests.patch"
# https://bugs.gentoo.org/854366
eapply "${FILESDIR}/${P}-skip-npm-installing-tests.patch"
default
}