File tree Expand file tree Collapse file tree 2 files changed +13
-17
lines changed
Expand file tree Collapse file tree 2 files changed +13
-17
lines changed Original file line number Diff line number Diff line change @@ -29,25 +29,20 @@ script_nargs_body() {
2929 echo " A-1.0_1" > pkg_A/usr/bin/foo
3030 create_script pkg_A/INSTALL
3131
32+ unset XBPS_ARCH XBPS_TARGET_ARCH
33+
34+ arch=$( xbps-uhelper -r root arch)
3235 cd some_repo
33- xbps-create -A noarch -n A-1.0_1 -s " A pkg" ../pkg_A
34- atf_check_equal $? 0
35- xbps-rindex -d -a $PWD /* .xbps
36- atf_check_equal $? 0
36+ atf_check -o ignore -- xbps-create -A noarch -n A-1.0_1 -s " A pkg" ../pkg_A
37+ # XXX: xbps-rindex has no root flag to ignore /usr/share/xbps.d/xbps-arch.conf
38+ XBPS_ARCH=" $arch " atf_check -o ignore -- xbps-rindex -a $PWD /* .xbps
3739 cd ..
38- xbps-install -C empty.conf -r root --repository=$PWD /some_repo -y A
39- atf_check_equal $? 0
40+ atf_check -o ignore \
41+ -e inline:" pre A 1.0_1 no no ${arch} \npost A 1.0_1 no no ${arch} \n" -- \
42+ xbps-install -C empty.conf -r root --repository=$PWD /some_repo -y A
4043
41- rval=0
42- xbps-reconfigure -C empty.conf -r root -f A 2> out
43- out=" $( cat out) "
44- expected=" post A 1.0_1 no no $( uname -m) "
45- if [ " $out " != " $expected " ]; then
46- echo " out: '$out '"
47- echo " expected: '$expected '"
48- rval=1
49- fi
50- atf_check_equal $rval 0
44+ atf_check -o ignore -e inline:" post A 1.0_1 no no ${arch} \n" -- \
45+ xbps-reconfigure -C empty.conf -r root -f A
5146}
5247
5348atf_test_case script_arch
Original file line number Diff line number Diff line change @@ -8,7 +8,8 @@ native_head() {
88}
99
1010native_body () {
11- atf_check_equal $( xbps-uhelper -r $PWD arch) $( uname -m)
11+ unset XBPS_ARCH XBPS_TARGET_ARCH
12+ atf_check -o " inline:$( uname -m) \n" -- xbps-uhelper -r " $PWD " arch
1213}
1314
1415atf_test_case env
You can’t perform that action at this time.
0 commit comments