- Add mock-specific build artifacts (chroot/, mock-*, mockroot/) - Include package build files (*.deb, *.changes, *.buildinfo) - Add development tools (.coverage, .pytest_cache, .tox) - Include system files (.DS_Store, Thumbs.db, ._*) - Add temporary and backup files (*.tmp, *.bak, *.backup) - Include local configuration overrides (config.local.yaml, .env.local) - Add test artifacts and documentation builds - Comprehensive coverage for Python build system project This ensures build artifacts, chroot environments, and development tools are properly ignored in version control.
39 lines
1.1 KiB
Bash
39 lines
1.1 KiB
Bash
#!/bin/sh
|
|
|
|
. ${TESTDIR}/functions
|
|
|
|
#
|
|
# Test that chroot return code is properly passed up
|
|
#
|
|
|
|
header "testing that chroot return code is passed back correctly"
|
|
runcmd "$MOCKCMD --offline --chroot -- bash -c 'exit 5'"
|
|
res=$?
|
|
if [ $res -ne 5 ]; then
|
|
echo "'mock --chroot' return code not properly passed back: $res"
|
|
exit 1
|
|
fi
|
|
|
|
header "testing exit code on unsupported command line"
|
|
runcmd "$MOCKCMD --offline --scm-enable --scm-option method=unsupported"
|
|
res=$?
|
|
if [ $res -ne 5 ]; then
|
|
echo "mock pass exit code $res instead of 5 where there is problem with command line options"
|
|
exit 1
|
|
fi
|
|
|
|
header "testing that error in root.log is passed back correctly"
|
|
runcmd "$MOCKCMD --offline --rebuild ${TESTDIR}/test-E-1.1-0.src.rpm"
|
|
res=$?
|
|
if [ $res -ne 30 ]; then
|
|
echo "mock pass exit code $res instead of 30 where there is problem in root.log"
|
|
exit 1
|
|
fi
|
|
|
|
header "testing error code when resultdir cannot be created"
|
|
runcmd "$MOCKCMD --offline --resultdir=/proc/doesnotwork --rebuild ${TESTDIR}/test-C-1.1-0.src.rpm"
|
|
res=$?
|
|
if [ $res -ne 70 ]; then
|
|
echo "mock pass exit code $res instead of 70 when resultdir cannot be created"
|
|
exit 1
|
|
fi
|