mirror of
https://github.com/mudler/luet.git
synced 2025-07-07 12:28:54 +00:00
36 lines
1.2 KiB
Bash
36 lines
1.2 KiB
Bash
|
#!/bin/bash
|
||
|
|
||
|
export LUET_NOLOCK=true
|
||
|
|
||
|
oneTimeSetUp() {
|
||
|
export tmpdir="$(mktemp -d)"
|
||
|
}
|
||
|
|
||
|
oneTimeTearDown() {
|
||
|
rm -rf "$tmpdir"
|
||
|
}
|
||
|
|
||
|
testBuild() {
|
||
|
mkdir $tmpdir/testbuild1
|
||
|
luet build --tree "$ROOT_DIR/tests/fixtures/simple_dep" --destination $tmpdir/testbuild1 test/c
|
||
|
buildst=$?
|
||
|
assertEquals 'builds successfully' "$buildst" "0"
|
||
|
assertTrue 'create package B 1.1' "[ -e '$tmpdir/testbuild1/b-test-1.1.package.tar' ]"
|
||
|
assertTrue 'create package A 1.2' "[ -e '$tmpdir/testbuild1/a-test-1.2.package.tar' ]"
|
||
|
assertTrue 'create package C 1.0' "[ -e '$tmpdir/testbuild1/c-test-1.0.package.tar' ]"
|
||
|
}
|
||
|
|
||
|
testBuild() {
|
||
|
mkdir $tmpdir/testbuild2
|
||
|
luet build --tree "$ROOT_DIR/tests/fixtures/simple_dep" --destination $tmpdir/testbuild2 --only-target-package test/c
|
||
|
buildst=$?
|
||
|
assertEquals 'builds successfully' "$buildst" "0"
|
||
|
assertTrue 'create package B 1.1' "[ ! -e '$tmpdir/testbuild2/b-test-1.1.package.tar' ]"
|
||
|
assertTrue 'create package A 1.2' "[ ! -e '$tmpdir/testbuild2/a-test-1.2.package.tar' ]"
|
||
|
assertTrue 'create package C 1.0' "[ -e '$tmpdir/testbuild2/c-test-1.0.package.tar' ]"
|
||
|
}
|
||
|
|
||
|
# Load shUnit2.
|
||
|
. "$ROOT_DIR/tests/integration/shunit2"/shunit2
|
||
|
|