Skip to content

Commit

Permalink
[ breaking ] Change the default passed arg to a pack lock
Browse files Browse the repository at this point in the history
  • Loading branch information
buzden committed Sep 8, 2023
1 parent 08c47cd commit adaa3b3
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
7 changes: 5 additions & 2 deletions src/Test/Golden/RunnerHelper.idr
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,13 @@ interface RunScriptArg where
constructor MkRunScriptArg
runScriptArg : String

||| When no default argument is given, is passes a filename for "pack lock",
||| a file to be locked over when running `pack -q install-deps test.ipkg` using `flock`.
||| This is most useful when testing libraries, this only `pack` or `idris2` commands are used in tests.
public export
%defaulthint
DefaultRunScriptArg : RunScriptArg
DefaultRunScriptArg = MkRunScriptArg "idris2"
DefaultRunScriptArg : BaseTestsDir => RunScriptArg
DefaultRunScriptArg = MkRunScriptArg $ baseTestsDir ++ "/.pack_lock"

--- Options management ---

Expand Down
3 changes: 0 additions & 3 deletions tests/runner/Runner.idr
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@ import BaseDir

import Test.Golden.RunnerHelper

RunScriptArg where
runScriptArg = baseTestsDir ++ "/.pack_lock"

main : IO ()
main = goldenRunner
[ "Simple tests" `atDir` "simple-tests"
Expand Down

0 comments on commit adaa3b3

Please sign in to comment.