Skip to content

Instantly share code, notes, and snippets.

@aspnetde
Created October 6, 2016 15:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspnetde/98f973dbee73ccf15ac4022a008c70cf to your computer and use it in GitHub Desktop.
Save aspnetde/98f973dbee73ccf15ac4022a008c70cf to your computer and use it in GitHub Desktop.
FAKE Failing Test (with PlistBuddy)
#r "tools/FAKE/FakeLib.dll"
open Fake
open System
open System.IO
let Exec command args =
let result = Shell.Exec(command, args)
if result <> 0 then failwithf "%s exited with error %d" command result
let ExecutePlistBuddy key value path =
Exec "/usr/libexec/PlistBuddy" ("-c 'Set :" + key + " " + value + "' " + path)
Target "failing-test" (fun _ ->
ExecutePlistBuddy "CFBundleIdentifier" "test1" "Some/Info.plist"
// Remove the next line, and we're good to go.
ExecutePlistBuddy "CFBundleDisplayName" "test2" "Some/Info.plist"
)
RunTargetOrDefault "failing-test"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment