forked from the-distro/ofborg
use nixosTests
for tests
The current approach runs e.g. `nix-build nixos/release.nix -A tests.installer`, which is a no-op because `tests.installer` is a set of sets of derivations (e.g. `tests.installer.simple.x86_64-linux`). Use `nixosTests` instead, which doesn't have this extra nesting.
This commit is contained in:
parent
6d5ad2f34b
commit
2beea85aed
|
@ -48,8 +48,8 @@ instructions for ofborg.
|
|||
@ofborg test list of tests
|
||||
```
|
||||
|
||||
This will run `nix-build ./nixos/release.nix -A tests.list -A tests.of -A
|
||||
tests.tests` from the root of the Nixpkgs checkout.
|
||||
This will run `nix-build ./default.nix -A nixosTests.list -A nixosTests.of -A
|
||||
nixosTests.tests` from the root of the Nixpkgs checkout.
|
||||
|
||||
Tests will run on all allowed machines. For more information, see the "[Trusted
|
||||
Users](#trusted-users)" section.
|
||||
|
|
|
@ -38,8 +38,8 @@ named!(
|
|||
)) |
|
||||
ws!(do_parse!(
|
||||
tag!("test") >>
|
||||
tests: ws!(many1!(map!(normal_token, |s| format!("tests.{}", s.0)))) >>
|
||||
(Some(Instruction::Build(Subset::NixOS, tests)))
|
||||
tests: ws!(many1!(map!(normal_token, |s| format!("nixosTests.{}", s.0)))) >>
|
||||
(Some(Instruction::Build(Subset::Nixpkgs, tests)))
|
||||
)) |
|
||||
value!(Some(Instruction::Eval), tag!("eval")) |
|
||||
// TODO: Currently keeping previous behaviour of ignoring unknown commands. Maybe
|
||||
|
@ -195,11 +195,11 @@ baz",
|
|||
fn test_comment() {
|
||||
assert_eq!(
|
||||
Some(vec![Instruction::Build(
|
||||
Subset::NixOS,
|
||||
Subset::Nixpkgs,
|
||||
vec![
|
||||
String::from("tests.foo"),
|
||||
String::from("tests.bar"),
|
||||
String::from("tests.baz"),
|
||||
String::from("nixosTests.foo"),
|
||||
String::from("nixosTests.bar"),
|
||||
String::from("nixosTests.baz"),
|
||||
]
|
||||
),]),
|
||||
parse("@GrahamCOfBorg test foo bar baz")
|
||||
|
|
Loading…
Reference in a new issue