Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions .github/workflows/haskell-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
#
# For more information, see https://github.com/haskell-CI/haskell-ci
#
# version: 0.19.20250216
# version: 0.19.20250330
#
# REGENDATA ("0.19.20250216",["github","cabal.project"])
# REGENDATA ("0.19.20250330",["github","cabal.project"])
#
name: Haskell-CI
on:
Expand All @@ -32,9 +32,9 @@ jobs:
strategy:
matrix:
include:
- compiler: ghc-9.12.1
- compiler: ghc-9.12.2
compilerKind: ghc
compilerVersion: 9.12.1
compilerVersion: 9.12.2
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.10.1
Expand All @@ -47,9 +47,9 @@ jobs:
compilerVersion: 9.8.4
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.6.6
- compiler: ghc-9.6.7
compilerKind: ghc
compilerVersion: 9.6.6
compilerVersion: 9.6.7
setup-method: ghcup
allow-failure: false
- compiler: ghc-9.4.8
Expand Down Expand Up @@ -107,12 +107,12 @@ jobs:
- name: Install GHCup
run: |
mkdir -p "$HOME/.ghcup/bin"
curl -sL https://downloads.haskell.org/ghcup/0.1.30.0/x86_64-linux-ghcup-0.1.30.0 > "$HOME/.ghcup/bin/ghcup"
curl -sL https://downloads.haskell.org/ghcup/0.1.50.1/x86_64-linux-ghcup-0.1.50.1 > "$HOME/.ghcup/bin/ghcup"
chmod a+x "$HOME/.ghcup/bin/ghcup"
- name: Install cabal-install
run: |
"$HOME/.ghcup/bin/ghcup" install cabal 3.12.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.12.1.0 -vnormal+nowrap" >> "$GITHUB_ENV"
"$HOME/.ghcup/bin/ghcup" install cabal 3.14.1.1-p1 || (cat "$HOME"/.ghcup/logs/*.* && false)
echo "CABAL=$HOME/.ghcup/bin/cabal-3.14.1.1-p1 -vnormal+nowrap" >> "$GITHUB_ENV"
- name: Install GHC (GHCup)
if: matrix.setup-method == 'ghcup'
run: |
Expand Down
7 changes: 7 additions & 0 deletions core/ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
#### 0.8.2.2

_2025-04-11, Andreas Abel_

- Drop `libxml` dependency in testsuite
- Tested building with GHC 8.0 - 9.12.2

#### 0.8.2.1

_2025-02-26, Andreas Abel_
Expand Down
12 changes: 3 additions & 9 deletions core/test-framework.cabal
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
Cabal-Version: 1.18
Name: test-framework
Version: 0.8.2.1
x-revision: 1
Version: 0.8.2.2
Category: Testing
Synopsis: Framework for running and organising tests, with HUnit and QuickCheck support
Description: Allows tests such as QuickCheck properties and HUnit test cases to be assembled into test groups, run in
Expand All @@ -16,10 +15,10 @@ Bug-Reports: https://github.com/haskell/test-framework/issues
Build-Type: Simple

Tested-With:
GHC == 9.12.1
GHC == 9.12.2
GHC == 9.10.1
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.6.7
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down Expand Up @@ -110,9 +109,6 @@ Test-Suite test-framework-tests
Main-Is: Tests.hs
Type: exitcode-stdio-1.0

-- Doe to libxml dependency, the testsuite is not buildable on e.g. MacOS
-- Buildable: False

-- Lower bounds from LTS-9.21 (GHC 8.0.2)
Build-Depends: HUnit >= 1.5.0.0
, QuickCheck >= 2.9.2 && < 2.16
Expand All @@ -126,10 +122,8 @@ Test-Suite test-framework-tests
, time >= 1.6
, xml >= 1.3.14
, hostname >= 1.0
, libxml >= 0.1.1
, bytestring >= 0.10.8
, semigroups >= 0.18
, utf8-string >= 1.0.1.1 && <1.1

Default-Language: Haskell2010
Default-Extensions: CPP
Expand Down
19 changes: 7 additions & 12 deletions core/test/Test/Framework/Tests/Runners/XMLTests.hs
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,14 @@ import Test.Framework.Runners.XML.JUnitWriter ( RunDescription(..), morphFlatTes

import Test.HUnit.Base ( Test(..), (@?=) )
import Test.QuickCheck ( Arbitrary, sized, Gen, oneof, listOf, arbitrary )
import Test.QuickCheck.Property as P ( Property )
import qualified Test.QuickCheck.Property as QC ( Property, property )

import Control.Monad ( ap, liftM2, liftM3 )

import Data.Maybe ( isJust )

import qualified Data.ByteString.UTF8 as UTF8

import qualified Text.XML.Light as XML ( findAttr, unqual )
import qualified Text.XML.LibXML.Parser as XML ( parseMemory_ )
import qualified Text.XML.LibXML.Types as XML ( Document )

import Test.QuickCheck.Property as P (morallyDubiousIOProperty)
import qualified Text.XML.Light as XML ( Element, findAttr, unqual )
import qualified Text.XML.Light.Input as XML ( parseXMLDoc )

-- | `Arbitrary` instance for `TestResult` generation.
instance Arbitrary FinishedTest where
Expand Down Expand Up @@ -89,11 +84,11 @@ arbitraryXmlStr = listOf arbitraryXmlChar

-- | Generate random `RunDescriptions`, serialize to (flat) XML strings, then check that they are XML
-- TODO: check them against the JUnit schema
property :: RunDescription -> P.Property
property = morallyDubiousIOProperty . fmap isJust . parseSerialize
property :: RunDescription -> QC.Property
property = QC.property . isJust . parseSerialize

parseSerialize :: RunDescription -> IO (Maybe XML.Document)
parseSerialize = XML.parseMemory_ . UTF8.fromString . serialize False
parseSerialize :: RunDescription -> Maybe XML.Element
parseSerialize = XML.parseXMLDoc . serialize False

-- | Verify that the group names are properly prepended to sub-tests.
test :: Test
Expand Down
4 changes: 2 additions & 2 deletions example/test-framework-example.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ Homepage: https://github.com/haskell/test-framework#readme
Build-Type: Simple

Tested-With:
GHC == 9.12.1
GHC == 9.12.2
GHC == 9.10.1
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.6.7
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down
4 changes: 2 additions & 2 deletions hunit/test-framework-hunit.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Build-Type: Simple
Description: @HUnit@ support for the @test-framework@ package.

Tested-With:
GHC == 9.12.1
GHC == 9.12.2
GHC == 9.10.1
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.6.7
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down
4 changes: 2 additions & 2 deletions quickcheck2/test-framework-quickcheck2.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ Build-Type: Simple
Description: Allows @QuickCheck-2@ properties to be used with the </package/test-framework test-framework package>.

Tested-With:
GHC == 9.12.1
GHC == 9.12.2
GHC == 9.10.1
GHC == 9.8.4
GHC == 9.6.6
GHC == 9.6.7
GHC == 9.4.8
GHC == 9.2.8
GHC == 9.0.2
Expand Down
3 changes: 0 additions & 3 deletions stack-9.10.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ packages:
- quickcheck2
- example

extra-deps:
- libxml-0.1.1

ghc-options:
$locals: >-
-Wall
Expand Down
3 changes: 0 additions & 3 deletions stack-9.4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ packages:
- quickcheck2
- example

extra-deps:
- libxml-0.1.1

ghc-options:
$locals: >-
-Wall
Expand Down