-
Notifications
You must be signed in to change notification settings - Fork 697
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Turn off DeterministicTrivial test (see #8356) #8357
Conversation
cabal-testsuite/PackageTests/NewSdist/DeterministicTrivial/deterministic.test.hs
Outdated
Show resolved
Hide resolved
49e19de
to
ceef1ba
Compare
I assume we won't be waiting for two days here? |
??? I keep looking at the two cryptohash, they are the same! |
That's the very test we were trying to disable. Apparently it fails before our disabling kicks in. Perhaps the |
Putting skip... on top still gives me that weird import error. With this, it works, but it is ugly (had to comment BS16 import) and leaves all the questions on why it fails open. import Test.Cabal.Prelude
import qualified Data.ByteString as BS
-- import qualified Data.ByteString.Base16 as BS16
import qualified Crypto.Hash.SHA256 as SHA256
import System.FilePath
( (</>) )
main = cabalTest $ do
cabal "v2-sdist" ["deterministic"]
env <- getTestEnv
let dir = testCurrentDir env
knownSdist = dir </> "deterministic-0.tar.gz"
mySdist = dir </> "dist-newstyle" </> "sdist" </> "deterministic-0.tar.gz"
-- This helps to understand why this test fails, if it does:
--
-- shell "tar" ["-tzvf", knownSdist]
-- shell "tar" ["-tzvf", mySdist]
--
known <- liftIO (BS.readFile knownSdist)
unknown <- liftIO (BS.readFile mySdist)
-- Not using `expectBroken` becuase the test succedes locally but
-- fails in CI.
skipIf "#8356" True
-- assertEqual "hashes didn't match for sdist" (BS16.encode $ SHA256.hash known) (BS16.encode $ SHA256.hash unknown)
assertEqual "hashes didn't match for sdist" True True |
Oh, wow, so it fails in the import? No wonder we can't put I wonder what uncommenting |
And actually, it would probably not show anything useful, because the assertion probably doesn't fail, it's the import that fails. |
7bc6703
to
ca8bdbc
Compare
The last iteration:
|
a0f855f
to
22db7a9
Compare
Notice how on different platforms, we get different imports error (on a linux virtual machine, BS16; on Windows CI, SHA256). What a weird behaviour. |
Emergency-merging to unblock CI for our devs. |
Unfortunately, this needs to be backported, because it blocks CI on branch 3.8 as well. |
@mergify backport 3.8 |
✅ Backports have been created
|
See #8356
Please include the following checklist in your PR:
Please also shortly describe how you tested your change. Bonus points for added tests!