Skip to content

Commit

Permalink
Merge pull request #984 from jluebbe/test-fixes
Browse files Browse the repository at this point in the history
fix distcheck tests
  • Loading branch information
jluebbe committed Sep 30, 2022
2 parents d51d11d + 51a5f3a commit bfbf94c
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/distcheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install automake libtool libglib2.0-dev libcurl3-dev libssl-dev libdbus-1-dev libjson-glib-dev libfdisk-dev libnl-genl-3-dev dbus-x11
sudo apt-get install automake libtool libglib2.0-dev libcurl3-dev libssl-dev libdbus-1-dev libjson-glib-dev libfdisk-dev libnl-genl-3-dev dbus-x11 faketime casync
- uses: actions/checkout@v2

Expand All @@ -25,7 +25,7 @@ jobs:
- name: Run distcheck
run: |
sudo make -j4 distcheck
sudo make distcheck
- name: Show system status and logs
if: ${{ failure() }}
Expand Down
1 change: 1 addition & 0 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ EXTRA_DIST += tap-t \
test/bin \
$(wildcard test/good-casync-bundle-1.4.castr/*/*.cacnk) \
$(wildcard test/good-casync-bundle-1.5.1.castr/*/*.cacnk) \
$(wildcard test/good-casync-bundle-verity.castr/*/*.cacnk) \
test/install-content \
test/openssl-ca \
$(wildcard test/*.raucb) \
Expand Down
8 changes: 7 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ AC_CONFIG_AUX_DIR([build-aux])
# Use subdir-object for single-Makefile build
# Use foreign to prevent warnings for missing files
# such as README, NEWS
AM_INIT_AUTOMAKE([1.11 subdir-objects foreign no-dist-gzip dist-xz])
AM_INIT_AUTOMAKE([1.11 subdir-objects foreign no-dist-gzip dist-xz tar-pax])
AM_MAINTAINER_MODE([enable])
AM_SILENT_RULES([yes])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
Expand Down Expand Up @@ -207,8 +207,14 @@ AC_CONFIG_LINKS([test/good-verity-bundle.raucb:test/good-verity-bundle.raucb])
AC_CONFIG_LINKS([test/good-crypt-bundle-encrypted.raucb:test/good-crypt-bundle-encrypted.raucb])
AC_CONFIG_LINKS([test/good-crypt-bundle-unencrypted.raucb:test/good-crypt-bundle-unencrypted.raucb])
AC_CONFIG_LINKS([test/good-casync-bundle-1.4.raucb:test/good-casync-bundle-1.4.raucb])
AC_CONFIG_LINKS([test/good-casync-bundle-1.4.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk:test/good-casync-bundle-1.4.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk])
AC_CONFIG_LINKS([test/good-casync-bundle-1.4.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk:test/good-casync-bundle-1.4.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk])
AC_CONFIG_LINKS([test/good-casync-bundle-1.5.1.raucb:test/good-casync-bundle-1.5.1.raucb])
AC_CONFIG_LINKS([test/good-casync-bundle-1.5.1.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk:test/good-casync-bundle-1.5.1.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk])
AC_CONFIG_LINKS([test/good-casync-bundle-1.5.1.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk:test/good-casync-bundle-1.5.1.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk])
AC_CONFIG_LINKS([test/good-casync-bundle-verity.raucb:test/good-casync-bundle-verity.raucb])
AC_CONFIG_LINKS([test/good-casync-bundle-verity.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk:test/good-casync-bundle-verity.castr/6207/620797b6a249553166433873ead3ab6aadd24e1750b3e71edd642a91c006d1d0.cacnk])
AC_CONFIG_LINKS([test/good-casync-bundle-verity.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk:test/good-casync-bundle-verity.castr/7f40/7f40d757cf2f63d4f32bd5b802f7bf2bafeb3d38f5f38e436ab8828f814f7d8e.cacnk])
AC_CONFIG_LINKS([test/install-content/appfs.img:test/install-content/appfs.img])
AC_CONFIG_LINKS([test/install-content/custom_handler.sh:test/install-content/custom_handler.sh])
AC_CONFIG_LINKS([test/install-content/hook.sh:test/install-content/hook.sh])
Expand Down
14 changes: 10 additions & 4 deletions test/rauc.t
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ grep -q "ENABLE_SERVICE 1" $SHARNESS_TEST_DIRECTORY/../config.h &&
openssl asn1parse -help &&
test_set_prereq OPENSSL

# Prerequisite: HTTP server available [HTTP]
test -n "$RAUC_TEST_HTTP_SERVER" &&
test_set_prereq HTTP

# Prerequisite: streaming support enabled [STREAMING]
grep -q "ENABLE_STREAMING 1" $SHARNESS_TEST_DIRECTORY/../config.h &&
test -n "$RAUC_TEST_HTTP_SERVER" &&
Expand Down Expand Up @@ -397,7 +401,7 @@ test_expect_success PKCS11 "rauc bundle with PKCS11 (key mismatch)" "
test_must_fail rauc \
--cert 'pkcs11:token=rauc;object=autobuilder-1' \
--key 'pkcs11:token=rauc;object=autobuilder-2' \
bundle ${TESTP_TMPDIR}/install-content ${TEST_TMPDIR}/out.raucb
bundle ${TEST_TMPDIR}/install-content ${TEST_TMPDIR}/out.raucb
"

test_expect_success ROOT "rauc mount" "
Expand Down Expand Up @@ -886,14 +890,16 @@ test_expect_success "rauc resign (output exists)" "
"

test_expect_success FAKETIME "rauc resign extend (not expired)" "
test_when_finished rm -rf ${TEST_TMPDIR}/install-content &&
test_when_finished rm -f ${TEST_TMPDIR}/out1.raucb &&
test_when_finished rm -f ${TEST_TMPDIR}/out2.raucb &&
cp -rL ${SHARNESS_TEST_DIRECTORY}/install-content ${TEST_TMPDIR}/ &&
faketime "2018-01-01" \
rauc \
--cert $SHARNESS_TEST_DIRECTORY/openssl-ca/rel/release-2018.cert.pem \
--key $SHARNESS_TEST_DIRECTORY/openssl-ca/rel/private/release-2018.pem \
--keyring $SHARNESS_TEST_DIRECTORY/openssl-ca/rel-ca.pem \
bundle $SHARNESS_TEST_DIRECTORY/install-content ${TEST_TMPDIR}/out1.raucb &&
bundle ${TEST_TMPDIR}/install-content ${TEST_TMPDIR}/out1.raucb &&
test -f ${TEST_TMPDIR}/out1.raucb &&
faketime "2018-10-01" \
rauc \
Expand Down Expand Up @@ -1102,7 +1108,7 @@ test_expect_success "rauc bundle (crypt bundle)" "
test_when_finished rm -rf ${TEST_TMPDIR}/install-content &&
test_when_finished rm -f ${TEST_TMPDIR}/out.raucb &&
cp -rL ${SHARNESS_TEST_DIRECTORY}/install-content ${TEST_TMPDIR}/ &&
cp ${SHARNESS_TEST_DIRECTORY}/install-content/manifest.raucm.crypt ${TEST_TMPDIR}/install-content/manifest.raucm &&
cp -fL ${SHARNESS_TEST_DIRECTORY}/install-content/manifest.raucm.crypt ${TEST_TMPDIR}/install-content/manifest.raucm &&
rauc \
--cert $SHARNESS_TEST_DIRECTORY/openssl-ca/dev/autobuilder-1.cert.pem \
--key $SHARNESS_TEST_DIRECTORY/openssl-ca/dev/private/autobuilder-1.pem \
Expand Down Expand Up @@ -1217,7 +1223,7 @@ test_expect_success ROOT,SERVICE,CASYNC "rauc install (plain, casync, local)" "
test -s ${SHARNESS_TEST_DIRECTORY}/images/rootfs-1
"

test_expect_success ROOT,SERVICE,CASYNC "rauc install (verity, casync, http)" "
test_expect_success ROOT,SERVICE,CASYNC,HTTP "rauc install (verity, casync, http)" "
start_rauc_dbus_service_with_system \
--conf=${SHARNESS_TEST_DIRECTORY}/minimal-test.conf \
--mount=${SHARNESS_TEST_DIRECTORY}/mnt \
Expand Down

0 comments on commit bfbf94c

Please sign in to comment.