Skip to content
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

Fix Windows tests (backport #10186) #10211

Closed
wants to merge 8 commits into from
Closed

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Jul 18, 2024

  • fixes the local+noindex uri in withRepo which enables many tests on Windows (just a matter of \\ -> /)
  • normalizes some more output on Windows (\\ -> / but also removing C:\\)
  • provide skip*IO functions on IO () to quickly discard tests without having to setup a test env
  • un-skip and fix a bunch of tests here and there

55 tests in total which were skipped or expected broken on Windows now are passing:

➜ diff \
    <(rg -v "SKIP no cabal-install \(" code/cabal/out.txt | rg "(known|SKIP)" | awk '{print $1}' | sort -u) \
    <(rg -v "SKIP no cabal-install \(" master.out | rg "SKIP" | awk '{print $1}' | sort -u) \
    | rg "^>" | wc -l
55

and 66-55=11 tests were previously being skipped and now are marked as known failure, with an issue number:

➜ diff \
    <(rg -v "SKIP no cabal-install \(" code/cabal/out.txt | rg "SKIP" | awk '{print $1}' | sort -u) \
    <(rg -v "SKIP no cabal-install \(" master.out | rg "SKIP" | awk '{print $1}' | sort -u) \
    | rg "^>" | wc -l
66
```<hr>This is an automatic backport of pull request #10186 done by [Mergify](https://mergify.com).

(cherry picked from commit e54d477)
(cherry picked from commit f8ab58c)
(cherry picked from commit f33929b)

# Conflicts:
#	cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs
(cherry picked from commit e290366)

# Conflicts:
#	cabal-testsuite/src/Test/Cabal/Prelude.hs
(cherry picked from commit 83ec0b9)
(cherry picked from commit 3ccb534)
(cherry picked from commit 4b1d9b9)

# Conflicts:
#	cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out
#	cabal-testsuite/PackageTests/HaddockKeepsTmps/cabal.test.hs
#	cabal-testsuite/PackageTests/NewFreeze/T9799b/src/None.hs
#	cabal-testsuite/PackageTests/ProfShared/setup.test.hs
#	validate.sh
@mergify mergify bot added the conflicts label Jul 18, 2024
Copy link
Contributor Author

mergify bot commented Jul 18, 2024

Cherry-pick of f33929b has failed:

On branch mergify/bp/3.12/pr-10186
Your branch is ahead of 'origin/3.12' by 3 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit f33929bdd.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   cabal-testsuite/src/Test/Cabal/Monad.hs

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   cabal-testsuite/src/Test/Cabal/OutputNormalizer.hs

Cherry-pick of e290366 has failed:

On branch mergify/bp/3.12/pr-10186
Your branch is ahead of 'origin/3.12' by 4 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit e2903667c.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Unmerged paths:
  (use "git add <file>..." to mark resolution)
	both modified:   cabal-testsuite/src/Test/Cabal/Prelude.hs

no changes added to commit (use "git add" and/or "git commit -a")

Cherry-pick of 4b1d9b9 has failed:

On branch mergify/bp/3.12/pr-10186
Your branch is ahead of 'origin/3.12' by 7 commits.
  (use "git push" to publish your local commits)

You are currently cherry-picking commit 4b1d9b904.
  (fix conflicts and run "git cherry-pick --continue")
  (use "git cherry-pick --skip" to skip this patch)
  (use "git cherry-pick --abort" to cancel the cherry-pick operation)

Changes to be committed:
	modified:   cabal-testsuite/PackageTests/AutoconfBadPaths/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Backpack/Includes2/Includes2.cabal -> cabal-testsuite/PackageTests/Backpack/Includes2/I.cabal
	renamed:    cabal-testsuite/PackageTests/Backpack/Includes2/Includes2-fail/Includes2.cabal -> cabal-testsuite/PackageTests/Backpack/Includes2/I.cabal.fail
	renamed:    cabal-testsuite/PackageTests/Backpack/Includes2/Includes2.cabal.fail -> cabal-testsuite/PackageTests/Backpack/Includes2/Includes2-fail/I.cabal
	renamed:    cabal-testsuite/PackageTests/Backpack/Includes2/Includes2/Includes2.cabal -> cabal-testsuite/PackageTests/Backpack/Includes2/Includes2/I.cabal
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cabal-external.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal-target.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cabal-internal.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cov.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/cov.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.cabal.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/setup-internal.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.test.hs
	renamed:    cabal-testsuite/PackageTests/Backpack/Includes3/Includes3.cabal -> cabal-testsuite/PackageTests/Backpack/Includes3/I.cabal
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/cabal-external.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/cabal-internal.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/cabal-internal.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/cabal-repo.test.hs
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.cabal.out
	modified:   cabal-testsuite/PackageTests/Backpack/Includes3/setup-internal.out
	modified:   cabal-testsuite/PackageTests/Backpack/T6385/cabal.test.hs
	renamed:    cabal-testsuite/PackageTests/Backpack/bkpcabal01/bkpcabal01.cabal -> cabal-testsuite/PackageTests/Backpack/bkpcabal01/b.cabal
	modified:   cabal-testsuite/PackageTests/Backpack/bkpcabal01/cabal.out
	modified:   cabal-testsuite/PackageTests/Backpack/bkpcabal01/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/BuildTools/Foreign/A.hs
	new file:   cabal-testsuite/PackageTests/BuildTools/Foreign/my-foreign-preprocessor.bat
	new file:   cabal-testsuite/PackageTests/BuildTools/Foreign/my-foreign-preprocessor.ps1
	modified:   cabal-testsuite/PackageTests/BuildTools/Foreign/setup.test.hs
	modified:   cabal-testsuite/PackageTests/CCompilerOverride/setup.test.hs
	modified:   cabal-testsuite/PackageTests/Check/ConfiguredPackage/Paths/InvalidWin/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/CmmSourcesDyn/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/ConditionalAndImport/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/CustomSegfault/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/ExtraProgPath/setup.test.hs
	modified:   cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GHCJS/BuildRunner/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectory/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryGhcVersion/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/SameDirectoryVersion/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/Symlink/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkGhcVersion/setup.test.hs
	modified:   cabal-testsuite/PackageTests/GhcPkgGuess/SymlinkVersion/setup.test.hs
	modified:   cabal-testsuite/PackageTests/InternalLibraries/Executable/setup-static.test.hs
	modified:   cabal-testsuite/PackageTests/InternalLibraries/setup-gen-script.test.hs
	modified:   cabal-testsuite/PackageTests/JS/JsSources/js-arch.test.hs
	modified:   cabal-testsuite/PackageTests/JS/JsSources/other-arch.test.hs
	modified:   cabal-testsuite/PackageTests/JS/JsSourcesExe/js-arch.test.hs
	modified:   cabal-testsuite/PackageTests/JS/JsSourcesExe/other-arch.test.hs
	modified:   cabal-testsuite/PackageTests/LinkerOptions/NonignoredConfigs/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/LinkerOptions/T7339/setup.test.hs
	modified:   cabal-testsuite/PackageTests/MultiRepl/EnabledSucc/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/NewBuild/CmdRun/Terminate/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/NewBuild/CustomSetup/RemotePackageWithCustomSetup/build-package-from-repo-with-custom-setup.test.hs
	modified:   cabal-testsuite/PackageTests/NewBuild/T3827/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/OfflineFlag/offlineFlag.test.hs
	modified:   cabal-testsuite/PackageTests/PathsModule/Executable-Relocatable/setup.test.hs
	modified:   cabal-testsuite/PackageTests/PkgConfigParse/setup.test.hs
	modified:   cabal-testsuite/PackageTests/PreProcess/Hsc2HsOptionsCC/my.cabal
	modified:   cabal-testsuite/PackageTests/PreProcess/Hsc2HsOptionsCC/setup.test.hs
	modified:   cabal-testsuite/PackageTests/QuasiQuotes/dynamic/setup.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T4025/setup.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T4270/setup.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T4291/setup.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T5309/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T5677/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/Regression/T6906/cabal.test.hs
	modified:   cabal-testsuite/PackageTests/TestSuiteTests/ExeV10/cabal-with-hpc.multitest.hs
	modified:   cabal-testsuite/PackageTests/WarnEarlyOverwrite/clean-install-by-copy.test.hs
	modified:   cabal-testsuite/PackageTests/WarnEarlyOverwrite/clean-install-by-symlink.test.hs
	modified:   cabal-testsuite/PackageTests/WarnEarlyOverwrite/dirty-install.test.hs
	modified:   cabal-testsuite/PackageTests/postCheckoutCommand/cabal.test.hs

Unmerged paths:
  (use "git add/rm <file>..." as appropriate to mark resolution)
	both modified:   cabal-testsuite/PackageTests/Backpack/Includes2/setup-per-component.out
	deleted by us:   cabal-testsuite/PackageTests/HaddockKeepsTmps/cabal.test.hs
	deleted by us:   cabal-testsuite/PackageTests/NewFreeze/T9799b/src/None.hs
	deleted by us:   cabal-testsuite/PackageTests/ProfShared/setup.test.hs
	both modified:   validate.sh

To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally

@mergify mergify bot mentioned this pull request Jul 18, 2024
@mergify mergify bot added the backport label Jul 18, 2024
@geekosaur
Copy link
Collaborator

Depends on #9900 which isn't being backported.

@geekosaur geekosaur closed this Jul 18, 2024
@mergify mergify bot deleted the mergify/bp/3.12/pr-10186 branch July 18, 2024 22:11
@geekosaur
Copy link
Collaborator

@jasagredo, do you think there's a way to fix these for 3.12 without causing problems when 3.14 comes out? (Not that I think that should happen, since it will only involve master, not 3.12 branch.) Your original PR uses things from #9718.

geekosaur added a commit that referenced this pull request Jul 21, 2024
mergify bot added a commit that referenced this pull request Jul 21, 2024
* Fix ForeignLibs test for Windows

(cherry picked from commit be1ae31)

# Conflicts:
#	cabal-testsuite/PackageTests/ForeignLibs/setup.test.hs

* try to build without #10211

* Swap it in the correct direction

---------

Co-authored-by: Javier Sagredo <[email protected]>
Co-authored-by: brandon s allbery kf8nh <[email protected]>
@geekosaur geekosaur restored the mergify/bp/3.12/pr-10186 branch July 22, 2024 01:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants