Skip to content

Commit

Permalink
Copy the test suites from streamly
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Nov 29, 2024
1 parent 8731a6c commit 877978f
Show file tree
Hide file tree
Showing 8 changed files with 871 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,8 @@ source-repository-package
location: https://github.com/composewell/streamly
tag: master
subdir: core

source-repository-package
type: git
location: https://github.com/composewell/streamly
tag: master
2 changes: 2 additions & 0 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ extra-deps:
commit: '4c0d82e6eb9565483a4fe6f9129e1f4c234b34f1'
subdirs:
- core
- github: composewell/streamly
commit: '4c0d82e6eb9565483a4fe6f9129e1f4c234b34f1'

#allow-newer: true
rebuild-ghc-options: true
Expand Down
54 changes: 54 additions & 0 deletions streamly-fsevents.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,20 @@ common threading-options
common lib-options
import: compile-options, optimization-options, default-extensions

common test-options
import: lib-options
, threading-options
ghc-options: -rtsopts -fno-ignore-asserts
hs-source-dirs: test
build-depends: streamly-core
, streamly
, streamly-fsevents
, base
, hspec
, directory
, filepath
, temporary

-------------------------------------------------------------------------------
-- Library
-------------------------------------------------------------------------------
Expand Down Expand Up @@ -251,3 +265,43 @@ library
build-depends: directory >= 1.2.2 && < 1.4
, mtl >= 2.2.2 && < 2.4
frameworks: Cocoa


test-suite FileSystem.Event
import: test-options
type: exitcode-stdio-1.0
ghc-options: -main-is Streamly.Test.FileSystem.Event
main-is: Streamly/Test/FileSystem/Event.hs
other-modules: Streamly.Test.FileSystem.Event.Common
if !(os(linux) || os(darwin) || os(windows))
buildable: False

test-suite FileSystem.Event.Darwin
import: test-options
type: exitcode-stdio-1.0
main-is: Streamly/Test/FileSystem/Event/Darwin.hs
other-modules: Streamly.Test.FileSystem.Event.Common
cpp-options: -DFILESYSTEM_EVENT_DARWIN
ghc-options: -main-is Streamly.Test.FileSystem.Event.Darwin
if !os(darwin)
buildable: False

test-suite FileSystem.Event.Linux
import: test-options
type: exitcode-stdio-1.0
main-is: Streamly/Test/FileSystem/Event/Linux.hs
other-modules: Streamly.Test.FileSystem.Event.Common
cpp-options: -DFILESYSTEM_EVENT_LINUX
ghc-options: -main-is Streamly.Test.FileSystem.Event.Linux
if !os(linux)
buildable: False

test-suite FileSystem.Event.Windows
import: test-options
type: exitcode-stdio-1.0
main-is: Streamly/Test/FileSystem/Event/Windows.hs
other-modules: Streamly.Test.FileSystem.Event.Common
cpp-options: -DFILESYSTEM_EVENT_WINDOWS
ghc-options: -main-is Streamly.Test.FileSystem.Event.Windows
if !os(windows)
buildable: False
28 changes: 28 additions & 0 deletions test/Streamly/Test/FileSystem/Event.hs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
-- |
-- Module : Streamly.Test.FileSystem.Event
-- Copyright : (c) 2021 Composewell Technologies
-- License : BSD-3-Clause
-- Maintainer : [email protected]
-- Stability : experimental
-- Portability : GHC
--

module Streamly.Test.FileSystem.Event (main) where

import qualified Streamly.Internal.FS.Event as Event
import Streamly.Test.FileSystem.Event.Common

moduleName :: String
moduleName = "FS.Event"

main :: IO ()
main = do
let run = runTests moduleName "non-recursive" Event.watch
run DirType commonTests
run
#if defined(CABAL_OS_DARWIN)
SymLinkResolvedPath
#else
SymLinkOrigPath
#endif
commonTests
Loading

0 comments on commit 877978f

Please sign in to comment.