You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we have code in the setup'' helper which says:
189 else do
190 r <- liftIO $ runghc (testScriptEnv env)
191 (Just (testCurrentDir env))
192 (testEnvironment env)
193 (testCurrentDir env </> prefix </> "Setup.hs")
194 (NE.toList full_args)
195 recordLog r
196 requireSuccess r
The result of calling requireSuccess means that the call to the Setup script above has to succeed, but what about if we want to check the failure modes of ./Setup? In particular I want to check that it doesn't accept external commands (see #9403)
Am I missing way to test the interface of custom ./Setup scripts?
Proposal: Don't call requireSuccess r here, and require users of setup'' and setup' to check the exit code themselves.
This essentially reverts the commit 326da71, because it isn't what I wanted and not necessarily what you want if you want to test that ./Setup fails in a certain way.
The text was updated successfully, but these errors were encountered:
I now read the source of requireSuccess and infact it seems that I need to use the fails modifier to indicate that the call will fail, then we check the exit code is not ExitSuccess.
Currently we have code in the
setup''
helper which says:The result of calling
requireSuccess
means that the call to the Setup script above has to succeed, but what about if we want to check the failure modes of./Setup
? In particular I want to check that it doesn't accept external commands (see #9403)Am I missing way to test the interface of custom
./Setup
scripts?Proposal: Don't call
requireSuccess r
here, and require users ofsetup''
andsetup'
to check the exit code themselves.This essentially reverts the commit 326da71, because it isn't what I wanted and not necessarily what you want if you want to test that
./Setup
fails in a certain way.The text was updated successfully, but these errors were encountered: