Rename sanitycheck -> validate

The term validate/validation is better than sanity/sane.
This commit is contained in:
Natanael Copa 2024-10-08 11:56:47 +02:00
parent da9269ba62
commit cd78cd5da2
3 changed files with 45 additions and 40 deletions

View File

@ -64,7 +64,7 @@ other related operations.
*all*
Runs the entire build process. This is the default when no other command is
specified, and is roughly an alias for *sanitycheck builddeps clean fetch
specified, and is roughly an alias for *validate builddeps clean fetch
unpack prepare mkusers build check rootpkg*.
*build*
@ -112,8 +112,8 @@ other related operations.
*rootpkg*
Run 'package', the split functions and create apks as fakeroot
*sanitycheck*
Basic sanity check of APKBUILD
*validate*
Basic validation of APKBUILD
*snapshot*
Create a *$giturl* snapshot and upload to *$disturl*

View File

@ -183,10 +183,10 @@ verify_pkgname() {
return 0
}
# check if apkbuild is basically sane
default_sanitycheck() {
# check if apkbuild is valid
default_validate() {
local i= j=
msg "Checking sanity of $APKBUILD..."
msg "Validating $APKBUILD..."
[ -z "$pkgver" ] && die "Missing pkgver in APKBUILD"
$APK version --check --quiet -- "$pkgver"-r0 || \
die "$pkgver is not a valid version"
@ -328,8 +328,13 @@ default_sanitycheck() {
return 0
}
validate() {
default_validate
}
# for backwards compat
sanitycheck() {
default_sanitycheck
warning "'sanitycheck' is renamed. Use 'validate' instead."
}
sumcheck() {
@ -1588,7 +1593,7 @@ scan_shared_objects() {
set -- $(find_scanelf_paths "$datadir")
unset IFS
# sanity check, verify that each path is prefixed with datadir
# validation check, verify that each path is prefixed with datadir
for i; do
if [ "${i#$datadir}" = "$i" ]; then
error "Internal error in scanelf paths"
@ -1865,7 +1870,7 @@ build_abuildrepo() {
# make sure SOURCE_DATE_EPOCH is set
set_source_date
for part in sanitycheck builddeps clean fetch unpack prepare mkusers build \
for part in validate builddeps clean fetch unpack prepare mkusers build \
$_check rootpkg; do
runpart $part
done
@ -2493,7 +2498,7 @@ rootbld() {
set_source_date
# networking business
sanitycheck
validate
clean
fetch
verify
@ -2825,7 +2830,7 @@ usage() {
prepare Apply patches
rootbld Build package in clean chroot
rootpkg Run 'package', the split functions and create apks as fakeroot
sanitycheck Basic sanity check of APKBUILD
validate Basic validation of APKBUILD
snapshot Create a \$giturl snapshot and upload to \$disturl
sourcecheck Check if remote source package exists upstream
srcpkg Make a source package

View File

@ -397,17 +397,17 @@ abuild_valid_pkgnames_body() {
cp -ra "$testrepo"/test-pkgname .
cd test-pkgname
atf_check -s exit:0 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME=foo atf_check -s exit:0 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTSUBNAME=foo atf_check -s exit:0 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME="more_+-2.0-complicated" atf_check -s exit:0 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
}
abuild_invalid_pkgnames_body() {
@ -415,20 +415,20 @@ abuild_invalid_pkgnames_body() {
cp -ra "$testrepo"/test-pkgname .
cd test-pkgname
TESTNAME="" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME="-foo" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME="foo with spaces" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME="width@at" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTNAME="width=equal" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
}
abuild_invalid_subpkgnames_body() {
@ -436,11 +436,11 @@ abuild_invalid_subpkgnames_body() {
cp -ra "$testrepo"/test-pkgname .
cd test-pkgname
TESTSUBNAME="" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
TESTSUBNAME="-foo" atf_check -s exit:1 \
-e match:"Checking sanity" \
abuild sanitycheck
-e match:"Validating" \
abuild validate
}
abuild_invalid_subpkg_version_body() {
@ -458,19 +458,19 @@ abuild_provide_pkgname_body() {
cd test-pkgname
TESTNAME=provided atf_check -s exit:1 \
-e match:"provides must not contain" \
abuild sanitycheck
abuild validate
TESTNAME=test TESTPROVIDES='test~1' atf_check -s exit:1 \
-e match:"provides must not contain" \
abuild sanitycheck
abuild validate
TESTNAME=test TESTPROVIDES='test=1' atf_check -s exit:1 \
-e match:"provides must not contain" \
abuild sanitycheck
abuild validate
TESTNAME=test TESTPROVIDES='test>1' atf_check -s exit:1 \
-e match:"provides must not contain" \
abuild sanitycheck
abuild validate
TESTNAME=test TESTPROVIDES='test<=1' atf_check -s exit:1 \
-e match:"provides must not contain" \
abuild sanitycheck
abuild validate
}
abuild_subpackage_arch_body() {
@ -511,7 +511,7 @@ abuild_pkgver_digit_letter_digit_body() {
cd test-pkgname
TESTPKGVER=1.0p1 atf_check -s exit:1 \
-e match:'ERROR.*version' \
abuild sanitycheck
abuild validate
}
abuild_multiline_license_body() {
@ -527,7 +527,7 @@ abuild_license_spdx_body() {
cd test-licenses
TESTPKGVER=1.0_p1 atf_check -s exit:0 \
-e not-match:'WARNING' \
abuild sanitycheck
abuild validate
}
abuild_git_ceiling_body() {