pebbleResource :: TestTree -> TestTree
pebbleResource = withResource pebbleProcess terminateProcess . const
  where
    pebbleProcess = do
      stdOut <- openFile "pebble.log" WriteMode
      let pr =
            (proc "gopath/bin/pebble" ["-strict"]) {std_out = UseHandle stdOut}
      (_, _, _, pid) <- createProcess_ "spawnProcess" pr
      return pid
pebbleResource :: TestTree -> TestTree
pebbleResource = withResource pebbleProcess terminateProcess . const
  where
    pebbleProcess = do
      stdOut <- openFile "pebble.log" WriteMode
      let pr =
            (proc "gopath/bin/pebble" ["-strict"]) {std_out = UseHandle stdOut}
      (_, _, _, pid) <- createProcess_ "spawnProcess" pr
      return pid
pebbleResource = withResource pebbleProcess terminateProcess . const
  where
    pebbleProcess = do
      stdOut <- openFile "pebble.log" WriteMode
      let pr =
            (proc "gopath/bin/pebble" ["-strict"]) {std_out = UseHandle stdOut}
      (_, _, _, pid) <- createProcess_ "spawnProcess" pr
      return pid