Skip to content

Commit

Permalink
Shorter merging suite-level an test-level environment
Browse files Browse the repository at this point in the history
  • Loading branch information
rradczewski committed May 25, 2024
1 parent 6d852d8 commit 040a25e
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/lib/Test/Smoke/Plan.hs
Original file line number Diff line number Diff line change
Expand Up @@ -80,19 +80,14 @@ readTest location fallbackWorkingDirectory fallbackShell fallbackCommand fallbac
stdErr <- readStdErr location test
files <- readFiles location test
let revert = Vector.map (location </>) (testRevert test)
let environment = case (testEnvironment test, fallbackEnvironment) of
(Nothing, Nothing) -> Nothing
(Just env, Nothing) -> Just env
(Nothing, Just fallbackEnv) -> Just fallbackEnv
(Just env, Just fallbackEnv) -> Just (env <> fallbackEnv)
pure $
TestPlan
{ planTest = test,
planWorkingDirectory = workingDirectory,
planShell = fallbackShell,
planExecutable = executable,
planArgs = args,
planEnvironment = environment,
planEnvironment = testEnvironment test <> fallbackEnvironment,
planStdIn = stdIn,
planStatus = status,
planStdOut = stdOut,
Expand Down

0 comments on commit 040a25e

Please # to comment.