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 24, 2024
1 parent ce146b6 commit 1cc5200
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 1cc5200

Please # to comment.