on master help sign in
Disable some failing FileSystem.Event.Linux test cases
3cf59a6Harendra Kumar
test/Streamly/Test/FileSystem/Event/Linux.hs+16−3
@@ -44,6 +44,7 @@ dirMoveEvents src dst =
44 , (dst, dirEvent Event.isMovedTo)
44 , (dst, dirEvent Event.isMovedTo)
45 ]
45 ]
46
46
47+#ifdef DEVBUILD
47-- In recursive mode all subdirectories are roots therefore they will generate
48-- In recursive mode all subdirectories are roots therefore they will generate
48-- isRootMoved.
49-- isRootMoved.
49rootDirMoveEvents :: [Char] -> [Char] -> [([Char], Event -> Bool)]
50rootDirMoveEvents :: [Char] -> [Char] -> [([Char], Event -> Bool)]
@@ -53,6 +54,7 @@ rootDirMoveEvents root _ =
53
54
54recDirMoveEvents :: [Char] -> [Char] -> [([Char], Event -> Bool)]
55recDirMoveEvents :: [Char] -> [Char] -> [([Char], Event -> Bool)]
55recDirMoveEvents src dst = dirMoveEvents src dst ++ rootDirMoveEvents src dst
56recDirMoveEvents src dst = dirMoveEvents src dst ++ rootDirMoveEvents src dst
57+#endif
56
58
57fileTouchEvents :: String -> [([Char], Event -> Bool)]
59fileTouchEvents :: String -> [([Char], Event -> Bool)]
58fileTouchEvents file =
60fileTouchEvents file =
@@ -114,6 +116,11 @@ main = do
114
116
115 run FileType fileRootTests
117 run FileType fileRootTests
116
118
119+ let recw = Event.watchWith
120+ (Event.setAllEvents True . Event.setRecursiveMode True)
121+ runRec = runTests moduleName "recursive" recw
122+
123+#ifdef DEVBUILD
117 -- In recursive mode all subdirectories are roots therefore they will
124 -- In recursive mode all subdirectories are roots therefore they will
118 -- generate isRootDeleted/isRootUnwatched. Also, for subdirectories
125 -- generate isRootDeleted/isRootUnwatched. Also, for subdirectories
119 -- multiple events are generated, once in the parent watch and once in the
126 -- multiple events are generated, once in the parent watch and once in the
@@ -141,10 +148,16 @@ main = do
141 recRegTests = regTests ++ regSymRecTests
148 recRegTests = regTests ++ regSymRecTests
142 recSymTests = symTests ++ regSymRecTests
149 recSymTests = symTests ++ regSymRecTests
143
150
144− let recw = Event.watchWith
151+ -- XXX these tests fails intermittently for recursive case
145− (Event.setAllEvents True . Event.setRecursiveMode True)
152+ -- FileSystem.Event.Linux.recursive, Root type SymLinkOrigPath, File deleted (subdir/file1)
146− runRec = runTests moduleName "recursive" recw
153+ -- FileSystem.Event.Linux.recursive, Root type SymLinkOrigPath, File modified (subdir/file1)
154+ -- FileSystem.Event.Linux.recursive, Root type SymLinkOrigPath, File moved (subdir/file1 subdir/file2)
155+ -- FileSystem.Event.Linux.recursive, Root type DirType, File moved (file1 file2)
156+ -- FileSystem.Event.Linux.recursive, Root type DirType, File created (file)
157+ -- uncaught exception: IOException of type ResourceBusy
158+ -- /tmp/fsevent_dir-a5bd0df64c44ab27/watch-root/file: openFile: resource busy (file is locked)
147
159
148 runRec DirType recRegTests
160 runRec DirType recRegTests
149 runRec SymLinkOrigPath recSymTests
161 runRec SymLinkOrigPath recSymTests
162+#endif
150 runRec FileType fileRootTests
163 runRec FileType fileRootTests