Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test serialization according to CEP #935

Merged
merged 13 commits into from
Jun 19, 2024
Merged
Show file tree
Hide file tree
Changes from 12 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
exclude: '(\.patch|\.diff|\.snap|test-data/recipes/test-parsing/.+)$'
exclude: '(\.patch|\.diff|\.snap|\.ambr|test-data/recipes/test-parsing/.+)$'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
Expand Down
2 changes: 1 addition & 1 deletion pixi.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ platforms = ["linux-64", "win-64", "osx-64", "osx-arm64"]
[tasks]
build = "cargo build --release"
install = "cargo install --path . --locked"
end_to_end_test = "pytest test/end-to-end --snapshot-warn-unused"
end_to_end_test = "pytest test/end-to-end --snapshot-warn-unused --snapshot-details"
test = "cargo test"
lint = "pre-commit run --all"
generate-cli-docs = "cargo run --bin generate-cli-docs --features generate-cli-docs > docs/reference/cli.md"
Expand Down
25 changes: 0 additions & 25 deletions rust-tests/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,31 +463,6 @@ mod tests {
assert!(rattler_build.status.code().unwrap() == 1);
}

#[test]
fn test_noarch_flask() {
let tmp = tmp("test_noarch_flask");
let rattler_build = rattler().build(recipes().join("flask"), tmp.as_dir(), None, None);

assert!(rattler_build.status.success());

let pkg = get_extracted_package(tmp.as_dir(), "flask");
// this is to ensure that the clone happens correctly
let license = pkg.join("info/licenses/LICENSE.rst");
assert!(license.exists());

assert!(pkg.join("info/tests/1/run_test.sh").exists());
assert!(pkg.join("info/tests/1/run_test.bat").exists());
assert!(pkg
.join("info/tests/1/test_time_dependencies.json")
.exists());

assert!(pkg.join("info/tests/0/python_test.json").exists());
// make sure that the entry point does not exist
assert!(!pkg.join("python-scripts/flask").exists());

assert!(pkg.join("info/link.json").exists())
}

#[test]
fn test_files_copy() {
if cfg!(target_os = "windows") {
Expand Down
2 changes: 1 addition & 1 deletion src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ pub async fn run_build(
// We run all the package content tests
for test in output.recipe.tests() {
// TODO we could also run each of the (potentially multiple) test scripts and collect the errors
if let TestType::PackageContents(package_contents) = test {
if let TestType::PackageContents { package_contents } = test {
package_contents
.run_test(&paths_json, &output.build_configuration.target_platform)
.into_diagnostic()?;
Expand Down
Loading
Loading