Skip to content
This repository was archived by the owner on May 7, 2024. It is now read-only.

Commit 4d95aeb

Browse files
committed
meta: test module renaming; More comments; Strip unneeded library loading
Signed-off-by: Camber Huang <camber@aosc.io>
1 parent 2940f3e commit 4d95aeb

File tree

7 files changed

+19
-17
lines changed

7 files changed

+19
-17
lines changed

lib/tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
#!/bin/bash
2-
##lib/tests.sh: Basic functions of build-time package integrity check modules.
2+
##lib/tests.sh: Functions for test modules.
3+
##Part of AB3 integrated package test module
34
##@copyright GPL-2.0+
45

56
abtest_non-zero-handler() {

proc/81-test_funcs.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,13 @@
11
#!/bin/bash
2-
##proc/build_funcs: Loads the tests/ functions
2+
##proc/81-test_funcs: Loads the tests/ functions
3+
##Part of AB3 integrated package build-time test module
34
##@copyright GPL-2.0+
5+
46
if bool $ABTEST_ENABLED; then
57
for i in "$AB/tests"/*.sh
68
do
79
. "$i"
810
done
11+
else
12+
abinfo "Build-time package integrity check is disabled. Skipping ..."
913
fi

proc/82-test_probe.sh

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
#!/bin/bash
2-
##proc/81-test_probe.sh: TBF
3-
##FIXME: is there a better name for this?
2+
##proc/82-test_probe.sh: Determining test type
3+
##Part of AB3 integrated package build-time test module
44
##@copyright GPL-2.0+
55

6-
. "$AB/lib/tests.sh"
7-
86
if bool $ABTEST_ENABLED; then
97
if [ -z "$ABTEST_TYPE"]; then
108
abinfo "No $ABTEST_TYPE set, automatically determining ..."
@@ -16,7 +14,4 @@ if bool $ABTEST_ENABLED; then
1614
fi
1715
done
1816
fi
19-
else
20-
abinfo "Build-time package integrity check is disabled. Skipping ..."
2117
fi
22-

proc/83-test_exec.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
#!/bin/bash
2-
##proc/81-check.sh: TBF
2+
##proc/83-test_exec.sh: Perform test
3+
##Part of AB3 integrated package build-time test module
34
##@copyright GPL-2.0+
45

5-
abtrylib tests || ablibret
6-
76
if bool $ABTEST_ENABLED; then
87
cd "$SRCDIR"
98
# FIXME: use a non-zero handler?

tests/00-self_file.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#!/bin/bash
22
##tests/00-self_file.sh: invoke testing function defined in `autobuild/test`
3-
##Part of AB3 build-time package integrity check implementation.
3+
##Part of AB3 integrated package build-time test module
44
##@copyright GPL-2.0+
55

6+
##FIXME: implement unprivileged tests
7+
68
abtrylib arch tests || ablibret
79

810
abtest_self_file_probe() {
911
[ -f "$(arch_trymore=1 arch_findfile test)" ]
1012
}
1113

1214
abtest_self_file_test() {
13-
. "$AB/lib/tests.sh"
1415

1516
abtest() {
1617
abwarn "ABTEST_TYPE is set to self_file, but no abtest() found in autobuild{,/\$ARCH}/test"

tests/01-self_files.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
#!/bin/bash
22
##tests/01-self_files.sh: invoke testing function defined in `autobuild/tests/T*.sh`
3-
##Part of AB3 build-time package integrity check implementation.
3+
##Part of AB3 integrated package build-time test module
44
##@copyright GPL-2.0+
55

6+
##FIXME: implement unprivileged tests
7+
68
abtrylib tests || ablibret
79

810
abtest_self_files_probe() {

tests/99-notest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
2-
##tests/99-notest.sh: Dummy file indicates that test is not available.
3-
##Part of AB3 build-time package integrity check implementation.
2+
##tests/99-notest.sh: Dummy file indicates that test is not available or skipped.
3+
##Part of AB3 integrated package build-time test module
44
##@copyright GPL-2.0+
55

66
abtest_notest_probe() {

0 commit comments

Comments
 (0)