2019-11-07 11:01:18 +00:00
|
|
|
setup() {
|
2020-10-29 12:04:27 +00:00
|
|
|
export ABUILD="$PWD/../abuild"
|
|
|
|
export ABUILD_SHAREDIR="$PWD/.."
|
|
|
|
export REPODEST="$BATS_TMPDIR"/packages
|
2019-11-07 11:01:18 +00:00
|
|
|
}
|
|
|
|
|
2020-10-29 13:42:27 +00:00
|
|
|
teardown() {
|
|
|
|
rm -rf "$REPODEST"
|
|
|
|
}
|
|
|
|
|
2020-07-08 08:59:38 +00:00
|
|
|
@test "abuild: help text" {
|
2019-11-07 11:01:18 +00:00
|
|
|
$ABUILD -h
|
|
|
|
}
|
|
|
|
|
2020-07-08 08:59:38 +00:00
|
|
|
@test "abuild: version string" {
|
2019-11-07 11:01:18 +00:00
|
|
|
$ABUILD -V
|
|
|
|
}
|
2020-10-29 12:04:27 +00:00
|
|
|
|
|
|
|
@test "abuild: build simple package without deps" {
|
|
|
|
cd testrepo/pkg1
|
|
|
|
$ABUILD
|
|
|
|
}
|
2020-10-29 12:32:28 +00:00
|
|
|
|
|
|
|
@test "abuild: build failure" {
|
|
|
|
cd testrepo/buildfail
|
|
|
|
run $ABUILD
|
|
|
|
[ $status -ne 0 ]
|
|
|
|
}
|
|
|
|
|