@@ -3199,7 +3199,7 @@ func testLinuxPackageTestsFail(ctx context.Context, t *testing.T, cfg testLinuxC
31993199 spec .Tests = []* dalec.TestSpec {tc .test }
32003200
32013201 testEnv .RunTest (ctx , t , func (ctx context.Context , client gwclient.Client ) {
3202- sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (target ))
3202+ sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (target ), withIgnoreCache ( frontend . IgnoreCacheTestsKey ) )
32033203 _ , err := client .Solve (ctx , sr )
32043204 assert .Assert (t , err != nil )
32053205
@@ -3243,6 +3243,10 @@ func testLinuxPackageTestsFail(ctx context.Context, t *testing.T, cfg testLinuxC
32433243 t .Parallel ()
32443244 ctx := startTestSpan (baseCtx , t )
32453245
3246+ equalCheck := func (v string ) dalec.CheckOutput {
3247+ return dalec.CheckOutput {Equals : v }
3248+ }
3249+
32463250 spec := & dalec.Spec {
32473251 Name : "test-package-tests" ,
32483252 Version : "0.0.1" ,
@@ -3295,6 +3299,24 @@ func testLinuxPackageTestsFail(ctx context.Context, t *testing.T, cfg testLinuxC
32953299 "/some_symlink3" : {LinkTarget : "/not-a-real-file" , NoFollow : true },
32963300 },
32973301 },
3302+ {
3303+ Name : "Test multiple commands with no fs changes" ,
3304+ Steps : []dalec.TestStep {
3305+ {Command : "/bin/sh -ec 'echo command one'" },
3306+ {Command : "/bin/sh -ec 'echo command two'" },
3307+ {Command : "/bin/sh -ec 'echo command three'" },
3308+ {Command : "/bin/sh -ec 'echo command four'" },
3309+ },
3310+ },
3311+ {
3312+ Name : "Test multiple commands with stdio checks" ,
3313+ Steps : []dalec.TestStep {
3314+ {Command : "/bin/sh -ec 'echo command one'" , Stdout : equalCheck ("command one\n " )},
3315+ {Command : "/bin/sh -ec 'echo command two'" },
3316+ {Command : "/bin/sh -ec 'echo command three'" , Stdout : equalCheck ("command three\n " )},
3317+ {Command : "/bin/sh -ec 'echo command four'" },
3318+ },
3319+ },
32983320 {
32993321 Name : "Test that test mounts work" ,
33003322 Files : map [string ]dalec.FileCheckOutput {
@@ -3370,7 +3392,7 @@ func testLinuxPackageTestsFail(ctx context.Context, t *testing.T, cfg testLinuxC
33703392 t .Parallel ()
33713393 ctx = startTestSpan (baseCtx , t )
33723394 testEnv .RunTest (ctx , t , func (ctx context.Context , client gwclient.Client ) {
3373- sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (cfg .Target .Package ))
3395+ sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (cfg .Target .Package ), withIgnoreCache ( frontend . IgnoreCacheTestsKey ) )
33743396 res := solveT (ctx , t , client , sr )
33753397 _ , err := res .SingleRef ()
33763398 assert .NilError (t , err )
@@ -3381,7 +3403,7 @@ func testLinuxPackageTestsFail(ctx context.Context, t *testing.T, cfg testLinuxC
33813403 t .Parallel ()
33823404 ctx := startTestSpan (baseCtx , t )
33833405 testEnv .RunTest (ctx , t , func (ctx context.Context , client gwclient.Client ) {
3384- sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (cfg .Target .Container ))
3406+ sr := newSolveRequest (withSpec (ctx , t , spec ), withBuildTarget (cfg .Target .Container ), withIgnoreCache ( frontend . IgnoreCacheTestsKey ) )
33853407 res := solveT (ctx , t , client , sr )
33863408 _ , err := res .SingleRef ()
33873409 assert .NilError (t , err )
0 commit comments