test runs only selected tasks
This commit is contained in:
parent
64701a2f25
commit
65b3f6995f
|
@ -103,15 +103,6 @@ function clean {
|
|||
[[ "$(cat /tmp/forgebuild-host)" = "default" ]]
|
||||
}
|
||||
|
||||
@test "forced run triggers task" {
|
||||
$FORGEBUILD -b $FORGEBUILDDIR time
|
||||
[ -f /tmp/forgebuild-time ]
|
||||
TIME="$(cat /tmp/forgebuild-time)"
|
||||
$FORGEBUILD -f -b $FORGEBUILDDIR time
|
||||
NEWTIME="$(cat /tmp/forgebuild-time)"
|
||||
[[ "$TIME" != "$NEWTIME" ]]
|
||||
}
|
||||
|
||||
@test "can checkout to a specific branch/commit" {
|
||||
echo "branch" > $FORGEBUILDDIR/branch.checkout
|
||||
cd $GITREPO
|
||||
|
@ -221,3 +212,28 @@ function setup_submodule {
|
|||
|
||||
[[ "$TIME" != "$NEWTIME" ]]
|
||||
}
|
||||
|
||||
# CLI arguments/flags
|
||||
|
||||
@test "running specific tasks only runs those tasks" {
|
||||
$FORGEBUILD -b $FORGEBUILDDIR time host
|
||||
[ -f /tmp/forgebuild-time ]
|
||||
[ -f /tmp/forgebuild-host ]
|
||||
[ ! -f /tmp/forgebuild-branch ]
|
||||
}
|
||||
|
||||
@test "not specifying tasks runs all tasks" {
|
||||
$FORGEBUILD -b $FORGEBUILDDIR
|
||||
[ -f /tmp/forgebuild-time ]
|
||||
[ -f /tmp/forgebuild-host ]
|
||||
[ -f /tmp/forgebuild-branch ]
|
||||
}
|
||||
|
||||
@test "forced run triggers task" {
|
||||
$FORGEBUILD -b $FORGEBUILDDIR time
|
||||
[ -f /tmp/forgebuild-time ]
|
||||
TIME="$(cat /tmp/forgebuild-time)"
|
||||
$FORGEBUILD -f -b $FORGEBUILDDIR time
|
||||
NEWTIME="$(cat /tmp/forgebuild-time)"
|
||||
[[ "$TIME" != "$NEWTIME" ]]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue