Skip to content

Commit 712d97c

Browse files
committed
Update test structure
A future commit introduces checks on all Nix files, but this is problematic if the base Nixpkgs version is part of the main Nixpkgs version
1 parent d1e2dc2 commit 712d97c

File tree

143 files changed

+27
-26
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

143 files changed

+27
-26
lines changed

CONTRIBUTING.md

Lines changed: 24 additions & 23 deletions

src/main.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ mod tests {
178178
return Ok(());
179179
}
180180

181-
let base = path.join(BASE_SUBPATH);
181+
let base = path.join("main").join(BASE_SUBPATH);
182182

183183
fs::create_dir_all(base.join("fo/foo"))?;
184184
fs::write(base.join("fo/foo/package.nix"), "{ someDrv }: someDrv")?;
@@ -237,7 +237,7 @@ mod tests {
237237
.build()
238238
.expect("valid regex");
239239

240-
let path = path.to_owned();
240+
let main_path = path.join("main");
241241
let base_path = path.join("base");
242242
let base_nixpkgs = if base_path.exists() {
243243
base_path
@@ -251,7 +251,7 @@ mod tests {
251251
let nix_conf_dir = nix_conf_dir.path().as_os_str();
252252

253253
let status = temp_env::with_var("NIX_CONF_DIR", Some(nix_conf_dir), || {
254-
process(base_nixpkgs, &path)
254+
process(base_nixpkgs, &main_path)
255255
});
256256

257257
let actual_errors = format!("{status}\n");
File renamed without changes.
File renamed without changes.

tests/alt-callPackage/pkgs/by-name/fo/foo/package.nix renamed to tests/alt-callPackage/main/pkgs/by-name/fo/foo/package.nix

File renamed without changes.

tests/alt-callPackage/pkgs/top-level/all-packages.nix renamed to tests/alt-callPackage/main/pkgs/top-level/all-packages.nix

File renamed without changes.

0 commit comments

Comments
 (0)