#!/bin/sh # # aegis - project change supervisor. # Copyright (C) 2012, 2014 Peter Miller # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or (at # your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # TEST_SUBJECT="aemakegen, debian Breaks field" # load up standard prelude and test functions . test_funcs AEGIS_PROJECT=broken export AEGIS_PROJECT activity="new project 28" aegis -npr ${AEGIS_PROJECT} -version - -v -dir $work/proj.dir \ -lib $AEGIS_PATH > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi activity="project attributes 33" cat > paf << fubar developer_may_review = true; developer_may_integrate = true; reviewer_may_integrate = true; default_test_exemption = true; develop_end_action = goto_awaiting_integration; default_development_directory = "$work"; fubar if test $? -ne 0 ; then no_result; fi aegis -pa -f paf -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi activity="staff 46" aegis -nd $USER -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi aegis -nrv $USER -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi aegis -ni $USER -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi activity="new change 54" cat > caf << 'fubar' brief_description = "one"; cause = internal_enhancement; test_baseline_exempt = true; fubar if test $? -ne 0 ; then no_result; fi aegis -nc -f caf -v -p $AEGIS_PROJECT > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi activity="develop begin 64" aegis -db 10 -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi activity="new file 68" aegis -nf \ $work/${AEGIS_PROJECT}.C010/aegis.conf \ $work/${AEGIS_PROJECT}.C010/barney/main.c \ $work/${AEGIS_PROJECT}.C010/configure.ac \ -v > log 2>&1 if test $? -ne 0 ; then cat log; no_result; fi cat > $work/${AEGIS_PROJECT}.C010/configure.ac << 'fubar' AC_CHECK_PROGS(AR, ar) AC_PROG_RANLIB fubar if test $? -ne 0 ; then no_result; fi cat > $work/${AEGIS_PROJECT}.C010/aegis.conf << 'fubar' build_command = "exit 0"; history_get_command = "aesvt -check-out -edit ${quote $edit} " "-history ${quote $history} -f ${quote $output}"; history_put_command = "aesvt -check-in -history ${quote $history} " "-f ${quote $input}"; history_query_command = "aesvt -query -history ${quote $history}"; history_content_limitation = binary_capable; diff_command = "set +e; diff $orig $i > $out; test $$? -le 1"; diff3_command = "(diff3 -e $mr $orig $i | sed -e '/^w$$/d' -e '/^q$$/d'; \ echo '1,$$p' ) | ed - $mr > $out"; link_integration_directory = true; test_command = "$sh $filename $arch"; project_specific = [ { name = "aemakegen:debian:maintainer"; value = "maintainer@example.com"; }, { name = "aemakegen:debian:breaks:broken"; value = "some-other-package"; }, { name = "aemakegen:debian:replaces:broken"; value = "some-other-package"; }, ]; fubar if test $? -ne 0 ; then no_result; fi # ---------- debian ------------------------------------------------------ activity="aemakegen 504" aemakegen -c 10 --target=debian if test $? -ne 0 ; then fail; fi TAB=`awk 'BEGIN{printf("%c", 9)}' /dev/null` activity="check debian/control 510" sed "s|{TAB}|${TAB}|g" > ok << 'fubar' Source: broken Section: utils Priority: optional Maintainer: maintainer@example.com Build-Depends: autotools-dev, debhelper (>= 5), dh-autoreconf Standards-Version: 3.9.3 Package: broken Architecture: any Description: The "broken" program. Depends: ${misc:Depends}, ${shlibs:Depends} Breaks: some-other-package Replaces: some-other-package fubar if test $? -ne 0 ; then no_result; fi diff -u ok $work/${AEGIS_PROJECT}.C010/debian/control if test $? -ne 0 ; then fail; fi # # Only definite negatives are possible. # The functionality exercised by this test appears to work, # no other guarantees are made. # pass # vim: set ts=8 sw=4 et :