abuild/tests/abuild.bats

30 lines
419 B
Plaintext
Raw Normal View History

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
}
teardown() {
rm -rf "$REPODEST"
}
@test "abuild: help text" {
2019-11-07 11:01:18 +00:00
$ABUILD -h
}
@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 ]
}