MCPcopy Create free account
hub / github.com/archlinux/alpm / create_package_from_input

Function create_package_from_input

alpm-package/tests/integration.rs:386–416  ·  view source on GitHub ↗
(
    #[case] compression: CompressionSettings,
    #[case] input_dir_config: InputDirConfig,
)

Source from the content-addressed store, hash-verified

384 InputDirConfig { build_info: true, data_files: false, mtree: true, package_info: true, scriptlet: false },
385)]
386fn create_package_from_input(
387 #[case] compression: CompressionSettings,
388 #[case] input_dir_config: InputDirConfig,
389) -> TestResult {
390 init_logger();
391
392 // Create a common temporary dir.
393 let temp_dir = TempDir::new()?;
394 let test_dir = temp_dir.path();
395
396 let (package_a, package_digest_a) = package_digest(
397 test_dir,
398 "input1",
399 "output1",
400 compression.clone(),
401 &input_dir_config,
402 )?;
403 debug!("Created package A: {package_a:?}");
404
405 let (package_b, package_digest_b) = package_digest(
406 test_dir,
407 "input2",
408 "output2",
409 compression.clone(),
410 &input_dir_config,
411 )?;
412 debug!("Created package B: {package_b:?}");
413
414 assert_eq!(package_digest_a, package_digest_b);
415 Ok(())
416}
417
418/// Ensures that [`PackageInput::from_input_dir`] fails on missing metadata files.
419#[rstest]

Callers

nothing calls this directly

Calls 3

package_digestFunction · 0.85
init_loggerFunction · 0.70
pathMethod · 0.45

Tested by

no test coverage detected