From 35f8d9cf3f80d5311706baa4805170cef012497b Mon Sep 17 00:00:00 2001 From: AtomicFS Date: Fri, 17 Jan 2025 18:31:01 +0100 Subject: [PATCH] test(cmd): orphaned node break DAG Signed-off-by: AtomicFS --- cmd/firmware-action/recipes/recipes_test.go | 39 +++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/cmd/firmware-action/recipes/recipes_test.go b/cmd/firmware-action/recipes/recipes_test.go index b72b87e1..5e6d71df 100644 --- a/cmd/firmware-action/recipes/recipes_test.go +++ b/cmd/firmware-action/recipes/recipes_test.go @@ -207,6 +207,45 @@ func TestBuild(t *testing.T) { recursive: false, config: testConfigDependencyHell, }, + { + // currently breaks DAG + name: "dependency clusterfuck - middle", + wantErr: nil, + target: "milk", + recursive: false, + config: testConfigDependencyHell, + }, + { + name: "two leaves and one root", + wantErr: nil, + target: "stitch", + recursive: false, + config: Config{ + Edk2: map[string]Edk2Opts{ + "edk2-build-a": {Depends: []string{}}, + "edk2-build-b": {Depends: []string{}}, + }, + FirmwareStitching: map[string]FirmwareStitchingOpts{ + "stitch": {Depends: []string{"edk2-build-a"}}, + }, + }, + }, + { + // currently breaks DAG + name: "one root and two leaves", + wantErr: nil, + target: "stitch-a", + recursive: false, + config: Config{ + Edk2: map[string]Edk2Opts{ + "edk2-build": {Depends: []string{}}, + }, + FirmwareStitching: map[string]FirmwareStitchingOpts{ + "stitch-a": {Depends: []string{"edk2-build"}}, + "stitch-b": {Depends: []string{"edk2-build"}}, + }, + }, + }, } const interactive = false