diff -Nru fcm-2019.09.0/bin/fcm fcm-2021.05.01/bin/fcm --- fcm-2019.09.0/bin/fcm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/bin/fcm_graphic_diff fcm-2021.05.01/bin/fcm_graphic_diff --- fcm-2019.09.0/bin/fcm_graphic_diff 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm_graphic_diff 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -127,6 +127,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/bin/fcm_graphic_merge fcm-2021.05.01/bin/fcm_graphic_merge --- fcm-2019.09.0/bin/fcm_graphic_merge 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm_graphic_merge 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -146,6 +146,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/bin/fcm_gui fcm-2021.05.01/bin/fcm_gui --- fcm-2019.09.0/bin/fcm_gui 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm_gui 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -1341,6 +1341,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/bin/fcm_internal fcm-2021.05.01/bin/fcm_internal --- fcm-2019.09.0/bin/fcm_internal 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm_internal 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -624,6 +624,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/bin/fcm_test_battery fcm-2021.05.01/bin/fcm_test_battery --- fcm-2019.09.0/bin/fcm_test_battery 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/bin/fcm_test_battery 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/CHANGES.md fcm-2021.05.01/CHANGES.md --- fcm-2019.09.0/CHANGES.md 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/CHANGES.md 2021-05-23 12:45:34.000000000 +0000 @@ -5,6 +5,31 @@ -------------------------------------------------------------------------------- +## 2021.05.0 (2021-05-20) + +FCM release 43. + +### Noteworthy Changes + +[260](https://github.com/metomi/fcm/pull/260) +Fix bug where fcm would ignore modules that begin with function/subroutine. + +-------------------------------------------------------------------------------- + +## 2019.09.0 (2019-09-30) + +FCM release 42. + +### Noteworthy Changes + +[#256](https://github.com/metomi/fcm/pull/256): +fcm make: build: correctly support Fortran submodule. A submodule depends on +its parent module at compile time, but a parent module depends on its +submodules at link time. This change also ensures that other modern syntax +used in module/submodule definitions are handled correctly. + +-------------------------------------------------------------------------------- + ## 2019.05.0 (2019-05-03) FCM release 41. diff -Nru fcm-2019.09.0/CONTRIBUTING.md fcm-2021.05.01/CONTRIBUTING.md --- fcm-2019.09.0/CONTRIBUTING.md 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/CONTRIBUTING.md 2021-05-23 12:45:34.000000000 +0000 @@ -34,6 +34,8 @@ * Roddy Sharp (Met Office, UK) * Matt Shin (Met Office, UK) * Stuart Whitehouse (Met Office, UK) +* Tim Pillinger (Met Office, UK) +* Joe Mancell (Met Office, UK) (All contributors are identifiable with email addresses in the version control logs or otherwise.) diff -Nru fcm-2019.09.0/debian/changelog fcm-2021.05.01/debian/changelog --- fcm-2019.09.0/debian/changelog 2020-01-15 09:39:12.000000000 +0000 +++ fcm-2021.05.01/debian/changelog 2021-08-17 08:39:07.000000000 +0000 @@ -1,3 +1,19 @@ +fcm (2021.05.01-2) unstable; urgency=medium + + * Push to unstable + + -- Alastair McKinstry Tue, 17 Aug 2021 09:39:07 +0100 + +fcm (2021.05.01-1) experimental; urgency=medium + + * New upstream release + * Standards-Version: 4.5.1 + * dh_compat standard 13, for M-A aware install + * Use libjs-bootstrap rather than shipping our own + * Change installpath for perl to placate dh_missing + + -- Alastair McKinstry Fri, 28 May 2021 14:13:40 +0100 + fcm (2019.09.0-2) unstable; urgency=medium * Switch from using xxdiff to kdiff3 as graphical merge tool, diff -Nru fcm-2019.09.0/debian/control fcm-2021.05.01/debian/control --- fcm-2019.09.0/debian/control 2020-01-15 09:39:12.000000000 +0000 +++ fcm-2021.05.01/debian/control 2021-08-17 08:39:07.000000000 +0000 @@ -2,8 +2,8 @@ Section: utils Priority: optional Maintainer: Alastair McKinstry -Standards-Version: 4.4.1.0 -Build-Depends: debhelper-compat (= 12), +Standards-Version: 4.5.1 +Build-Depends: debhelper-compat (= 13), libconfig-ini-perl, libclass-dbi-sqlite-perl, libxml-parser-perl, @@ -14,13 +14,13 @@ rsync Homepage: https://beta.metoffice.gov.uk/research/weather/weather-science-it/fcm Vcs-Browser: https://salsa.debian.org:/science-team/fcm.git -Vcs-Git: https://salsa.debian.org:/science-team/fcm.git +Vcs-Git: https://salsa.debian.org:/science-team/fcm.git -b debian/latest Package: fcm Architecture: all Depends: kdiff3, ${perl:Depends}, ${misc:Depends}, libjs-jquery, libconfig-inifiles-perl, libclass-dbi-sqlite-perl, libxml-parser-perl, libsvn-perl, - subversion, perl-tk + subversion, perl-tk, libjs-bootstrap Description: Flexible Configuration Manager FCM is a set of tools for managing and building source code. FCM uses Subversion for code management but defines a common process diff -Nru fcm-2019.09.0/debian/fcm.install fcm-2021.05.01/debian/fcm.install --- fcm-2019.09.0/debian/fcm.install 2020-01-15 09:39:12.000000000 +0000 +++ fcm-2021.05.01/debian/fcm.install 2021-08-17 08:39:07.000000000 +0000 @@ -2,5 +2,5 @@ sbin/fcm-* /usr/sbin etc/fcm debian/bash_completion.d/* /usr/share/bash-completion/completions/ -lib/* /usr/share/perl5/ +usr/lib/${DEB_HOST_MULTIARCH}/perl/5.20/* /usr/share/perl5/ doc/etc/fcm-version.js /etc/fcm diff -Nru fcm-2019.09.0/debian/patches/paths.patch fcm-2021.05.01/debian/patches/paths.patch --- fcm-2019.09.0/debian/patches/paths.patch 2020-01-15 09:39:12.000000000 +0000 +++ fcm-2021.05.01/debian/patches/paths.patch 2021-08-17 08:39:07.000000000 +0000 @@ -3,10 +3,10 @@ Last-Updated: 2019-08-15 Forwarded: not-needed -Index: fcm-2019.05.0/lib/FCM/Util.pm +Index: fcm-2021.05.01/lib/FCM/Util.pm =================================================================== ---- fcm-2019.05.0.orig/lib/FCM/Util.pm -+++ fcm-2019.05.0/lib/FCM/Util.pm +--- fcm-2021.05.01.orig/lib/FCM/Util.pm ++++ fcm-2021.05.01/lib/FCM/Util.pm @@ -105,6 +105,7 @@ our @FCM1_KEYWORD_FILES = ( ); our @CONF_PATHS = ( @@ -24,63 +24,63 @@ open(my($handle), '<', $path) || die("$path: $!"); my $content = do {local($/); readline($handle)}; close($handle); -Index: fcm-2019.05.0/bin/fcm +Index: fcm-2021.05.01/bin/fcm =================================================================== ---- fcm-2019.05.0.orig/bin/fcm -+++ fcm-2019.05.0/bin/fcm +--- fcm-2021.05.01.orig/bin/fcm ++++ fcm-2021.05.01/bin/fcm @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl # ------------------------------------------------------------------------------ - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # -Index: fcm-2019.05.0/bin/fcm_graphic_diff +Index: fcm-2021.05.01/bin/fcm_graphic_diff =================================================================== ---- fcm-2019.05.0.orig/bin/fcm_graphic_diff -+++ fcm-2019.05.0/bin/fcm_graphic_diff +--- fcm-2021.05.01.orig/bin/fcm_graphic_diff ++++ fcm-2021.05.01/bin/fcm_graphic_diff @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl #------------------------------------------------------------------------------- - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # -Index: fcm-2019.05.0/bin/fcm_graphic_merge +Index: fcm-2021.05.01/bin/fcm_graphic_merge =================================================================== ---- fcm-2019.05.0.orig/bin/fcm_graphic_merge -+++ fcm-2019.05.0/bin/fcm_graphic_merge +--- fcm-2021.05.01.orig/bin/fcm_graphic_merge ++++ fcm-2021.05.01/bin/fcm_graphic_merge @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl #------------------------------------------------------------------------------- - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # -Index: fcm-2019.05.0/bin/fcm_gui +Index: fcm-2021.05.01/bin/fcm_gui =================================================================== ---- fcm-2019.05.0.orig/bin/fcm_gui -+++ fcm-2019.05.0/bin/fcm_gui +--- fcm-2021.05.01.orig/bin/fcm_gui ++++ fcm-2021.05.01/bin/fcm_gui @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl #------------------------------------------------------------------------------- - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # -Index: fcm-2019.05.0/bin/fcm_internal +Index: fcm-2021.05.01/bin/fcm_internal =================================================================== ---- fcm-2019.05.0.orig/bin/fcm_internal -+++ fcm-2019.05.0/bin/fcm_internal +--- fcm-2021.05.01.orig/bin/fcm_internal ++++ fcm-2021.05.01/bin/fcm_internal @@ -1,4 +1,4 @@ -#!/usr/bin/env perl +#!/usr/bin/perl #------------------------------------------------------------------------------- - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # -Index: fcm-2019.05.0/bin/fcm_test_battery +Index: fcm-2021.05.01/bin/fcm_test_battery =================================================================== ---- fcm-2019.05.0.orig/bin/fcm_test_battery -+++ fcm-2019.05.0/bin/fcm_test_battery +--- fcm-2021.05.01.orig/bin/fcm_test_battery ++++ fcm-2021.05.01/bin/fcm_test_battery @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/bin/bash #------------------------------------------------------------------------------- - # Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. + # Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # diff -Nru fcm-2019.09.0/debian/rules fcm-2021.05.01/debian/rules --- fcm-2019.09.0/debian/rules 2020-01-15 09:39:12.000000000 +0000 +++ fcm-2021.05.01/debian/rules 2021-08-17 08:39:07.000000000 +0000 @@ -13,3 +13,8 @@ override_dh_auto_install: mkdir -p $(INSTDIR)/$(PERLDIR) cp -a lib/* $(INSTDIR)/$(PERLDIR) + +override_dh_installdocs: + dh_installdocs + rm ./debian/fcm/usr/share/doc/fcm/etc/bootstrap/js/bootstrap.js + ln -s /usr/share/javascript/bootstrap/js/bootstrap.js ./debian/fcm/usr/share/doc/fcm/etc/bootstrap/js/bootstrap.js diff -Nru fcm-2019.09.0/doc/collaboration/index.html fcm-2021.05.01/doc/collaboration/index.html --- fcm-2019.09.0/doc/collaboration/index.html 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/doc/collaboration/index.html 2021-05-23 12:45:34.000000000 +0000 @@ -467,7 +467,7 @@
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British
- Copyright © 2006-2019 British Crown (Met Office) & Contributors. + Copyright © 2006-2021 British Crown (Met Office) & Contributors. Met Office. See Terms of Use.
This document is released under the British "${PWD}/bin/gfortran" + echo 'exec gfortran-9 "$@"' >>"${PWD}/bin/gfortran" + chmod +x "${PWD}/bin/gfortran" + + - name: Check Perl Version + run: perl --version + + - name: Check SVN Version + run: svn --version + + - name: Run tests + run: | + export LOGNAME="${USER}" + bin/fcm test-battery -j8 diff -Nru fcm-2019.09.0/lib/FCM/Admin/Config.pm fcm-2021.05.01/lib/FCM/Admin/Config.pm --- fcm-2019.09.0/lib/FCM/Admin/Config.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Config.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -348,6 +348,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/Project.pm fcm-2021.05.01/lib/FCM/Admin/Project.pm --- fcm-2019.09.0/lib/FCM/Admin/Project.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Project.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -255,6 +255,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/Runner.pm fcm-2021.05.01/lib/FCM/Admin/Runner.pm --- fcm-2019.09.0/lib/FCM/Admin/Runner.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Runner.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -294,6 +294,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/System.pm fcm-2021.05.01/lib/FCM/Admin/System.pm --- fcm-2019.09.0/lib/FCM/Admin/System.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/System.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -130,50 +130,36 @@ $project->get_trac_live_path(), )); } - my @repository_arguments = (q{}, q{}); - if (-d $project->get_svn_live_path()) { - @repository_arguments = (q{svn}, $project->get_svn_live_path()); - } my $RUN = sub{$RUNNER->run(@_)}; my $TRAC_ADMIN = sub { my ($log, @args) = @_; my @command = (q{trac-admin}, $project->get_trac_live_path(), @args); $RUN->($log, sub {!system(@command)}); }; - my $TRAC_ADMIN_CONT = sub { - my ($log, @args) = @_; - my @command = (q{trac-admin}, $project->get_trac_live_path(), @args); - $RUNNER->run_continue($log, sub {!system(@command)}); - }; $TRAC_ADMIN->( "initialising Trac environment", q{initenv}, $project_name, q{sqlite:db/trac.db}, - @repository_arguments, q{--inherit=../../trac.ini}, ); my $group = $CONFIG->get_trac_group(); if ($group) { _chgrp_and_chmod($project->get_trac_live_path(), $group); } - # Note: For some reason, the commands to remove example components, - # versions, milestones, priorities fail using the "pip install trac" version - # on Travis CI. It is safe to allow the logic to continue after a failure - # here as they are really unimportant and can easily be configured later. for my $item (qw{component1 component2}) { - $TRAC_ADMIN_CONT->( - "removing example component $item", q{component remove}, $item, + $TRAC_ADMIN->( + "removing example component $item", qw{component remove}, $item, ); } for my $item (qw{1.0 2.0}) { - $TRAC_ADMIN_CONT->( - "removing example version $item", q{version remove}, $item, + $TRAC_ADMIN->( + "removing example version $item", qw{version remove}, $item, ); } for my $item (qw{milestone1 milestone2 milestone3 milestone4}) { - $TRAC_ADMIN_CONT->( - "removing example milestone $item", q{milestone remove}, $item, + $TRAC_ADMIN->( + "removing example milestone $item", qw{milestone remove}, $item, ); } for my $item ( @@ -182,10 +168,17 @@ ['blocker' => 'critical'], ) { my ($old, $new) = @{$item}; - $TRAC_ADMIN_CONT->( + $TRAC_ADMIN->( "changing priority $old to $new", qw{priority change}, $old, $new, ); } + if (-d $project->get_svn_live_path()) { + $TRAC_ADMIN->( + "adding repository", + qw{repository add (default)}, + $project->get_svn_live_path(), + ); + } $TRAC_ADMIN->( "adding admin permission", qw{permission add admin TRAC_ADMIN}, ); @@ -1415,6 +1408,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/User.pm fcm-2021.05.01/lib/FCM/Admin/User.pm --- fcm-2019.09.0/lib/FCM/Admin/User.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/User.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -85,6 +85,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/Users/LDAP.pm fcm-2021.05.01/lib/FCM/Admin/Users/LDAP.pm --- fcm-2019.09.0/lib/FCM/Admin/Users/LDAP.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Users/LDAP.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -144,6 +144,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/Users/Passwd.pm fcm-2021.05.01/lib/FCM/Admin/Users/Passwd.pm --- fcm-2019.09.0/lib/FCM/Admin/Users/Passwd.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Users/Passwd.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -140,6 +140,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Admin/Util.pm fcm-2021.05.01/lib/FCM/Admin/Util.pm --- fcm-2019.09.0/lib/FCM/Admin/Util.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Admin/Util.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -380,6 +380,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Class/CODE.pm fcm-2021.05.01/lib/FCM/Class/CODE.pm --- fcm-2019.09.0/lib/FCM/Class/CODE.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Class/CODE.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -302,6 +302,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Class/Exception.pm fcm-2021.05.01/lib/FCM/Class/Exception.pm --- fcm-2019.09.0/lib/FCM/Class/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Class/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -129,6 +129,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Class/HASH.pm fcm-2021.05.01/lib/FCM/Class/HASH.pm --- fcm-2019.09.0/lib/FCM/Class/HASH.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Class/HASH.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -335,6 +335,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/CLI/Exception.pm fcm-2021.05.01/lib/FCM/CLI/Exception.pm --- fcm-2019.09.0/lib/FCM/CLI/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/CLI/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -52,6 +52,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/CLI/fcm-export-items.pod fcm-2021.05.01/lib/FCM/CLI/fcm-export-items.pod --- fcm-2019.09.0/lib/FCM/CLI/fcm-export-items.pod 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/CLI/fcm-export-items.pod 2021-05-23 12:45:34.000000000 +0000 @@ -52,6 +52,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/CLI/Parser.pm fcm-2021.05.01/lib/FCM/CLI/Parser.pm --- fcm-2019.09.0/lib/FCM/CLI/Parser.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/CLI/Parser.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -458,6 +458,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/CLI.pm fcm-2021.05.01/lib/FCM/CLI.pm --- fcm-2019.09.0/lib/FCM/CLI.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/CLI.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -290,6 +290,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/ConfigEntry.pm fcm-2021.05.01/lib/FCM/Context/ConfigEntry.pm --- fcm-2019.09.0/lib/FCM/Context/ConfigEntry.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/ConfigEntry.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -155,6 +155,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Event.pm fcm-2021.05.01/lib/FCM/Context/Event.pm --- fcm-2019.09.0/lib/FCM/Context/Event.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Event.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -378,6 +378,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Keyword.pm fcm-2021.05.01/lib/FCM/Context/Keyword.pm --- fcm-2019.09.0/lib/FCM/Context/Keyword.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Keyword.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -216,6 +216,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Locator.pm fcm-2021.05.01/lib/FCM/Context/Locator.pm --- fcm-2019.09.0/lib/FCM/Context/Locator.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Locator.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -139,6 +139,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Make/Build.pm fcm-2021.05.01/lib/FCM/Context/Make/Build.pm --- fcm-2019.09.0/lib/FCM/Context/Make/Build.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Make/Build.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -476,6 +476,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Make/Extract.pm fcm-2021.05.01/lib/FCM/Context/Make/Extract.pm --- fcm-2019.09.0/lib/FCM/Context/Make/Extract.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Make/Extract.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -489,6 +489,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Make/Mirror.pm fcm-2021.05.01/lib/FCM/Context/Make/Mirror.pm --- fcm-2019.09.0/lib/FCM/Context/Make/Mirror.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Make/Mirror.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -114,6 +114,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Make/Share/Property.pm fcm-2021.05.01/lib/FCM/Context/Make/Share/Property.pm --- fcm-2019.09.0/lib/FCM/Context/Make/Share/Property.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Make/Share/Property.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -133,6 +133,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Make.pm fcm-2021.05.01/lib/FCM/Context/Make.pm --- fcm-2019.09.0/lib/FCM/Context/Make.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Make.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -171,6 +171,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Context/Task.pm fcm-2021.05.01/lib/FCM/Context/Task.pm --- fcm-2019.09.0/lib/FCM/Context/Task.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Context/Task.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -100,6 +100,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Exception.pm fcm-2021.05.01/lib/FCM/Exception.pm --- fcm-2019.09.0/lib/FCM/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -108,6 +108,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/CM/CommitMessage.pm fcm-2021.05.01/lib/FCM/System/CM/CommitMessage.pm --- fcm-2019.09.0/lib/FCM/System/CM/CommitMessage.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/CM/CommitMessage.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -307,6 +307,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/CM/Prompt.pm fcm-2021.05.01/lib/FCM/System/CM/Prompt.pm --- fcm-2019.09.0/lib/FCM/System/CM/Prompt.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/CM/Prompt.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -218,6 +218,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/CM/ResolveConflicts.pm fcm-2021.05.01/lib/FCM/System/CM/ResolveConflicts.pm --- fcm-2019.09.0/lib/FCM/System/CM/ResolveConflicts.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/CM/ResolveConflicts.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -680,6 +680,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/CM/SVN.pm fcm-2021.05.01/lib/FCM/System/CM/SVN.pm --- fcm-2019.09.0/lib/FCM/System/CM/SVN.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/CM/SVN.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -1000,6 +1000,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/CM.pm fcm-2021.05.01/lib/FCM/System/CM.pm --- fcm-2019.09.0/lib/FCM/System/CM.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/CM.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -710,6 +710,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Exception.pm fcm-2021.05.01/lib/FCM/System/Exception.pm --- fcm-2019.09.0/lib/FCM/System/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -423,6 +423,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/C.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/C.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/C.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/C.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -151,6 +151,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/CPP.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/CPP.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/CPP.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/CPP.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -87,6 +87,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/CXX.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/CXX.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/CXX.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/CXX.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -67,6 +67,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Data.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Data.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Data.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Data.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -77,6 +77,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Fortran.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Fortran.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Fortran.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Fortran.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -55,7 +55,11 @@ character|class|complex|double\s*complex|double\s*precision|integer| logical|procedure|real|type }imsx; -my $RE_UNIT_BASE = qr{block\s*data|module|program|submodule}imsx; +my $RE_UNIT_BASE = qr{ + block\s*data| + module(?!\s*(?:function|subroutine|procedure)\s+)| + program| +}imsx; my $RE_UNIT_CALL = qr{subroutine|function}imsx; my %RE = ( DEP_O => qr{\A\s*!\s*depends\s*on\s*:\s*($RE_FILE)}imsx, @@ -65,6 +69,7 @@ OMP_SENT => qr{\A(\s*!\$\s+)?(.*)\z}imsx, UNIT_ATTR => qr{\A\s*(?:(?:(?:impure\s+)?elemental|recursive|pure)\s+)+(.*)\z}imsx, UNIT_BASE => qr{\A\s*($RE_UNIT_BASE)\s+($RE_NAME)\b}imsx, + UNIT_SUBM => qr{\A\s*(submodule)\s*\(($RE_NAME)\)\s*($RE_NAME)\b}imsx, UNIT_CALL => qr{\A\s*($RE_UNIT_CALL)\s+($RE_NAME)\b}imsx, UNIT_END => qr{\A\s*(end)(?:\s+($RE_NAME)(?:\s+($RE_NAME))?)?\b}imsx, UNIT_SPEC => qr{\A\s*$RE_SPEC\b(.*)\z}imsx, @@ -156,14 +161,14 @@ } # Program Unit - my ($type, $symbol) = _process_prog_unit($line); + my ($type, $symbol, @extras) = _process_prog_unit($line); if ($type) { if (!@{$state->{stack}}) { if ($type eq 'program') { $info_hash_ref->{main} = 1; } $info_hash_ref->{symbols} ||= []; - push(@{$info_hash_ref->{symbols}}, [$type, $symbol]); + push(@{$info_hash_ref->{symbols}}, [$type, $symbol, @extras]); } push(@{$state->{stack}}, [$type, $symbol]); return 1; @@ -216,13 +221,16 @@ # the symbol and the signature tokens of the program unit. sub _process_prog_unit { my ($string) = @_; - my ($type, $symbol, @args) = (q{}, q{}); + my ($type, $symbol, $symbol_parent) = (q{}, q{}, q{}); ($type, $symbol) = lc($string) =~ $RE{UNIT_BASE}; if ($type) { - $type = lc($type); $type =~ s{\s*}{}gmsx; return ($type, $symbol); } + ($type, $symbol_parent, $symbol) = lc($string) =~ $RE{UNIT_SUBM}; + if ($type) { + return ($type, $symbol, $symbol_parent); + } $string =~ s/$RE{UNIT_ATTR}/$1/; my ($match) = $string =~ $RE{UNIT_SPEC}; if ($match) { @@ -273,6 +281,11 @@ ), ); my ($ext, $root) = $attrib_ref->{util}->file_ext($key); + # @{$symbols_ref} contains a list of [$type, $symbol, $symbol_parent] + # where $type is the program unit type + # $symbol is the program unit symbol + # $symbol_parent is the parent program unit symbol, e.g. name of + # parent module of a submodule my $symbols_ref = $source->get_info_of()->{symbols}; # FIXME: hard code the handling of "*.inc" files as include files if (!defined($symbols_ref) || !@{$symbols_ref} || $ext eq 'inc') { @@ -300,13 +313,16 @@ ); push(@keys_of_mod, $key_of_mod); } + my @symbol_parents = map { + scalar(@{$_}) > 2 ? $TARGET_OF->($_->[2], 'o') : (); + } @{$symbols_ref}; push( @targets, $TARGET->new( { category => $TARGET->CT_O, deps => [@deps], dep_policy_of => {'include' => $TARGET->POLICY_CAPTURE}, - info_of => {paths => []}, + info_of => {paths => [], parents => \@symbol_parents}, key => $key_of_o, task => 'compile', triggers => \@keys_of_mod, @@ -399,6 +415,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/FPP.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/FPP.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/FPP.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/FPP.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -62,6 +62,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/H.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/H.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/H.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/H.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -126,6 +126,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/NS.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/NS.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/NS.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/NS.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -205,6 +205,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Script.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Script.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType/Script.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType/Script.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -95,6 +95,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/FileType.pm fcm-2021.05.01/lib/FCM/System/Make/Build/FileType.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/FileType.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/FileType.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -221,6 +221,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Archive.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Archive.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Archive.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Archive.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -128,6 +128,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/C.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/C.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/C.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/C.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -65,6 +65,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/CXX.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/CXX.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/CXX.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/CXX.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -65,6 +65,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/Fortran.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/Fortran.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile/Fortran.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile/Fortran.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -109,6 +109,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Compile.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Compile.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -138,6 +138,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/ExtractInterface.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/ExtractInterface.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/ExtractInterface.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/ExtractInterface.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -531,6 +531,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Install.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Install.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Install.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Install.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -85,6 +85,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/C.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/C.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/C.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/C.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -67,6 +67,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/CXX.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/CXX.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/CXX.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/CXX.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -67,6 +67,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/Fortran.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/Fortran.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link/Fortran.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link/Fortran.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -67,6 +67,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Link.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Link.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -197,6 +197,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess/C.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess/C.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess/C.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess/C.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -61,6 +61,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess/Fortran.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess/Fortran.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess/Fortran.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess/Fortran.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -62,6 +62,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Preprocess.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Preprocess.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -126,6 +126,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Share.pm fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Share.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build/Task/Share.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build/Task/Share.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -89,6 +89,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Build.pm fcm-2021.05.01/lib/FCM/System/Make/Build.pm --- fcm-2019.09.0/lib/FCM/System/Make/Build.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Build.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -888,6 +888,7 @@ } } # Determine the targets for each source + my %reverse_deps_of = (); SOURCE: while (my ($ns, $source) = each(%{$ctx->get_source_of()})) { my $type = $source->get_type(); @@ -918,6 +919,24 @@ if (!$source->get_up_to_date()) { $target->set_status($target->ST_OOD); } + if (exists($target->get_info_of()->{'parents'})) { + for my $parent (@{$target->get_info_of()->{'parents'}}) { + if (!exists($reverse_deps_of{$parent})) { + $reverse_deps_of{$parent} = []; + } + push( + @{$reverse_deps_of{$parent}}, + [$key, $target->get_category()], + ); + } + } + } + } + # Add reverse dependencies + # E.g. Fortran module has link time dependency on its submodules + for my $target (@{$targets_ref}) { + if (exists($reverse_deps_of{$target->get_key()})) { + push(@{$target->get_deps()}, @{$reverse_deps_of{$target->get_key()}}); } } # Determines name-space dependencies @@ -1810,6 +1829,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Extract.pm fcm-2021.05.01/lib/FCM/System/Make/Extract.pm --- fcm-2019.09.0/lib/FCM/System/Make/Extract.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Extract.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -1307,6 +1307,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Mirror.pm fcm-2021.05.01/lib/FCM/System/Make/Mirror.pm --- fcm-2019.09.0/lib/FCM/System/Make/Mirror.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Mirror.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -434,6 +434,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Preprocess.pm fcm-2021.05.01/lib/FCM/System/Make/Preprocess.pm --- fcm-2019.09.0/lib/FCM/System/Make/Preprocess.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Preprocess.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -85,7 +85,7 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Share/Config.pm fcm-2021.05.01/lib/FCM/System/Make/Share/Config.pm --- fcm-2019.09.0/lib/FCM/System/Make/Share/Config.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Share/Config.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -426,6 +426,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Share/Dest.pm fcm-2021.05.01/lib/FCM/System/Make/Share/Dest.pm --- fcm-2019.09.0/lib/FCM/System/Make/Share/Dest.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Share/Dest.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -498,6 +498,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make/Share/Subsystem.pm fcm-2021.05.01/lib/FCM/System/Make/Share/Subsystem.pm --- fcm-2019.09.0/lib/FCM/System/Make/Share/Subsystem.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make/Share/Subsystem.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -317,6 +317,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Make.pm fcm-2021.05.01/lib/FCM/System/Make.pm --- fcm-2019.09.0/lib/FCM/System/Make.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Make.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -447,6 +447,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Misc.pm fcm-2021.05.01/lib/FCM/System/Misc.pm --- fcm-2019.09.0/lib/FCM/System/Misc.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Misc.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -340,6 +340,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System/Old.pm fcm-2021.05.01/lib/FCM/System/Old.pm --- fcm-2019.09.0/lib/FCM/System/Old.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System/Old.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -137,6 +137,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/System.pm fcm-2021.05.01/lib/FCM/System.pm --- fcm-2019.09.0/lib/FCM/System.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/System.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -281,6 +281,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/ConfigReader.pm fcm-2021.05.01/lib/FCM/Util/ConfigReader.pm --- fcm-2019.09.0/lib/FCM/Util/ConfigReader.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/ConfigReader.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -604,6 +604,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/ConfigUpgrade.pm fcm-2021.05.01/lib/FCM/Util/ConfigUpgrade.pm --- fcm-2019.09.0/lib/FCM/Util/ConfigUpgrade.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/ConfigUpgrade.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -131,6 +131,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Event.pm fcm-2021.05.01/lib/FCM/Util/Event.pm --- fcm-2019.09.0/lib/FCM/Util/Event.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Event.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -1246,6 +1246,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Exception.pm fcm-2021.05.01/lib/FCM/Util/Exception.pm --- fcm-2019.09.0/lib/FCM/Util/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -214,6 +214,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Locator/FS.pm fcm-2021.05.01/lib/FCM/Util/Locator/FS.pm --- fcm-2019.09.0/lib/FCM/Util/Locator/FS.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Locator/FS.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -198,6 +198,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Locator/SSH.pm fcm-2021.05.01/lib/FCM/Util/Locator/SSH.pm --- fcm-2019.09.0/lib/FCM/Util/Locator/SSH.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Locator/SSH.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -246,6 +246,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Locator/SVN.pm fcm-2021.05.01/lib/FCM/Util/Locator/SVN.pm --- fcm-2019.09.0/lib/FCM/Util/Locator/SVN.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Locator/SVN.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -453,6 +453,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Locator.pm fcm-2021.05.01/lib/FCM/Util/Locator.pm --- fcm-2019.09.0/lib/FCM/Util/Locator.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Locator.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -762,6 +762,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Reporter.pm fcm-2021.05.01/lib/FCM/Util/Reporter.pm --- fcm-2019.09.0/lib/FCM/Util/Reporter.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Reporter.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -377,6 +377,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/Shell.pm fcm-2021.05.01/lib/FCM/Util/Shell.pm --- fcm-2019.09.0/lib/FCM/Util/Shell.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/Shell.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -301,6 +301,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util/TaskRunner.pm fcm-2021.05.01/lib/FCM/Util/TaskRunner.pm --- fcm-2019.09.0/lib/FCM/Util/TaskRunner.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util/TaskRunner.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -375,6 +375,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM/Util.pm fcm-2021.05.01/lib/FCM/Util.pm --- fcm-2019.09.0/lib/FCM/Util.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM/Util.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -1045,6 +1045,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Base.pm fcm-2021.05.01/lib/FCM1/Base.pm --- fcm-2019.09.0/lib/FCM1/Base.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Base.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Build/Fortran.pm fcm-2021.05.01/lib/FCM1/Build/Fortran.pm --- fcm-2019.09.0/lib/FCM1/Build/Fortran.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Build/Fortran.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -544,6 +544,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Build.pm fcm-2021.05.01/lib/FCM1/Build.pm --- fcm-2019.09.0/lib/FCM1/Build.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Build.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/BuildSrc.pm fcm-2021.05.01/lib/FCM1/BuildSrc.pm --- fcm-2019.09.0/lib/FCM1/BuildSrc.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/BuildSrc.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/BuildTask.pm fcm-2021.05.01/lib/FCM1/BuildTask.pm --- fcm-2019.09.0/lib/FCM1/BuildTask.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/BuildTask.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/CfgFile.pm fcm-2021.05.01/lib/FCM1/CfgFile.pm --- fcm-2019.09.0/lib/FCM1/CfgFile.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/CfgFile.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/CfgLine.pm fcm-2021.05.01/lib/FCM1/CfgLine.pm --- fcm-2019.09.0/lib/FCM1/CfgLine.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/CfgLine.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/CmBranch.pm fcm-2021.05.01/lib/FCM1/CmBranch.pm --- fcm-2019.09.0/lib/FCM1/CmBranch.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/CmBranch.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Cm.pm fcm-2021.05.01/lib/FCM1/Cm.pm --- fcm-2019.09.0/lib/FCM1/Cm.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Cm.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -2149,7 +2149,7 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut opy already exists. @@ -2179,7 +2179,7 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut $e->CHDIR @@ -2267,6 +2267,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/CmUrl.pm fcm-2021.05.01/lib/FCM1/CmUrl.pm --- fcm-2019.09.0/lib/FCM1/CmUrl.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/CmUrl.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Config.pm fcm-2021.05.01/lib/FCM1/Config.pm --- fcm-2019.09.0/lib/FCM1/Config.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Config.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/ConfigSystem.pm fcm-2021.05.01/lib/FCM1/ConfigSystem.pm --- fcm-2019.09.0/lib/FCM1/ConfigSystem.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/ConfigSystem.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Dest.pm fcm-2021.05.01/lib/FCM1/Dest.pm --- fcm-2019.09.0/lib/FCM1/Dest.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Dest.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Exception.pm fcm-2021.05.01/lib/FCM1/Exception.pm --- fcm-2019.09.0/lib/FCM1/Exception.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Exception.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -103,6 +103,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/ExtractConfigComparator.pm fcm-2021.05.01/lib/FCM1/ExtractConfigComparator.pm --- fcm-2019.09.0/lib/FCM1/ExtractConfigComparator.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/ExtractConfigComparator.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -366,6 +366,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/ExtractFile.pm fcm-2021.05.01/lib/FCM1/ExtractFile.pm --- fcm-2019.09.0/lib/FCM1/ExtractFile.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/ExtractFile.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Extract.pm fcm-2021.05.01/lib/FCM1/Extract.pm --- fcm-2019.09.0/lib/FCM1/Extract.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Extract.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/ExtractSrc.pm fcm-2021.05.01/lib/FCM1/ExtractSrc.pm --- fcm-2019.09.0/lib/FCM1/ExtractSrc.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/ExtractSrc.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Interactive/InputGetter/CLI.pm fcm-2021.05.01/lib/FCM1/Interactive/InputGetter/CLI.pm --- fcm-2019.09.0/lib/FCM1/Interactive/InputGetter/CLI.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Interactive/InputGetter/CLI.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -95,6 +95,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Interactive/InputGetter/GUI.pm fcm-2021.05.01/lib/FCM1/Interactive/InputGetter/GUI.pm --- fcm-2019.09.0/lib/FCM1/Interactive/InputGetter/GUI.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Interactive/InputGetter/GUI.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -256,6 +256,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Interactive/InputGetter.pm fcm-2021.05.01/lib/FCM1/Interactive/InputGetter.pm --- fcm-2019.09.0/lib/FCM1/Interactive/InputGetter.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Interactive/InputGetter.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -130,6 +130,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Interactive.pm fcm-2021.05.01/lib/FCM1/Interactive.pm --- fcm-2019.09.0/lib/FCM1/Interactive.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Interactive.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -139,6 +139,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Keyword.pm fcm-2021.05.01/lib/FCM1/Keyword.pm --- fcm-2019.09.0/lib/FCM1/Keyword.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Keyword.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -170,6 +170,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/ReposBranch.pm fcm-2021.05.01/lib/FCM1/ReposBranch.pm --- fcm-2019.09.0/lib/FCM1/ReposBranch.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/ReposBranch.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/SrcDirLayer.pm fcm-2021.05.01/lib/FCM1/SrcDirLayer.pm --- fcm-2019.09.0/lib/FCM1/SrcDirLayer.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/SrcDirLayer.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Timer.pm fcm-2021.05.01/lib/FCM1/Timer.pm --- fcm-2019.09.0/lib/FCM1/Timer.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Timer.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/lib/FCM1/Util/ClassLoader.pm fcm-2021.05.01/lib/FCM1/Util/ClassLoader.pm --- fcm-2019.09.0/lib/FCM1/Util/ClassLoader.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Util/ClassLoader.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -88,6 +88,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/lib/FCM1/Util.pm fcm-2021.05.01/lib/FCM1/Util.pm --- fcm-2019.09.0/lib/FCM1/Util.pm 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/lib/FCM1/Util.pm 2021-05-23 12:45:34.000000000 +0000 @@ -1,5 +1,5 @@ # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/.mailmap fcm-2021.05.01/.mailmap --- fcm-2019.09.0/.mailmap 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/.mailmap 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,11 @@ +Ben Fitzpatrick benfitzpatrick +David Matthews dpmatthews +Matt Pryor Matt Pryor +Matt Pryor mkjpryor +Matt Shin matthew.shin +Matt Shin matthewrmshin +Matt Shin matthewrmshin +Roddy Sharp r-sharp +Stuart Whitehouse scwhitehouse +Martin Dix MartinDix +Kerry Day Kerry Day diff -Nru fcm-2019.09.0/man/man1/fcm.1 fcm-2021.05.01/man/man1/fcm.1 --- fcm-2019.09.0/man/man1/fcm.1 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/man/man1/fcm.1 2021-05-23 12:45:34.000000000 +0000 @@ -23,7 +23,7 @@ FCM Team . Please feedback any bug reports or feature requests to us by e-mail. .SH COPYRIGHT -\(co Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +\(co Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. .PP FCM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru fcm-2019.09.0/README.md fcm-2021.05.01/README.md --- fcm-2019.09.0/README.md 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/README.md 2021-05-23 12:45:34.000000000 +0000 @@ -12,7 +12,7 @@ ## Copyright and Terms of Use -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. FCM is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by diff -Nru fcm-2019.09.0/sbin/fcm-add-svn-repos fcm-2021.05.01/sbin/fcm-add-svn-repos --- fcm-2019.09.0/sbin/fcm-add-svn-repos 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-add-svn-repos 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -100,6 +100,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-add-svn-repos-and-trac-env fcm-2021.05.01/sbin/fcm-add-svn-repos-and-trac-env --- fcm-2019.09.0/sbin/fcm-add-svn-repos-and-trac-env 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-add-svn-repos-and-trac-env 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -114,6 +114,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-add-trac-env fcm-2021.05.01/sbin/fcm-add-trac-env --- fcm-2019.09.0/sbin/fcm-add-trac-env 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-add-trac-env 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -112,6 +112,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-backup-svn-repos fcm-2021.05.01/sbin/fcm-backup-svn-repos --- fcm-2019.09.0/sbin/fcm-backup-svn-repos 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-backup-svn-repos 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -132,6 +132,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-backup-trac-env fcm-2021.05.01/sbin/fcm-backup-trac-env --- fcm-2019.09.0/sbin/fcm-backup-trac-env 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-backup-trac-env 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -113,6 +113,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-commit-update fcm-2021.05.01/sbin/fcm-commit-update --- fcm-2019.09.0/sbin/fcm-commit-update 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-commit-update 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -165,6 +165,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-daily-update fcm-2021.05.01/sbin/fcm-daily-update --- fcm-2019.09.0/sbin/fcm-daily-update 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-daily-update 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -185,6 +185,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-install-svn-hook fcm-2021.05.01/sbin/fcm-install-svn-hook --- fcm-2019.09.0/sbin/fcm-install-svn-hook 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-install-svn-hook 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -110,6 +110,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-manage-trac-env-session fcm-2021.05.01/sbin/fcm-manage-trac-env-session --- fcm-2019.09.0/sbin/fcm-manage-trac-env-session 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-manage-trac-env-session 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -91,6 +91,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-manage-users fcm-2021.05.01/sbin/fcm-manage-users --- fcm-2019.09.0/sbin/fcm-manage-users 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-manage-users 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -114,6 +114,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-recover-svn-repos fcm-2021.05.01/sbin/fcm-recover-svn-repos --- fcm-2019.09.0/sbin/fcm-recover-svn-repos 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-recover-svn-repos 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -131,6 +131,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-recover-trac-env fcm-2021.05.01/sbin/fcm-recover-trac-env --- fcm-2019.09.0/sbin/fcm-recover-trac-env 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-recover-trac-env 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -107,6 +107,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-rpmbuild fcm-2021.05.01/sbin/fcm-rpmbuild --- fcm-2019.09.0/sbin/fcm-rpmbuild 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-rpmbuild 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/sbin/fcm-user-to-email fcm-2021.05.01/sbin/fcm-user-to-email --- fcm-2019.09.0/sbin/fcm-user-to-email 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-user-to-email 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -61,6 +61,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/fcm-vacuum-trac-env-db fcm-2021.05.01/sbin/fcm-vacuum-trac-env-db --- fcm-2019.09.0/sbin/fcm-vacuum-trac-env-db 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/fcm-vacuum-trac-env-db 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -96,6 +96,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/my-regular-update.example fcm-2021.05.01/sbin/my-regular-update.example --- fcm-2019.09.0/sbin/my-regular-update.example 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/my-regular-update.example 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/sbin/post-commit-bg fcm-2021.05.01/sbin/post-commit-bg --- fcm-2019.09.0/sbin/post-commit-bg 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/post-commit-bg 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -35,7 +35,8 @@ # The script does the following: # 1. Creates an incremental revision dump of the current revision. # 2. Update corresponding Trac environment, if relevant. -# 3. Checks the size of the revision dump. Warns if it exceeds a threshold. +# 3. Size check. Warn if transaction exceeds 2MB, or the number of +# MB specified in "$REPOS/hooks/post-commit-size-threshold.conf". # 4. If this changeset has a change to "^/svnperms.conf", install its HEAD # revision at "$REPOS/hooks/", or remove it from "$REPOS/hooks/" if it is # removed from the HEAD. @@ -103,8 +104,8 @@ # Check size - send warning email if threshold exceeded local MB=1048576 - local THRESHOLD=10 - local SIZE_THRESHOLD_FILE="${REPOS}/hooks/pre-commit-size-threshold.conf" + local THRESHOLD=2 + local SIZE_THRESHOLD_FILE="${REPOS}/hooks/post-commit-size-threshold.conf" if [[ -f "${SIZE_THRESHOLD_FILE}" && -r "${SIZE_THRESHOLD_FILE}" ]]; then THRESHOLD=$(<"${SIZE_THRESHOLD_FILE}") fi @@ -113,11 +114,8 @@ if ((${REV_FILE_SIZE} > ${THRESHOLD} * ${MB})); then echo "REV_FILE_SIZE=${REV_FILE_SIZE} # >${THRESHOLD}MB" RET_CODE=1 - elif ((${REV_FILE_SIZE} > ${MB})); then - echo "REV_FILE_SIZE=${REV_FILE_SIZE} # >1MB <${THRESHOLD}MB" - RET_CODE=1 else - echo "REV_FILE_SIZE=${REV_FILE_SIZE} # <1MB" + echo "REV_FILE_SIZE=${REV_FILE_SIZE} # <${THRESHOLD}MB" fi # Install commit.conf and svnperms.conf, if necessary diff -Nru fcm-2019.09.0/sbin/post-commit-bg-notify-who fcm-2021.05.01/sbin/post-commit-bg-notify-who --- fcm-2019.09.0/sbin/post-commit-bg-notify-who 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/post-commit-bg-notify-who 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -148,6 +148,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/post-revprop-change-bg fcm-2021.05.01/sbin/post-revprop-change-bg --- fcm-2019.09.0/sbin/post-revprop-change-bg 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/post-revprop-change-bg 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/sbin/pre-commit fcm-2021.05.01/sbin/pre-commit --- fcm-2019.09.0/sbin/pre-commit 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/pre-commit 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/sbin/pre-commit-verify-branch-owner fcm-2021.05.01/sbin/pre-commit-verify-branch-owner --- fcm-2019.09.0/sbin/pre-commit-verify-branch-owner 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/pre-commit-verify-branch-owner 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/perl # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -95,6 +95,6 @@ =head1 COPYRIGHT -Copyright (C) 2006-2019 British Crown (Met Office) & Contributors.. +Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. =cut diff -Nru fcm-2019.09.0/sbin/pre-revprop-change fcm-2021.05.01/sbin/pre-revprop-change --- fcm-2019.09.0/sbin/pre-revprop-change 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/pre-revprop-change 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/sbin/svnperms.py fcm-2021.05.01/sbin/svnperms.py --- fcm-2019.09.0/sbin/svnperms.py 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/svnperms.py 2021-05-23 12:45:34.000000000 +0000 @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: utf-8 -*- # # diff -Nru fcm-2019.09.0/sbin/trac_hook fcm-2021.05.01/sbin/trac_hook --- fcm-2019.09.0/sbin/trac_hook 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/sbin/trac_hook 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -46,7 +46,7 @@ then local TRAC_NAME=$(basename "$REPOS") if [[ -n ${FCM_SVN_HOOK_REPOS_SUFFIX:-} ]]; then - TRAC_NAME=${NAME%$FCM_SVN_HOOK_REPOS_SUFFIX} + TRAC_NAME=${TRAC_NAME%$FCM_SVN_HOOK_REPOS_SUFFIX} fi local TRAC_DIR="$FCM_SVN_HOOK_TRAC_ROOT_DIR/$TRAC_NAME" if [[ -d "$TRAC_DIR" ]]; then diff -Nru fcm-2019.09.0/t/fcm-add/00-simple.t fcm-2021.05.01/t/fcm-add/00-simple.t --- fcm-2019.09.0/t/fcm-add/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-add/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-add/test_header fcm-2021.05.01/t/fcm-add/test_header --- fcm-2019.09.0/t/fcm-add/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-add/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/fcm-add-trac-env/00-basic.t fcm-2021.05.01/t/fcm-add-trac-env/00-basic.t --- fcm-2019.09.0/t/fcm-add-trac-env/00-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-add-trac-env/00-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,7 +24,7 @@ if ! which trac-admin 1>/dev/null 2>/dev/null; then skip_all 'trac-admin not available' fi -tests 28 +tests 31 #------------------------------------------------------------------------------- set -e mkdir -p etc srv/{svn,trac} @@ -61,14 +61,15 @@ file_grep "$TEST_KEY-d-perms-admin" "admin,TRAC_ADMIN" "$TEST_KEY-d-perms" # Subversion repository paths in place if [[ -d "srv/svn/$NAME" ]]; then - file_grep "$TEST_KEY-repository_dir" \ - "dir=$PWD/srv/svn/$NAME" \ - "$PWD/srv/trac/$NAME/conf/trac.ini" + run_pass "${TEST_KEY}-repos-list" \ + trac-admin "${PWD}/srv/trac/${NAME}" repository list + file_grep "${TEST_KEY}-repos-list.out" \ + "(default) *${PWD}/srv/svn/${NAME}" "${TEST_KEY}-repos-list.out" fi done TEST_KEY="$TEST_KEY_BASE-intertrac" -file_cmp "$TEST_KEY" "$PWD/srv/trac/intertrac.ini" <<'__CONF__' +file_cmp "$TEST_KEY" "srv/trac/intertrac.ini" <<'__CONF__' [intertrac] bus.title=bus bus.url=https://localhost/trac/bus diff -Nru fcm-2019.09.0/t/fcm-add-trac-env/test_header fcm-2021.05.01/t/fcm-add-trac-env/test_header --- fcm-2019.09.0/t/fcm-add-trac-env/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-add-trac-env/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-backup-svn-repos/00-basic.t fcm-2021.05.01/t/fcm-backup-svn-repos/00-basic.t --- fcm-2019.09.0/t/fcm-backup-svn-repos/00-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-backup-svn-repos/00-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-backup-svn-repos/test_header fcm-2021.05.01/t/fcm-backup-svn-repos/test_header --- fcm-2019.09.0/t/fcm-backup-svn-repos/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-backup-svn-repos/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-branch-create/00-simple.t fcm-2021.05.01/t/fcm-branch-create/00-simple.t --- fcm-2019.09.0/t/fcm-branch-create/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-create/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-branch-create/test_header fcm-2021.05.01/t/fcm-branch-create/test_header --- fcm-2019.09.0/t/fcm-branch-create/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-create/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/fcm-branch-delete/00-simple.t fcm-2021.05.01/t/fcm-branch-delete/00-simple.t --- fcm-2019.09.0/t/fcm-branch-delete/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-delete/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-branch-delete/01-bad-arg.t fcm-2021.05.01/t/fcm-branch-delete/01-bad-arg.t --- fcm-2019.09.0/t/fcm-branch-delete/01-bad-arg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-delete/01-bad-arg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-branch-delete/02-rosie.t fcm-2021.05.01/t/fcm-branch-delete/02-rosie.t --- fcm-2019.09.0/t/fcm-branch-delete/02-rosie.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-delete/02-rosie.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-branch-delete/test_header fcm-2021.05.01/t/fcm-branch-delete/test_header --- fcm-2019.09.0/t/fcm-branch-delete/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-delete/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/fcm-branch-diff/00-simple.t fcm-2021.05.01/t/fcm-branch-diff/00-simple.t --- fcm-2019.09.0/t/fcm-branch-diff/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-branch-diff/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -56,14 +56,14 @@ TEST_KEY=$TEST_KEY_BASE-fcm-branch-diff run_pass "$TEST_KEY" fcm branch-diff diff_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out" -diff_svn_version_filter >"$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: added_directory/hello_constants.f90 =================================================================== #IF SVN1.8 --- added_directory/hello_constants.f90 ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.f90 (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.f90 (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.f90 (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,5 @@ +MODULE Hello_Constants + @@ -74,8 +74,8 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,2 @@ +CHARACTER ( +LEN=80), PARAMETER :: hello_strINg = 'Hello Earth!!' @@ -83,24 +83,24 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants_dummy.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: added_file =================================================================== #IF SVN1.8 --- added_file ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_file (revision 6) -#IF SVN1.9 --- added_file (.../trunk) (working copy) -#IF SVN1.9 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_file (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: lib/python/info/poems.py =================================================================== #IF SVN1.8 --- lib/python/info/poems.py ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ lib/python/info/poems.py (working copy) -#IF SVN1.9 --- lib/python/info/poems.py (.../trunk) (revision 1) -#IF SVN1.9 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- lib/python/info/poems.py (.../trunk) (revision 1) +#IF SVN1.9/10 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) @@ -1,24 +1,23 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- @@ -139,8 +139,8 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.f90 ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.f90 (working copy) -#IF SVN1.9 --- module/hello_constants.f90 (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.f90 (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) @@ -1,5 +0,0 @@ -MODULE Hello_Constants - @@ -151,35 +151,33 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.inc (working copy) -#IF SVN1.9 --- module/hello_constants.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -CHARACTER (LEN=80), PARAMETER :: hello_string = 'Hello Earth!' Index: module/hello_constants_dummy.inc =================================================================== #IF SVN1.8 --- module/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants_dummy.inc (working copy) -#IF SVN1.9 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -INCLUDE 'hello_constants.inc' __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: added_directory/hello_constants.f90 =================================================================== #IF SVN1.8 --- added_directory/hello_constants.f90 ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.f90 (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.f90 (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.f90 (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,5 @@ +MODULE Hello_Constants + @@ -190,8 +188,8 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,2 @@ +CHARACTER ( +LEN=80), PARAMETER :: hello_strINg = 'Hello Earth!!' @@ -199,24 +197,24 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants_dummy.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: added_file =================================================================== #IF SVN1.8 --- added_file ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_file (revision 6) -#IF SVN1.9 --- added_file (.../trunk) (working copy) -#IF SVN1.9 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_file (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: lib/python/info/poems.py =================================================================== #IF SVN1.8 --- lib/python/info/poems.py ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ lib/python/info/poems.py (working copy) -#IF SVN1.9 --- lib/python/info/poems.py (.../trunk) (revision 1) -#IF SVN1.9 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- lib/python/info/poems.py (.../trunk) (revision 1) +#IF SVN1.9/10 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) @@ -1,24 +1,23 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- @@ -255,8 +253,8 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.f90 ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.f90 (working copy) -#IF SVN1.9 --- module/hello_constants.f90 (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.f90 (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) @@ -1,5 +0,0 @@ -MODULE Hello_Constants - @@ -267,21 +265,19 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.inc (working copy) -#IF SVN1.9 --- module/hello_constants.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -CHARACTER (LEN=80), PARAMETER :: hello_string = 'Hello Earth!' Index: module/hello_constants_dummy.inc =================================================================== #IF SVN1.8 --- module/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants_dummy.inc (working copy) -#IF SVN1.9 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -INCLUDE 'hello_constants.inc' __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" added_directory/bar$TEST_KEY run_pass "$TEST_KEY" fcm bdi diff_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out" -diff_svn_version_filter >"$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: added_directory/foo00-simple-bdi-wc-changes =================================================================== #IF SVN1.8 --- added_directory/foo00-simple-bdi-wc-changes ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/foo00-simple-bdi-wc-changes (working copy) -#IF SVN1.9 --- added_directory/foo00-simple-bdi-wc-changes (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/foo00-simple-bdi-wc-changes (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- added_directory/foo00-simple-bdi-wc-changes (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/foo00-simple-bdi-wc-changes (.../branches/dev/Share/branch_test) (working copy) @@ -0,0 +1 @@ +foo Index: added_directory/hello_constants.f90 =================================================================== #IF SVN1.8 --- added_directory/hello_constants.f90 ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.f90 (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.f90 (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.f90 (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.f90 (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,5 @@ +MODULE Hello_Constants + @@ -344,8 +340,8 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1,2 @@ +CHARACTER ( +LEN=80), PARAMETER :: hello_strINg = 'Hello Earth!!' @@ -353,24 +349,24 @@ =================================================================== #IF SVN1.8 --- added_directory/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_directory/hello_constants_dummy.inc (revision 6) -#IF SVN1.9 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) -#IF SVN1.9 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_directory/hello_constants_dummy.inc (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_directory/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: added_file =================================================================== #IF SVN1.8 --- added_file ($ROOT_URL/trunk) (revision 0) #IF SVN1.8 +++ added_file (revision 6) -#IF SVN1.9 --- added_file (.../trunk) (working copy) -#IF SVN1.9 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) +#IF SVN1.9/10 --- added_file (.../trunk) (working copy) +#IF SVN1.9/10 +++ added_file (.../branches/dev/Share/branch_test) (revision 6) @@ -0,0 +1 @@ +INCLUDE 'hello_constants.INc' Index: lib/python/info/poems.py =================================================================== #IF SVN1.8 --- lib/python/info/poems.py ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ lib/python/info/poems.py (working copy) -#IF SVN1.9 --- lib/python/info/poems.py (.../trunk) (revision 1) -#IF SVN1.9 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- lib/python/info/poems.py (.../trunk) (revision 1) +#IF SVN1.9/10 +++ lib/python/info/poems.py (.../branches/dev/Share/branch_test) (working copy) @@ -1,24 +1,23 @@ -#!/usr/bin/env python -# -*- coding: utf-8 -*- @@ -409,8 +405,8 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.f90 ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.f90 (working copy) -#IF SVN1.9 --- module/hello_constants.f90 (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.f90 (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.f90 (.../branches/dev/Share/branch_test) (working copy) @@ -1,5 +0,0 @@ -MODULE Hello_Constants - @@ -421,21 +417,19 @@ =================================================================== #IF SVN1.8 --- module/hello_constants.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants.inc (working copy) -#IF SVN1.9 --- module/hello_constants.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -CHARACTER (LEN=80), PARAMETER :: hello_string = 'Hello Earth!' Index: module/hello_constants_dummy.inc =================================================================== #IF SVN1.8 --- module/hello_constants_dummy.inc ($ROOT_URL/trunk) (revision 1) #IF SVN1.8 +++ module/hello_constants_dummy.inc (working copy) -#IF SVN1.9 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) -#IF SVN1.9 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) +#IF SVN1.9/10 --- module/hello_constants_dummy.inc (.../trunk) (revision 1) +#IF SVN1.9/10 +++ module/hello_constants_dummy.inc (.../branches/dev/Share/branch_test) (working copy) @@ -1 +0,0 @@ -INCLUDE 'hello_constants.inc' __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" $TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" $TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" $TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" $TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-cfg-print/00-env.t fcm-2021.05.01/t/fcm-cfg-print/00-env.t --- fcm-2019.09.0/t/fcm-cfg-print/00-env.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-cfg-print/00-env.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-cfg-print/test_header fcm-2021.05.01/t/fcm-cfg-print/test_header --- fcm-2019.09.0/t/fcm-cfg-print/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-cfg-print/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-commit/00-simple.t fcm-2021.05.01/t/fcm-commit/00-simple.t --- fcm-2019.09.0/t/fcm-commit/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -52,7 +52,7 @@ y __IN__ commit_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out" -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ [info] sed -i 1i\foo: starting commit message editor... Change summary: -------------------------------------------------------------------------------- @@ -63,9 +63,9 @@ A + added_directory A + added_file D module -D module/hello_constants.f90 -D module/hello_constants.inc -D module/hello_constants_dummy.inc +#IF SVN1.8/9 D module/hello_constants.f90 +#IF SVN1.8/9 D module/hello_constants.inc +#IF SVN1.8/9 D module/hello_constants_dummy.inc M lib/python/info/poems.py M + added_directory/hello_constants.f90 M + added_directory/hello_constants.inc diff -Nru fcm-2019.09.0/t/fcm-commit/01-subtree.t fcm-2021.05.01/t/fcm-commit/01-subtree.t --- fcm-2019.09.0/t/fcm-commit/01-subtree.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/01-subtree.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -53,7 +53,7 @@ y __IN__ commit_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out" -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ $TEST_DIR/wc: working directory changed to top of working copy. [info] sed -i 1i\foo: starting commit message editor... Change summary: @@ -65,9 +65,9 @@ A + added_directory A + added_file D module -D module/hello_constants.f90 -D module/hello_constants.inc -D module/hello_constants_dummy.inc +#IF SVN1.8/9 D module/hello_constants.f90 +#IF SVN1.8/9 D module/hello_constants.inc +#IF SVN1.8/9 D module/hello_constants_dummy.inc M lib/python/info/poems.py M + added_directory/hello_constants.f90 M + added_directory/hello_constants.inc diff -Nru fcm-2019.09.0/t/fcm-commit/02-bad.t fcm-2021.05.01/t/fcm-commit/02-bad.t --- fcm-2019.09.0/t/fcm-commit/02-bad.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/02-bad.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-commit/03-message-file.t fcm-2021.05.01/t/fcm-commit/03-message-file.t --- fcm-2019.09.0/t/fcm-commit/03-message-file.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/03-message-file.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-commit/04-externals.t fcm-2021.05.01/t/fcm-commit/04-externals.t --- fcm-2019.09.0/t/fcm-commit/04-externals.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/04-externals.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-commit/test_header fcm-2021.05.01/t/fcm-commit/test_header --- fcm-2019.09.0/t/fcm-commit/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-commit/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -71,7 +38,8 @@ function init_repos() { if [[ -n ${TEST_REMOTE_HOST:-} ]]; then TEST_REMOTE_DIR=$(ssh $TEST_REMOTE_HOST "mktemp -d") - ssh $TEST_REMOTE_HOST "svnadmin create --fs-type fsfs $TEST_REMOTE_DIR" + ssh $TEST_REMOTE_HOST bash -l -c "svnadmin create --fs-type fsfs\ + $TEST_REMOTE_DIR" REPOS_URL="svn+ssh://${TEST_REMOTE_HOST}$TEST_REMOTE_DIR" else svnadmin create --fs-type fsfs $TEST_DIR/test_repos @@ -98,9 +66,8 @@ svnadmin create --fs-type fsfs $TEST_DIR/test_repos REPOS_URL="file://$TEST_DIR/test_repos" fi - svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ - $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import" + $REPOS_URL/a/a/0/0/0/trunk/ -m "initial trunk import" TMPFILE=$(mktemp) cat >$TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'new_file' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'new_file' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'new_file' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'new_file' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'new_file' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'new_file' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") A pro/hello.pro -Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Reverted 'pro/hello.pro.renamed' -Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") D pro/hello.pro.renamed -Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" moved /d" $TEST_DIR/"$TEST_KEY.out" file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ M . A + pro/hello.pro + > moved from pro/hello.pro.renamed D pro/hello.pro.renamed + > moved to pro/hello.pro __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null run_pass "$TEST_KEY" fcm conflicts <<__IN__ y __IN__ -file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ [info] pro/hello.pro: in tree conflict. Locally: renamed to pro/hello.pro.renamed-local. Externally: renamed to pro/hello.pro.renamed-merge. @@ -121,11 +122,12 @@ 3:3c Merge contents (1) Reverted 'pro/hello.pro.renamed-merge' -Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null run_pass "$TEST_KEY" fcm conflicts <<__IN__ n -n __IN__ -sed -i -n "1,8p" $TEST_DIR/"$TEST_KEY.out" -file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ [info] pro/hello.pro: in tree conflict. Locally: renamed to pro/hello.pro.renamed. Externally: deleted. @@ -64,12 +62,13 @@ Answer (n) to accept the external delete. Keep the local version? Enter "y" or "n" (or just press for "n") D pro/hello.pro.renamed -Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null -run_pass "$TEST_KEY" fcm conflicts <<__IN__ -n -y -__IN__ -sed -i -n "1,8p" $TEST_DIR/"$TEST_KEY.out" -file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ -[info] pro/hello.pro: in tree conflict. -Locally: renamed to pro/hello.pro.renamed. -Externally: deleted. -Answer (y) to accept the local rename. -Answer (n) to accept the external delete. -Keep the local version? -Enter "y" or "n" (or just press for "n") D pro/hello.pro.renamed -Resolved conflicted state of 'pro/hello.pro' -__OUT__ -file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null run_pass "$TEST_KEY" fcm conflicts <<__IN__ y n __IN__ -file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ [info] pro/hello.pro: in tree conflict. Locally: renamed to pro/hello.pro.renamed. Externally: deleted. Answer (y) to accept the local rename. Answer (n) to accept the external delete. Keep the local version? -Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. [info] pro/hello.pro.renamed: in tree conflict. Locally: added. Externally: added. Answer (y) to keep the local file filename. Answer (n) to keep the external file filename. Keep the local version? -Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro.renamed' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro.renamed' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro.renamed' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null run_pass "$TEST_KEY" fcm conflicts <<__IN__ y y __IN__ -file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ +file_cmp_filtered "$TEST_KEY.out" "$TEST_KEY.out" <<__OUT__ [info] pro/hello.pro: in tree conflict. Locally: renamed to pro/hello.pro.renamed. Externally: deleted. Answer (y) to accept the local rename. Answer (n) to accept the external delete. Keep the local version? -Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. [info] pro/hello.pro.renamed: in tree conflict. Locally: added. Externally: added. Answer (y) to keep the local file filename. Answer (n) to keep the external file filename. Keep the local version? -Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro.renamed' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro.renamed' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro.renamed' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'lib/python/info/poems.py' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'lib/python/info/poems.py' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Merge conflicts in 'lib/python/info/poems.py' marked as resolved. __OUT__ file_cmp "$TEST_KEY.err" "$TEST_KEY.err" for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.8/9 Enter "y" or "n" (or just press for "n") Resolved conflicted state of 'pro/hello.pro' +#IF SVN1.10 Enter "y" or "n" (or just press for "n") Tree conflict at 'pro/hello.pro' marked as resolved. __OUT__ file_cmp "${TEST_KEY}.err" "${TEST_KEY}.err" <'/dev/null' #------------------------------------------------------------------------------- diff -Nru fcm-2019.09.0/t/fcm-conflicts/test_header fcm-2021.05.01/t/fcm-conflicts/test_header --- fcm-2019.09.0/t/fcm-conflicts/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-conflicts/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -71,7 +38,8 @@ function init_repos() { if [[ -n ${TEST_REMOTE_HOST:-} ]]; then TEST_REMOTE_DIR=$(ssh $TEST_REMOTE_HOST "mktemp -d") - ssh $TEST_REMOTE_HOST "svnadmin create --fs-type fsfs $TEST_REMOTE_DIR" + ssh $TEST_REMOTE_HOST bash -l -c "svnadmin create --fs-type fsfs\ + $TEST_REMOTE_DIR" REPOS_URL="svn+ssh://${TEST_REMOTE_HOST}$TEST_REMOTE_DIR" else svnadmin create --fs-type fsfs $TEST_DIR/test_repos @@ -98,9 +66,8 @@ svnadmin create --fs-type fsfs $TEST_DIR/test_repos REPOS_URL="file://$TEST_DIR/test_repos" fi - svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ - $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import" + $REPOS_URL/a/a/0/0/0/trunk/ -m "initial trunk import" TMPFILE=$(mktemp) cat >$TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" $TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" /dev/null 2>/dev/null; then skip_all 'svnadmin not available' diff -Nru fcm-2019.09.0/t/fcm-install-svn-hook/01-housekeep-log.t fcm-2021.05.01/t/fcm-install-svn-hook/01-housekeep-log.t --- fcm-2019.09.0/t/fcm-install-svn-hook/01-housekeep-log.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-install-svn-hook/01-housekeep-log.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -20,7 +20,6 @@ # Tests housekeep hook logs functionalities provided by "fcm-install-svn-hook". #------------------------------------------------------------------------------- . $(dirname $0)/test_header -. $TEST_SOURCE_DIR/test_header_more #------------------------------------------------------------------------------- if ! which svnadmin 1>/dev/null 2>/dev/null; then skip_all 'svnadmin not available' diff -Nru fcm-2019.09.0/t/fcm-install-svn-hook/02-env.t fcm-2021.05.01/t/fcm-install-svn-hook/02-env.t --- fcm-2019.09.0/t/fcm-install-svn-hook/02-env.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-install-svn-hook/02-env.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -20,7 +20,6 @@ # Test "fcm-install-svn-hook", "hooks-env" installation. #------------------------------------------------------------------------------- . $(dirname $0)/test_header -. $TEST_SOURCE_DIR/test_header_more #------------------------------------------------------------------------------- if ! which svnadmin 1>/dev/null 2>/dev/null; then skip_all 'svnadmin not available' diff -Nru fcm-2019.09.0/t/fcm-install-svn-hook/test_header fcm-2021.05.01/t/fcm-install-svn-hook/test_header --- fcm-2019.09.0/t/fcm-install-svn-hook/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-install-svn-hook/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash -# ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +#------------------------------------------------------------------------------- +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -16,146 +16,9 @@ # # You should have received a copy of the GNU General Public License # along with FCM. If not, see . -# ------------------------------------------------------------------------------ -# NAME -# test_header -# -# SYNOPSIS -# . $FCM_HOME/t/lib/bash/test_header -# -# DESCRIPTION -# Provide bash shell functions for writing tests for "fcm" commands to -# output in Perl's TAP format. Add "set -eu". Create a temporary working -# directory $TEST_DIR and change to it. Automatically increment test number. -# If $FCM_HOME is not specified, set it to point to the "fcm" source tree -# containing this script. Add $FCM_HOME/bin to the front of $PATH. -# -# FUNCTIONS -# tests N -# echo "1..$N". -# skip N REASON -# echo "ok $((++T)) # skip REASON" N times, where T is the test number. -# skip_all REASON -# echo "1..0 # SKIP $REASON" and exit. -# pass TEST_KEY -# echo "ok $T - $TEST_KEY" where T is the current test number. -# fail TEST_KEY -# echo "not ok $T - $TEST_KEY" where T is the current test number. -# run_pass TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns true/false. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# run_fail TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns false/true. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# file_cmp TEST_KEY FILE_ACTUAL [$FILE_EXPECT] -# Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail -# $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" -# or not defined, compare $FILE_ACTUAL with STDIN to this function. -# file_test TEST_KEY FILE [OPTION] -# pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is -# -e if not specified. -# file_grep TEST_KEY PATTERN FILE -# Run "grep -q PATTERN FILE". pass/fail $TEST_KEY accordingly. -# branch_tidy INPUT_FILE -# Standardise branch-create output between Subversion 1.8 and 1.9. -# commit_sort INPUT_FILE OUTPUT_FILE -# Sort status and transmitting info within the commit output. -# diff_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. -# status_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion status lines. -# merge_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion merge status lines. -# check_svn_version -# Check Subversion version and skip tests if not compatible. -# FINALLY -# This is run on EXIT or INT to remove the temporary working directory -# for the test. Call FINALLY_MORE if it is declared. -# -# VARIABLES -# FCM_HOME -# Root of FCM's installation. (Exported.) -# SIGNALS -# List of signals trapped by FINALLY, currently EXIT and INT. -# TEST_DIR -# Temporary directory that is also the working directory for this test. -# TEST_KEY_BASE -# Base root name of current test file. -# TEST_NUMBER -# Test number of latest test. -# TEST_SOURCE_DIR -# Directory containing the current test file. #------------------------------------------------------------------------------- -set -eu - -SIGNALS="EXIT INT" -TEST_DIR= -function FINALLY() { - for S in $SIGNALS; do - trap '' $S - done - if [[ -n $TEST_DIR ]]; then - cd ~ - rm -rf $TEST_DIR - fi - if declare -F FINALLY_MORE >/dev/null; then - FINALLY_MORE - fi - -} -for S in $SIGNALS; do - trap "FINALLY $S" $S -done - -TEST_NUMBER=0 - -function tests() { - echo "1..$1" -} - -function skip() { - local N_SKIPS=$1 - shift 1 - local I=0 - while ((I++ < N_SKIPS)); do - echo "ok $((++TEST_NUMBER)) # skip $@" - done -} - -function skip_all() { - echo "1..0 # SKIP $@" - exit -} - -function pass() { - echo "ok $((++TEST_NUMBER)) - $@" -} - -function fail() { - echo "not ok $((++TEST_NUMBER)) - $@" -} - -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} +. $(dirname $0)/../lib/bash/test_header function file_cmp() { local TEST_KEY=$1 @@ -168,160 +31,8 @@ fail $TEST_KEY } -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function branch_tidy() { - local INPUT_FILE=$TEST_DIR/$1 - sed -i "/^Committing transaction/d; /^$/d" "$INPUT_FILE" -} - -function commit_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - local TMP_OUTPUT_FILE=$(mktemp) - # Sort the svn status part of the message - status_sort $INPUT_FILE $TMP_OUTPUT_FILE - # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys -text = sys.stdin.read() -sending_lines = re.findall("^\w+ing +.*$", text, re.M) -prefix = text[:text.index(sending_lines[0])] -suffix = text[(text.index(sending_lines[-1]) + len(sending_lines[-1])):] -sending_lines.sort() -print prefix + "\n".join(sending_lines) + suffix.rstrip() -' <"$TMP_OUTPUT_FILE" >"$OUTPUT_FILE" - rm "$TMP_OUTPUT_FILE" - # Remove 1.8 to 1.9 specific changes (transmitting, transaction lines). - sed -i "/^Transmitting file data/d; /^Committing transaction/d; /^$/d" \ - "$OUTPUT_FILE" -} - -function diff_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - # Sort the diff file order. - python -c 'import re, sys -text = sys.stdin.read() -print "\nIndex: ".join( - [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) -' <"$INPUT_FILE" >"$OUTPUT_FILE" - # In 1.9, new files are (nonexistent) rather than (working copy). - sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" -} - -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - -function status_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = re.findall("^.{7} [\w./].*$", text, re.M) -prefix = text[:text.index(status_lines[0])] -suffix = text[(text.index(status_lines[-1]) + len(status_lines[-1])):] -status_lines.sort() -print prefix + "\n".join(status_lines) + suffix.rstrip() -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function merge_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = [] -for line in text.splitlines(): - if line.startswith("Enter \"y\"") and ": " in line: - head, tail = line.split(": ", 1) - if status_lines: - print "\n".join(sorted(status_lines)) - status_lines = [] - print head + ": " - if tail: - line = tail - if re.search("^.{4} [\w./].*$", line): - status_lines.append(line) - elif status_lines: - print "\n".join(sorted(status_lines)) - print line - status_lines = [] - else: - print line -if status_lines: - print "\n".join(sorted(status_lines)) -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" - exit 0 - fi +# Convert a string like "2014-05-01T09:30:45Z" to "YYYY-mm-ddTHH:MM:SSZ". +# This allows output files to compare. +date2datefmt() { + perl -p -e 's/\d+-\d\d-\d\dT\d\d:\d\d:\d\dZ/YYYY-mm-ddTHH:MM:SSZ/' "$@" } - -function fcm_make_build_hello_tests() { - local TEST_KEY=$1 - local HELLO_EXT=${2:-} - shift 2 - rm -fr \ - .fcm-make \ - build \ - fcm-make-as-parsed.cfg \ - fcm-make-on-success.cfg \ - fcm-make.log - run_pass "$TEST_KEY" fcm make "$@" - file_test "$TEST_KEY.hello$HELLO_EXT" "$PWD/build/bin/hello$HELLO_EXT" - "$PWD/build/bin/hello$HELLO_EXT" >"$TEST_KEY.hello$HELLO_EXT.out" - file_cmp "$TEST_KEY.hello$HELLO_EXT.out" \ - "$TEST_KEY.hello$HELLO_EXT.out" <<'__OUT__' -Hello World! -__OUT__ -} - -FCM_HOME=${FCM_HOME:-$(cd $(dirname $(readlink -f $BASH_SOURCE))/../../.. && pwd)} -export FCM_HOME -PATH=$FCM_HOME/bin:$PATH - -SVN_VERSION_IS_19=false -if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi -fi - -TEST_KEY_BASE=$(basename $0 .t) -TEST_SOURCE_DIR=$(cd $(dirname $0) && pwd) -TEST_DIR=$(mktemp -d) -export LC_ALL=C -export LANG=C -cd $TEST_DIR - -set +e diff -Nru fcm-2019.09.0/t/fcm-install-svn-hook/test_header_more fcm-2021.05.01/t/fcm-install-svn-hook/test_header_more --- fcm-2019.09.0/t/fcm-install-svn-hook/test_header_more 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-install-svn-hook/test_header_more 1970-01-01 00:00:00.000000000 +0000 @@ -1,25 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. -# -# This file is part of FCM, tools for managing and building source code. -# -# FCM 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. -# -# FCM 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 FCM. If not, see . -#------------------------------------------------------------------------------- - -# Convert a string like "2014-05-01T09:30:45Z" to "YYYY-mm-ddTHH:MM:SSZ". -# This allows output files to compare. -date2datefmt() { - perl -p -e 's/\d+-\d\d-\d\dT\d\d:\d\d:\d\dZ/YYYY-mm-ddTHH:MM:SSZ/' "$@" -} diff -Nru fcm-2019.09.0/t/fcm-keyword-print/00-simple.t fcm-2021.05.01/t/fcm-keyword-print/00-simple.t --- fcm-2019.09.0/t/fcm-keyword-print/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-keyword-print/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-keyword-print/test_header fcm-2021.05.01/t/fcm-keyword-print/test_header --- fcm-2019.09.0/t/fcm-keyword-print/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-keyword-print/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-loc-layout/00-simple.t fcm-2021.05.01/t/fcm-loc-layout/00-simple.t --- fcm-2019.09.0/t/fcm-loc-layout/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-loc-layout/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-loc-layout/test_header fcm-2021.05.01/t/fcm-loc-layout/test_header --- fcm-2019.09.0/t/fcm-loc-layout/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-loc-layout/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -21,72 +21,7 @@ # TEST_REMOTE_HOST (tests using svn+ssh repositories located on given host) # ------------------------------------------------------------------------------ -. $(dirname $0)/../lib/bash/test_header - -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - -function file_xxdiff() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if xxdiff -D $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function init_repos() { - if [[ -n ${TEST_REMOTE_HOST:-} ]]; then - TEST_REMOTE_DIR=$(ssh $TEST_REMOTE_HOST "mktemp -d") - ssh $TEST_REMOTE_HOST "svnadmin create --fs-type fsfs $TEST_REMOTE_DIR" - REPOS_URL="svn+ssh://${TEST_REMOTE_HOST}$TEST_REMOTE_DIR" - else - svnadmin create --fs-type fsfs $TEST_DIR/test_repos - REPOS_URL="file://$TEST_DIR/test_repos" - fi - ROOT_URL=$REPOS_URL - PROJECT= - if [[ -n ${TEST_PROJECT:-} ]]; then - ROOT_URL=$REPOS_URL/$TEST_PROJECT - PROJECT=$TEST_PROJECT"/" - fi - svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ - $REPOS_URL/$PROJECT/trunk -m "initial trunk import" - svn mkdir -q $REPOS_URL/$PROJECT/tags -m "make tags" - svn mkdir -q --parents $REPOS_URL/$PROJECT/branches/dev/Share -m " " -} +. $(dirname $0)/../lib/bash/svn_test_header function init_repos_layout_roses() { if [[ -n ${TEST_REMOTE_HOST:-} ]]; then @@ -97,7 +32,7 @@ svnadmin create --fs-type fsfs $TEST_DIR/test_repos REPOS_URL="file://$TEST_DIR/test_repos" fi - svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk + svn mkdir -q -m " " --parents $REPOS_URL/a/a/0/0/0/trunk svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import" TMPFILE=$(mktemp) @@ -121,116 +56,3 @@ rm -rf $TMPDIR ROOT_URL=$REPOS_URL } - -function init_branch() { - local BRANCH_NAME=$1 - local REPOS_URL=$2 - local ROOT_URL=$REPOS_URL - local ROOT_PATH= - if [[ -n ${TEST_PROJECT:-} ]]; then - ROOT_URL=$REPOS_URL/$TEST_PROJECT - ROOT_PATH=$ROOT_PATH/$TEST_PROJECT - fi - MESSAGE=$(echo -e "Created $ROOT_PATH/branches/dev/Share/$BRANCH_NAME from /trunk@1.") - svn copy -q -r1 $ROOT_URL/trunk $ROOT_URL/branches/dev/Share/$BRANCH_NAME \ - -m "Made a branch $MESSAGE" -} - -function init_branch_wc() { - local BRANCH_NAME=$1 - local REPOS_URL=$2 - local ROOT_URL=$REPOS_URL - if [[ -n ${TEST_PROJECT:-} ]]; then - ROOT_URL=$REPOS_URL/$TEST_PROJECT - fi - init_branch $BRANCH_NAME $REPOS_URL - svn checkout -q $ROOT_URL/branches/dev/Share/$BRANCH_NAME $TEST_DIR/wc -} - -function init_merge_branches() { - local BRANCH_NAME=$1 - local OTHER_BRANCH_NAME=$2 - local REPOS_URL=$3 - local ROOT_URL=$REPOS_URL - if [[ -n ${TEST_PROJECT:-} ]]; then - ROOT_URL=$REPOS_URL/$TEST_PROJECT - fi - init_branch_wc $BRANCH_NAME $REPOS_URL - cd $TEST_DIR/wc - modify_files="lib/python/info/__init__.py lib/python/info/poems.py \ - module/hello_constants.f90 module/hello_constants.inc \ - module/hello_constants_dummy.inc" - for file in $modify_files; do - sed -i "s/for/FOR/g; s/fi/end if/g; s/in/IN/g;" "$file" - sed -i "/#/d; /^ *!/d" "$file" - sed -i "s/!/!!/g; s/q/\nq/g; s/[(]/(\n/g" "$file" - done - copy_file="module/hello_constants_dummy.inc" - copy_file_dir=$(dirname "$copy_file") - svn copy -q "$copy_file" "./added_file" - svn copy -q "$copy_file_dir" "added_directory" - touch "$copy_file_dir/tree_conflict_file" - append_line_file="subroutine/hello_sub_dummy.h" - svn add -q "$copy_file_dir/tree_conflict_file" - echo "Modified a line" >>$append_line_file - svn commit -q -m "Made changes for future merge of this branch" - svn update -q - init_branch $OTHER_BRANCH_NAME $REPOS_URL - svn switch -q $ROOT_URL/branches/dev/Share/$OTHER_BRANCH_NAME - echo " " > unversioned_file - properties_file="subroutine/hello_sub.h" - svn propset -q svn:executable "executable" $properties_file - other_copy_file="module/hello_constants_dummy.inc" - svn copy -q "$other_copy_file" "renamed_added_file" - svn commit -q -m "Made changes for future merge" - svn update -q - svn switch -q $ROOT_URL/trunk - trunk_change_file="lib/python/info/__init__.py" - echo "trunk change" >>"$trunk_change_file" - svn commit -q -m "Made trunk change" - svn update -q - echo "another trunk change" >>"$trunk_change_file" - svn commit -q -m "Made another trunk change" - svn update -q -} - -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function setup() { - mkdir -p $TEST_DIR/.subversion - mkdir -p $TEST_DIR/run - cd $TEST_DIR/run -} - -function teardown() { - cd $TEST_DIR - rm -rf $TEST_DIR/test_repos - rm -rf $TEST_DIR/wc - rm -rf $TEST_DIR/run - rm -rf $TEST_DIR/.subversion - if [[ -n ${TEST_REMOTE_HOST:-} ]]; then - ssh $TEST_REMOTE_HOST "rm -rf $TEST_REMOTE_DIR" - fi -} - -REPOS_URL= -ROOT_URL= -PROJECT= diff -Nru fcm-2019.09.0/t/fcm-make/00-build-basic/bin/my-ld fcm-2021.05.01/t/fcm-make/00-build-basic/bin/my-ld --- fcm-2019.09.0/t/fcm-make/00-build-basic/bin/my-ld 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/00-build-basic/bin/my-ld 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/00-build-basic.t fcm-2021.05.01/t/fcm-make/00-build-basic.t --- fcm-2019.09.0/t/fcm-make/00-build-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/00-build-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/01-build-link-opts/bin/my-ld fcm-2021.05.01/t/fcm-make/01-build-link-opts/bin/my-ld --- fcm-2019.09.0/t/fcm-make/01-build-link-opts/bin/my-ld 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/01-build-link-opts/bin/my-ld 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/01-build-link-opts.t fcm-2021.05.01/t/fcm-make/01-build-link-opts.t --- fcm-2019.09.0/t/fcm-make/01-build-link-opts.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/01-build-link-opts.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/02-build-ext-iface.t fcm-2021.05.01/t/fcm-make/02-build-ext-iface.t --- fcm-2019.09.0/t/fcm-make/02-build-ext-iface.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/02-build-ext-iface.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/03-build-include-paths.t fcm-2021.05.01/t/fcm-make/03-build-include-paths.t --- fcm-2019.09.0/t/fcm-make/03-build-include-paths.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/03-build-include-paths.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/04-build-libs.t fcm-2021.05.01/t/fcm-make/04-build-libs.t --- fcm-2019.09.0/t/fcm-make/04-build-libs.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/04-build-libs.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/05-build-c-cxx-basic.t fcm-2021.05.01/t/fcm-make/05-build-c-cxx-basic.t --- fcm-2019.09.0/t/fcm-make/05-build-c-cxx-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/05-build-c-cxx-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/06-extract-ssh.t fcm-2021.05.01/t/fcm-make/06-extract-ssh.t --- fcm-2019.09.0/t/fcm-make/06-extract-ssh.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/06-extract-ssh.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -66,9 +66,9 @@ file_cmp "$TEST_KEY.log" "$TEST_KEY.log" <<__LOG__ [info] location hello: 0: $T_HOST:$T_HOST_WORK_DIR/hello [info] AU hello:0 hi/hi_mars.txt -[info] AU hello:0 greet/greet_venus.txt -[info] AU hello:0 hello/hello_mercury.txt [info] AU hello:0 hello/hello_venus.txt +[info] AU hello:0 hello/hello_mercury.txt +[info] AU hello:0 greet/greet_venus.txt [info] AU hello:0 greet/greet_mars.txt [info] AU hello:0 hi/hi_mercury.txt [info] AU hello:0 greet/greet_earth.txt diff -Nru fcm-2019.09.0/t/fcm-make/07-build-ns-dep.t fcm-2021.05.01/t/fcm-make/07-build-ns-dep.t --- fcm-2019.09.0/t/fcm-make/07-build-ns-dep.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/07-build-ns-dep.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/08-build-dup-dep.t fcm-2021.05.01/t/fcm-make/08-build-dup-dep.t --- fcm-2019.09.0/t/fcm-make/08-build-dup-dep.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/08-build-dup-dep.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/09-build-dep-o.t fcm-2021.05.01/t/fcm-make/09-build-dep-o.t --- fcm-2019.09.0/t/fcm-make/09-build-dep-o.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/09-build-dep-o.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/10-log/bin/my-ld fcm-2021.05.01/t/fcm-make/10-log/bin/my-ld --- fcm-2019.09.0/t/fcm-make/10-log/bin/my-ld 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/10-log/bin/my-ld 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/10-log.t fcm-2021.05.01/t/fcm-make/10-log.t --- fcm-2019.09.0/t/fcm-make/10-log.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/10-log.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/11-preprocess-include-path.t fcm-2021.05.01/t/fcm-make/11-preprocess-include-path.t --- fcm-2019.09.0/t/fcm-make/11-preprocess-include-path.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/11-preprocess-include-path.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/12-build-class-prop.t fcm-2021.05.01/t/fcm-make/12-build-class-prop.t --- fcm-2019.09.0/t/fcm-make/12-build-class-prop.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/12-build-class-prop.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/13-build-target-prop/bin/my-fc fcm-2021.05.01/t/fcm-make/13-build-target-prop/bin/my-fc --- fcm-2019.09.0/t/fcm-make/13-build-target-prop/bin/my-fc 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/13-build-target-prop/bin/my-fc 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/usr/bin/env bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/13-build-target-prop.t fcm-2021.05.01/t/fcm-make/13-build-target-prop.t --- fcm-2019.09.0/t/fcm-make/13-build-target-prop.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/13-build-target-prop.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/14-build-etc.t fcm-2021.05.01/t/fcm-make/14-build-etc.t --- fcm-2019.09.0/t/fcm-make/14-build-etc.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/14-build-etc.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/15-extract-loc-reset.t fcm-2021.05.01/t/fcm-make/15-extract-loc-reset.t --- fcm-2019.09.0/t/fcm-make/15-extract-loc-reset.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/15-extract-loc-reset.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/16-build-dep-o-2.t fcm-2021.05.01/t/fcm-make/16-build-dep-o-2.t --- fcm-2019.09.0/t/fcm-make/16-build-dep-o-2.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/16-build-dep-o-2.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/17-build-cyclic.t fcm-2021.05.01/t/fcm-make/17-build-cyclic.t --- fcm-2019.09.0/t/fcm-make/17-build-cyclic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/17-build-cyclic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/18-build-use-intrinsic.t fcm-2021.05.01/t/fcm-make/18-build-use-intrinsic.t --- fcm-2019.09.0/t/fcm-make/18-build-use-intrinsic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/18-build-use-intrinsic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/19-build-inherit-prop.t fcm-2021.05.01/t/fcm-make/19-build-inherit-prop.t --- fcm-2019.09.0/t/fcm-make/19-build-inherit-prop.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/19-build-inherit-prop.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/20-args.t fcm-2021.05.01/t/fcm-make/20-args.t --- fcm-2019.09.0/t/fcm-make/20-args.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/20-args.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/21-inherit-steps.t fcm-2021.05.01/t/fcm-make/21-inherit-steps.t --- fcm-2019.09.0/t/fcm-make/21-inherit-steps.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/21-inherit-steps.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/22-build-2-bad-mod-over-inherit.t fcm-2021.05.01/t/fcm-make/22-build-2-bad-mod-over-inherit.t --- fcm-2019.09.0/t/fcm-make/22-build-2-bad-mod-over-inherit.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/22-build-2-bad-mod-over-inherit.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/23-build-omp.t fcm-2021.05.01/t/fcm-make/23-build-omp.t --- fcm-2019.09.0/t/fcm-make/23-build-omp.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/23-build-omp.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -23,8 +23,8 @@ #------------------------------------------------------------------------------- tests 16 cp -r $TEST_SOURCE_DIR/$TEST_KEY_BASE/* . -yes 6.0 | head -n 100 >"$TEST_KEY_BASE.exe.on.out" -yes 1.0 | head -n 100 >"$TEST_KEY_BASE.exe.off.out" +printf '6.0\n%.0s' {1..100} >"$TEST_KEY_BASE.exe.on.out" +printf '1.0\n%.0s' {1..100} >"$TEST_KEY_BASE.exe.off.out" #------------------------------------------------------------------------------- TEST_KEY=$TEST_KEY_BASE-on # fc.flag-omp on in new mode run_pass "$TEST_KEY" fcm make diff -Nru fcm-2019.09.0/t/fcm-make/24-build-c-main-camel.t fcm-2021.05.01/t/fcm-make/24-build-c-main-camel.t --- fcm-2019.09.0/t/fcm-make/24-build-c-main-camel.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/24-build-c-main-camel.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/25-build-cyclic-2.t fcm-2021.05.01/t/fcm-make/25-build-cyclic-2.t --- fcm-2019.09.0/t/fcm-make/25-build-cyclic-2.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/25-build-cyclic-2.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/26-no-config.t fcm-2021.05.01/t/fcm-make/26-no-config.t --- fcm-2019.09.0/t/fcm-make/26-no-config.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/26-no-config.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/27-args-only.t fcm-2021.05.01/t/fcm-make/27-args-only.t --- fcm-2019.09.0/t/fcm-make/27-args-only.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/27-args-only.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/28-bad-arg.t fcm-2021.05.01/t/fcm-make/28-bad-arg.t --- fcm-2019.09.0/t/fcm-make/28-bad-arg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/28-bad-arg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/29-relative-cfg.t fcm-2021.05.01/t/fcm-make/29-relative-cfg.t --- fcm-2019.09.0/t/fcm-make/29-relative-cfg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/29-relative-cfg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/30-relative-cfg-in-svn.t fcm-2021.05.01/t/fcm-make/30-relative-cfg-in-svn.t --- fcm-2019.09.0/t/fcm-make/30-relative-cfg-in-svn.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/30-relative-cfg-in-svn.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/31-relative-cfg-in-ssh.t fcm-2021.05.01/t/fcm-make/31-relative-cfg-in-ssh.t --- fcm-2019.09.0/t/fcm-make/31-relative-cfg-in-ssh.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/31-relative-cfg-in-ssh.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/32-include-relative-cfg.t fcm-2021.05.01/t/fcm-make/32-include-relative-cfg.t --- fcm-2019.09.0/t/fcm-make/32-include-relative-cfg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/32-include-relative-cfg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/33-include-relative-cfg-in-svn.t fcm-2021.05.01/t/fcm-make/33-include-relative-cfg-in-svn.t --- fcm-2019.09.0/t/fcm-make/33-include-relative-cfg-in-svn.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/33-include-relative-cfg-in-svn.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/34-include-relative-cfg-in-ssh.t fcm-2021.05.01/t/fcm-make/34-include-relative-cfg-in-ssh.t --- fcm-2019.09.0/t/fcm-make/34-include-relative-cfg-in-ssh.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/34-include-relative-cfg-in-ssh.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/35-include-relative-cfg-in-2-dirs.t fcm-2021.05.01/t/fcm-make/35-include-relative-cfg-in-2-dirs.t --- fcm-2019.09.0/t/fcm-make/35-include-relative-cfg-in-2-dirs.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/35-include-relative-cfg-in-2-dirs.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/36-build-fail-cont-basic.t fcm-2021.05.01/t/fcm-make/36-build-fail-cont-basic.t --- fcm-2019.09.0/t/fcm-make/36-build-fail-cont-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/36-build-fail-cont-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/37-no-such-config-file.t fcm-2021.05.01/t/fcm-make/37-no-such-config-file.t --- fcm-2019.09.0/t/fcm-make/37-no-such-config-file.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/37-no-such-config-file.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/38-extract-inherit-set-primary.t fcm-2021.05.01/t/fcm-make/38-extract-inherit-set-primary.t --- fcm-2019.09.0/t/fcm-make/38-extract-inherit-set-primary.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/38-extract-inherit-set-primary.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/39-build-source-with-dot.t fcm-2021.05.01/t/fcm-make/39-build-source-with-dot.t --- fcm-2019.09.0/t/fcm-make/39-build-source-with-dot.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/39-build-source-with-dot.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/40-extract-fs-source-with-dot.t fcm-2021.05.01/t/fcm-make/40-extract-fs-source-with-dot.t --- fcm-2019.09.0/t/fcm-make/40-extract-fs-source-with-dot.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/40-extract-fs-source-with-dot.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/41-ctx-name.t fcm-2021.05.01/t/fcm-make/41-ctx-name.t --- fcm-2019.09.0/t/fcm-make/41-ctx-name.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/41-ctx-name.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/42-make-mirror-make2.t fcm-2021.05.01/t/fcm-make/42-make-mirror-make2.t --- fcm-2019.09.0/t/fcm-make/42-make-mirror-make2.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/42-make-mirror-make2.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/43-ctx-name-inherit.t fcm-2021.05.01/t/fcm-make/43-ctx-name-inherit.t --- fcm-2019.09.0/t/fcm-make/43-ctx-name-inherit.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/43-ctx-name-inherit.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/44-ctx-name-inherit-compat.t fcm-2021.05.01/t/fcm-make/44-ctx-name-inherit-compat.t --- fcm-2019.09.0/t/fcm-make/44-ctx-name-inherit-compat.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/44-ctx-name-inherit-compat.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/45-dest-mv.t fcm-2021.05.01/t/fcm-make/45-dest-mv.t --- fcm-2019.09.0/t/fcm-make/45-dest-mv.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/45-dest-mv.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/46-archive-mode.t fcm-2021.05.01/t/fcm-make/46-archive-mode.t --- fcm-2019.09.0/t/fcm-make/46-archive-mode.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/46-archive-mode.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/47-build-target-modifier-ns.t fcm-2021.05.01/t/fcm-make/47-build-target-modifier-ns.t --- fcm-2019.09.0/t/fcm-make/47-build-target-modifier-ns.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/47-build-target-modifier-ns.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/48-build-sha1.t fcm-2021.05.01/t/fcm-make/48-build-sha1.t --- fcm-2019.09.0/t/fcm-make/48-build-sha1.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/48-build-sha1.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/49-build-c-more.t fcm-2021.05.01/t/fcm-make/49-build-c-more.t --- fcm-2019.09.0/t/fcm-make/49-build-c-more.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/49-build-c-more.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/50-build-target-dep.t fcm-2021.05.01/t/fcm-make/50-build-target-dep.t --- fcm-2019.09.0/t/fcm-make/50-build-target-dep.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/50-build-target-dep.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/51-build-target-no-dep.t fcm-2021.05.01/t/fcm-make/51-build-target-no-dep.t --- fcm-2019.09.0/t/fcm-make/51-build-target-no-dep.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/51-build-target-no-dep.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/52-require-version.t fcm-2021.05.01/t/fcm-make/52-require-version.t --- fcm-2019.09.0/t/fcm-make/52-require-version.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/52-require-version.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/53-extract-conflict-incr.t fcm-2021.05.01/t/fcm-make/53-extract-conflict-incr.t --- fcm-2019.09.0/t/fcm-make/53-extract-conflict-incr.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/53-extract-conflict-incr.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/54-build-ignore-missing-dep-ns.t fcm-2021.05.01/t/fcm-make/54-build-ignore-missing-dep-ns.t --- fcm-2019.09.0/t/fcm-make/54-build-ignore-missing-dep-ns.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/54-build-ignore-missing-dep-ns.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/55-build-fortran-prog-unit-tail-comment.t fcm-2021.05.01/t/fcm-make/55-build-fortran-prog-unit-tail-comment.t --- fcm-2019.09.0/t/fcm-make/55-build-fortran-prog-unit-tail-comment.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/55-build-fortran-prog-unit-tail-comment.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/fcm-make.cfg fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/fcm-make.cfg --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/fcm-make.cfg 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/fcm-make.cfg 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,3 @@ +steps = build +build.source = $HERE/src +build.target{task} = link diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/class_impl.f90 fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/class_impl.f90 --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/class_impl.f90 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/class_impl.f90 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,27 @@ +submodule(class_mod) class_impl + + implicit none + +contains + + module function bar_initialiser( starter ) result(instance) + implicit none + integer, intent(in) :: starter + type(bar_type) :: instance + instance%stuff = starter + end function bar_initialiser + + + module subroutine bar_mangle(this, factor) + implicit none + class(bar_type), intent(inout) :: this + integer, intent(in) :: factor + this%stuff = ieor(this%stuff, factor) + end subroutine bar_mangle + + + module procedure bar_howmuch ! Alternative syntax + bar_howmuch = this%stuff + end procedure bar_howmuch + +end submodule class_impl diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/class_mod.f90 fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/class_mod.f90 --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/class_mod.f90 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/class_mod.f90 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,54 @@ +module class_mod + + implicit none + + type, abstract :: foo_type + private + integer :: stuff + contains + private + procedure(mangle_if), public, deferred :: mangle + procedure(how_much_if), public, deferred :: how_much + end type foo_type + + interface + subroutine mangle_if(this, factor) + import foo_type + class(foo_type), intent(inout) :: this + integer, intent(in) :: factor + end subroutine mangle_if + function how_much_if(this) + import foo_type + class(foo_type), intent(inout) :: this + integer :: how_much_if + end function how_much_if + end interface + + type, extends(foo_type) :: bar_type + private + contains + private + procedure, public :: mangle => bar_mangle + procedure, public :: how_much => bar_howmuch + end type bar_type + + interface bar_type + procedure bar_initialiser + end interface bar_type + + interface + module function bar_initialiser(starter) result(instance) + integer,intent(in) :: starter + type(bar_type) :: instance + end function bar_initialiser + module subroutine bar_mangle(this, factor) + class(bar_type), intent(inout) :: this + integer, intent(in) :: factor + end subroutine bar_mangle + module function bar_howmuch(this) + class(bar_type), intent(inout) :: this + integer :: bar_howmuch + end function bar_howmuch + end interface + +end module class_mod diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/simple_impl.f90 fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/simple_impl.f90 --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/simple_impl.f90 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/simple_impl.f90 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,18 @@ +submodule(simple_mod) simple_impl + + implicit none + +contains + + module function returnerer(thing) + + implicit none + + integer, intent(in) :: thing + integer :: returnerer + + returnerer = 2 * thing + + end function returnerer + +end submodule simple_impl diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/simple_mod.f90 fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/simple_mod.f90 --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/simple_mod.f90 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/simple_mod.f90 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,13 @@ +module simple_mod + + implicit none + + interface + module function returnerer(thing) + implicit none + integer, intent(in) :: thing + integer :: returnerer + end function returnerer + end interface + +end module simple_mod diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/test.f90 fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/test.f90 --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule/src/test.f90 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule/src/test.f90 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,21 @@ +program test + + use iso_fortran_env, only : output_unit + + use class_mod, only : bar_type + use simple_mod, only : returnerer + + implicit none + + type(bar_type) :: thing + + thing = bar_type(12) + + write(output_unit, '("Returner ", I0)') returnerer(7) + write(output_unit, '()') + + write(output_unit, '("Start with ", I0)') thing%how_much() + call thing%mangle(17) + write(output_unit, '("After mangle ", I0)') thing%how_much() + +end program test diff -Nru fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule.t fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule.t --- fcm-2019.09.0/t/fcm-make/56-build-fortran-submodule.t 1970-01-01 00:00:00.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/56-build-fortran-submodule.t 2021-05-23 12:45:34.000000000 +0000 @@ -0,0 +1,53 @@ +#!/bin/bash +#------------------------------------------------------------------------------- +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. +# +# This file is part of FCM, tools for managing and building source code. +# +# FCM 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. +# +# FCM 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 FCM. If not, see . +#------------------------------------------------------------------------------- +# Test build, handle Fortran submodule +#------------------------------------------------------------------------------- +. "$(dirname "$0")/test_header" +tests 5 +#------------------------------------------------------------------------------- +cp -r "${TEST_SOURCE_DIR}/${TEST_KEY_BASE}/"* '.' +#------------------------------------------------------------------------------- +TEST_KEY="${TEST_KEY_BASE}" + +run_pass "${TEST_KEY}" fcm make +sed -n '/\[info\] target /p' 'fcm-make.log' >'fcm-make.log.edited' +file_cmp "${TEST_KEY}.target.log" 'fcm-make.log.edited' <<'__LOG__' +[info] target test.exe +[info] target - class_impl.o +[info] target - class_mod.o +[info] target - simple_impl.o +[info] target - simple_mod.o +[info] target - test.o +[info] target - - class_mod.mod +[info] target - - - class_mod.o +[info] target - - simple_mod.mod +[info] target - - - simple_mod.o +__LOG__ + +run_pass "${TEST_KEY}.test" "${PWD}/build/bin/test.exe" +file_cmp "${TEST_KEY}.test.out" "${TEST_KEY}.test.out" <<'__OUT__' +Returner 14 + +Start with 12 +After mangle 29 +__OUT__ +file_cmp "${TEST_KEY}.test.err" "${TEST_KEY}.test.err" <'/dev/null' +#------------------------------------------------------------------------------- +exit 0 diff -Nru fcm-2019.09.0/t/fcm-make/test_header fcm-2021.05.01/t/fcm-make/test_header --- fcm-2019.09.0/t/fcm-make/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-make/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash -# ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +#------------------------------------------------------------------------------- +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -16,146 +16,9 @@ # # You should have received a copy of the GNU General Public License # along with FCM. If not, see . -# ------------------------------------------------------------------------------ -# NAME -# test_header -# -# SYNOPSIS -# . $FCM_HOME/t/lib/bash/test_header -# -# DESCRIPTION -# Provide bash shell functions for writing tests for "fcm" commands to -# output in Perl's TAP format. Add "set -eu". Create a temporary working -# directory $TEST_DIR and change to it. Automatically increment test number. -# If $FCM_HOME is not specified, set it to point to the "fcm" source tree -# containing this script. Add $FCM_HOME/bin to the front of $PATH. -# -# FUNCTIONS -# tests N -# echo "1..$N". -# skip N REASON -# echo "ok $((++T)) # skip REASON" N times, where T is the test number. -# skip_all REASON -# echo "1..0 # SKIP $REASON" and exit. -# pass TEST_KEY -# echo "ok $T - $TEST_KEY" where T is the current test number. -# fail TEST_KEY -# echo "not ok $T - $TEST_KEY" where T is the current test number. -# run_pass TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns true/false. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# run_fail TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns false/true. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# file_cmp TEST_KEY FILE_ACTUAL [$FILE_EXPECT] -# Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail -# $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" -# or not defined, compare $FILE_ACTUAL with STDIN to this function. -# file_test TEST_KEY FILE [OPTION] -# pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is -# -e if not specified. -# file_grep TEST_KEY PATTERN FILE -# Run "grep -q PATTERN FILE". pass/fail $TEST_KEY accordingly. -# branch_tidy INPUT_FILE -# Standardise branch-create output between Subversion 1.8 and 1.9. -# commit_sort INPUT_FILE OUTPUT_FILE -# Sort status and transmitting info within the commit output. -# diff_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. -# status_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion status lines. -# merge_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion merge status lines. -# check_svn_version -# Check Subversion version and skip tests if not compatible. -# FINALLY -# This is run on EXIT or INT to remove the temporary working directory -# for the test. Call FINALLY_MORE if it is declared. -# -# VARIABLES -# FCM_HOME -# Root of FCM's installation. (Exported.) -# SIGNALS -# List of signals trapped by FINALLY, currently EXIT and INT. -# TEST_DIR -# Temporary directory that is also the working directory for this test. -# TEST_KEY_BASE -# Base root name of current test file. -# TEST_NUMBER -# Test number of latest test. -# TEST_SOURCE_DIR -# Directory containing the current test file. #------------------------------------------------------------------------------- -set -eu -SIGNALS="EXIT INT" -TEST_DIR= -function FINALLY() { - for S in $SIGNALS; do - trap '' $S - done - if [[ -n $TEST_DIR ]]; then - cd ~ - rm -rf $TEST_DIR - fi - if declare -F FINALLY_MORE >/dev/null; then - FINALLY_MORE - fi - -} -for S in $SIGNALS; do - trap "FINALLY $S" $S -done - -TEST_NUMBER=0 - -function tests() { - echo "1..$1" -} - -function skip() { - local N_SKIPS=$1 - shift 1 - local I=0 - while ((I++ < N_SKIPS)); do - echo "ok $((++TEST_NUMBER)) # skip $@" - done -} - -function skip_all() { - echo "1..0 # SKIP $@" - exit -} - -function pass() { - echo "ok $((++TEST_NUMBER)) - $@" -} - -function fail() { - echo "not ok $((++TEST_NUMBER)) - $@" -} - -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} +. $(dirname $0)/../lib/bash/test_header function file_cmp() { local TEST_KEY=$1 @@ -189,139 +52,3 @@ fi fail $TEST_KEY } - -function branch_tidy() { - local INPUT_FILE=$TEST_DIR/$1 - sed -i "/^Committing transaction/d; /^$/d" "$INPUT_FILE" -} - -function commit_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - local TMP_OUTPUT_FILE=$(mktemp) - # Sort the svn status part of the message - status_sort $INPUT_FILE $TMP_OUTPUT_FILE - # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys -text = sys.stdin.read() -sending_lines = re.findall("^\w+ing +.*$", text, re.M) -prefix = text[:text.index(sending_lines[0])] -suffix = text[(text.index(sending_lines[-1]) + len(sending_lines[-1])):] -sending_lines.sort() -print prefix + "\n".join(sending_lines) + suffix.rstrip() -' <"$TMP_OUTPUT_FILE" >"$OUTPUT_FILE" - rm "$TMP_OUTPUT_FILE" - # Remove 1.8 to 1.9 specific changes (transmitting, transaction lines). - sed -i "/^Transmitting file data/d; /^Committing transaction/d; /^$/d" \ - "$OUTPUT_FILE" -} - -function diff_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - # Sort the diff file order. - python -c 'import re, sys -text = sys.stdin.read() -print "\nIndex: ".join( - [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) -' <"$INPUT_FILE" >"$OUTPUT_FILE" - # In 1.9, new files are (nonexistent) rather than (working copy). - sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" -} - -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - -function status_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = re.findall("^.{7} [\w./].*$", text, re.M) -prefix = text[:text.index(status_lines[0])] -suffix = text[(text.index(status_lines[-1]) + len(status_lines[-1])):] -status_lines.sort() -print prefix + "\n".join(status_lines) + suffix.rstrip() -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function merge_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = [] -for line in text.splitlines(): - if line.startswith("Enter \"y\"") and ": " in line: - head, tail = line.split(": ", 1) - if status_lines: - print "\n".join(sorted(status_lines)) - status_lines = [] - print head + ": " - if tail: - line = tail - if re.search("^.{4} [\w./].*$", line): - status_lines.append(line) - elif status_lines: - print "\n".join(sorted(status_lines)) - print line - status_lines = [] - else: - print line -if status_lines: - print "\n".join(sorted(status_lines)) -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" - exit 0 - fi -} - -function fcm_make_build_hello_tests() { - local TEST_KEY=$1 - local HELLO_EXT=${2:-} - shift 2 - rm -fr \ - .fcm-make \ - build \ - fcm-make-as-parsed.cfg \ - fcm-make-on-success.cfg \ - fcm-make.log - run_pass "$TEST_KEY" fcm make "$@" - file_test "$TEST_KEY.hello$HELLO_EXT" "$PWD/build/bin/hello$HELLO_EXT" - "$PWD/build/bin/hello$HELLO_EXT" >"$TEST_KEY.hello$HELLO_EXT.out" - file_cmp "$TEST_KEY.hello$HELLO_EXT.out" \ - "$TEST_KEY.hello$HELLO_EXT.out" <<'__OUT__' -Hello World! -__OUT__ -} - -FCM_HOME=${FCM_HOME:-$(cd $(dirname $(readlink -f $BASH_SOURCE))/../../.. && pwd)} -export FCM_HOME -PATH=$FCM_HOME/bin:$PATH - -SVN_VERSION_IS_19=false -if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi -fi - -TEST_KEY_BASE=$(basename $0 .t) -TEST_SOURCE_DIR=$(cd $(dirname $0) && pwd) -TEST_DIR=$(mktemp -d) -export LC_ALL=C -export LANG=C -cd $TEST_DIR - -set +e diff -Nru fcm-2019.09.0/t/fcm-merge/00-simple.t fcm-2021.05.01/t/fcm-merge/00-simple.t --- fcm-2019.09.0/t/fcm-merge/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-merge/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -150,7 +150,7 @@ TEST_KEY=$TEST_KEY_BASE-non-interactive-diff run_pass "$TEST_KEY" svn diff diff_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out" -diff_svn_version_filter >"$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -160,16 +160,16 @@ Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /branches/dev/Share/merge1:r4-5 -#IF SVN1.9 Index: added_directory/hello_constants.f90 -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants_dummy.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.f90 +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants_dummy.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_file +#IF SVN1.9/10 =================================================================== Index: lib/python/info/poems.py =================================================================== --- lib/python/info/poems.py (revision 9) @@ -234,8 +234,8 @@ @@ -1 +1 @@ -INCLUDE 'hello_constants.inc' +INCLUDE 'hello_constants.INc' -#IF SVN1.9 Index: module/tree_conflict_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: module/tree_conflict_file +#IF SVN1.9/10 =================================================================== Index: subroutine/hello_sub_dummy.h =================================================================== --- subroutine/hello_sub_dummy.h (revision 9) @@ -244,7 +244,6 @@ #include "hello_sub.h" +Modified a line __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -105,7 +105,7 @@ Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /${PROJECT}trunk:r2-9 Index: lib/python/info/__init__.py =================================================================== @@ -115,8 +115,6 @@ +trunk change +another trunk change __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -308,16 +306,16 @@ Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /${PROJECT}branches/dev/Share/merge1:r4-11 -#IF SVN1.9 Index: added_directory/hello_constants.f90 -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants_dummy.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.f90 +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants_dummy.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_file +#IF SVN1.9/10 =================================================================== Index: lib/python/info/poems.py =================================================================== --- lib/python/info/poems.py (revision 11) @@ -382,8 +380,8 @@ @@ -1 +1 @@ -INCLUDE 'hello_constants.inc' +INCLUDE 'hello_constants.INc' -#IF SVN1.9 Index: module/tree_conflict_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: module/tree_conflict_file +#IF SVN1.9/10 =================================================================== Index: subroutine/hello_sub_dummy.h =================================================================== --- subroutine/hello_sub_dummy.h (revision 11) @@ -392,8 +390,6 @@ #include "hello_sub.h" +Modified a line __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -584,7 +580,7 @@ Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /${PROJECT}branches/dev/Share/merge1:r12-13 Index: added_file =================================================================== @@ -594,8 +590,6 @@ INCLUDE 'hello_constants.INc' +call_extra_feature() __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -778,7 +772,7 @@ Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /${PROJECT}trunk:r10-16 Index: added_file =================================================================== @@ -789,8 +783,6 @@ call_extra_feature() +# trunk modification __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -987,7 +979,7 @@ Property changes on: . ___________________________________________________________________ Modified: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,1 ## +#IF SVN1.9/10 ## -0,0 +0,1 ## Merged /${PROJECT}branches/dev/Share/merge1:r14-19 Index: added_directory/hello_constants_dummy.inc =================================================================== @@ -996,11 +988,9 @@ @@ -1,2 +0,0 @@ -INCLUDE 'hello_constants.INc' -# added this line for simple repeat testing -#IF SVN1.9 Index: added_file.add -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: added_file.add +#IF SVN1.9/10 =================================================================== __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" "$TEST_DIR/$TEST_KEY.sorted.ctrl" <<__OUT__ +file_cmp_filtered "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__ Index: . =================================================================== @@ -1299,17 +1289,17 @@ Property changes on: . ___________________________________________________________________ Added: svn:mergeinfo -#IF SVN1.9 ## -0,0 +0,2 ## +#IF SVN1.9/10 ## -0,0 +0,2 ## Merged /${PROJECT}trunk:r2-9 Merged /${PROJECT}branches/dev/Share/merge1:r4-13 -#IF SVN1.9 Index: added_directory/hello_constants.f90 -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_directory/hello_constants_dummy.inc -#IF SVN1.9 =================================================================== -#IF SVN1.9 Index: added_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.f90 +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_directory/hello_constants_dummy.inc +#IF SVN1.9/10 =================================================================== +#IF SVN1.9/10 Index: added_file +#IF SVN1.9/10 =================================================================== Index: lib/python/info/__init__.py =================================================================== --- lib/python/info/__init__.py (revision 21) @@ -1382,8 +1372,8 @@ @@ -1 +1 @@ -INCLUDE 'hello_constants.inc' +INCLUDE 'hello_constants.INc' -#IF SVN1.9 Index: module/tree_conflict_file -#IF SVN1.9 =================================================================== +#IF SVN1.9/10 Index: module/tree_conflict_file +#IF SVN1.9/10 =================================================================== Index: subroutine/hello_sub_dummy.h =================================================================== --- subroutine/hello_sub_dummy.h (revision 21) @@ -1392,8 +1382,6 @@ #include "hello_sub.h" +Modified a line __OUT__ -file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" \ - "$TEST_DIR/$TEST_KEY.sorted.ctrl" file_cmp "$TEST_KEY.err" "$TEST_KEY.err" &2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/fcm-recover-svn-repos/00-basic.t fcm-2021.05.01/t/fcm-recover-svn-repos/00-basic.t --- fcm-2019.09.0/t/fcm-recover-svn-repos/00-basic.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-recover-svn-repos/00-basic.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-recover-svn-repos/test_header fcm-2021.05.01/t/fcm-recover-svn-repos/test_header --- fcm-2019.09.0/t/fcm-recover-svn-repos/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-recover-svn-repos/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/fcm-status/00-simple.t fcm-2021.05.01/t/fcm-status/00-simple.t --- fcm-2019.09.0/t/fcm-status/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-status/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-status/test_header fcm-2021.05.01/t/fcm-status/test_header --- fcm-2019.09.0/t/fcm-status/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-status/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -71,7 +38,8 @@ function init_repos() { if [[ -n ${TEST_REMOTE_HOST:-} ]]; then TEST_REMOTE_DIR=$(ssh $TEST_REMOTE_HOST "mktemp -d") - ssh $TEST_REMOTE_HOST "svnadmin create --fs-type fsfs $TEST_REMOTE_DIR" + ssh $TEST_REMOTE_HOST bash -l -c "svnadmin create --fs-type fsfs\ + $TEST_REMOTE_DIR" REPOS_URL="svn+ssh://${TEST_REMOTE_HOST}$TEST_REMOTE_DIR" else svnadmin create --fs-type fsfs $TEST_DIR/test_repos @@ -98,9 +66,8 @@ svnadmin create --fs-type fsfs $TEST_DIR/test_repos REPOS_URL="file://$TEST_DIR/test_repos" fi - svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ - $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import" + $REPOS_URL/a/a/0/0/0/trunk/ -m "initial trunk import" TMPFILE=$(mktemp) cat >$TMPFILE <<__LAYOUT__ depth-project = 5 @@ -195,24 +162,55 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err" &2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/fcm-update/00-simple.t fcm-2021.05.01/t/fcm-update/00-simple.t --- fcm-2019.09.0/t/fcm-update/00-simple.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-update/00-simple.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-update/01-subtree.t fcm-2021.05.01/t/fcm-update/01-subtree.t --- fcm-2019.09.0/t/fcm-update/01-subtree.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-update/01-subtree.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/fcm-update/test_header fcm-2021.05.01/t/fcm-update/test_header --- fcm-2019.09.0/t/fcm-update/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/fcm-update/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/lib/bash/svn_test_header fcm-2021.05.01/t/lib/bash/svn_test_header --- fcm-2019.09.0/t/lib/bash/svn_test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/lib/bash/svn_test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -195,26 +162,6 @@ svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - function get_results() { local RESULT_KEY=$1 local RESULTS_FILE=$2 @@ -230,7 +177,7 @@ local DIFF_BRANCH=$2 local INPUT_RESULTS_FILE=${3:--} local WC_REVISION=${4:-WC} - if "$SVN_VERSION_IS_19"; then + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then WC_REVISION=WC elif (( WC_REVISION < 10 )); then WC_REVISION="$WC_REVISION " diff -Nru fcm-2019.09.0/t/lib/bash/test_header fcm-2021.05.01/t/lib/bash/test_header --- fcm-2019.09.0/t/lib/bash/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/lib/bash/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -51,6 +51,9 @@ # Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail # $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" # or not defined, compare $FILE_ACTUAL with STDIN to this function. +# file_cmp_filtered TEST_KEY FILE_ACTUAL [$FILE_EXPECT] +# Preprocess $FILE_EXPECT based on relevant '#IF SVN1.X' prefixes before +# calling file_cmp. # file_test TEST_KEY FILE [OPTION] # pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is # -e if not specified. @@ -62,8 +65,6 @@ # Sort status and transmitting info within the commit output. # diff_sort INPUT_FILE OUTPUT_FILE # Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. # status_sort INPUT_FILE OUTPUT_FILE # Sort Subversion status lines. # merge_sort INPUT_FILE OUTPUT_FILE @@ -140,7 +141,7 @@ function run_pass() { local TEST_KEY=$1 shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -150,7 +151,7 @@ function run_fail() { local TEST_KEY=$1 shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then + if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then fail $TEST_KEY return fi @@ -161,18 +162,49 @@ local TEST_KEY=$1 local FILE_ACTUAL=$2 local FILE_EXPECT=${3:--} - if diff -u $FILE_EXPECT $FILE_ACTUAL >&2; then + if diff -u $FILE_EXPECT $TEST_DIR/$FILE_ACTUAL >&2; then pass $TEST_KEY return fi fail $TEST_KEY } +function file_cmp_filtered() { + local FILE_EXPECT=${3:--} + if [[ $SVN_MINOR_VERSION == "1.8" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.8 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.10 /d" \ + -e "/^#IF SVN1.9\/10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + elif [[ $SVN_MINOR_VERSION == "1.9" ]]; then + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.9 //g" \ + -e "s/^#IF SVN1.8\/9 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.10 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + else + cat $FILE_EXPECT | sed \ + -e "s/^#IF SVN1.10 //g" \ + -e "s/^#IF SVN1.9\/10 //g" \ + -e "/^#IF SVN1.8 /d" \ + -e "/^#IF SVN1.9 /d" \ + -e "/^#IF SVN1.8\/9 /d" \ + >"$TEST_DIR/$TEST_KEY.filtered-ctrl" + fi + file_cmp "$1" "$2" "$TEST_DIR/$TEST_KEY.filtered-ctrl" + rm "$TEST_DIR/$TEST_KEY.filtered-ctrl" +} + function file_test() { local TEST_KEY=$1 local FILE=$2 local OPTION=${3:--e} - if test $OPTION $FILE; then + if test $OPTION $TEST_DIR/$FILE; then pass $TEST_KEY else fail $TEST_KEY @@ -183,7 +215,7 @@ local TEST_KEY=$1 local PATTERN=$2 local FILE=$3 - if grep -q -e "$PATTERN" $FILE; then + if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then pass $TEST_KEY return fi @@ -202,7 +234,7 @@ # Sort the svn status part of the message status_sort $INPUT_FILE $TMP_OUTPUT_FILE # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() sending_lines = re.findall("^\w+ing +.*$", text, re.M) prefix = text[:text.index(sending_lines[0])] @@ -220,7 +252,7 @@ local INPUT_FILE=$1 local OUTPUT_FILE=$2 # Sort the diff file order. - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() print "\nIndex: ".join( [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) @@ -229,18 +261,10 @@ sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" - fi -} - function status_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = re.findall("^.{7} [\w./].*$", text, re.M) prefix = text[:text.index(status_lines[0])] @@ -253,7 +277,7 @@ function merge_sort() { local INPUT_FILE=$1 local OUTPUT_FILE=$2 - python -c 'import re, sys + python2 -c 'import re, sys text = sys.stdin.read() status_lines = [] for line in text.splitlines(): @@ -279,8 +303,8 @@ } function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" + if [[ ! $SVN_MINOR_VERSION =~ ^1\.(8|9|10)$ ]]; then + skip_all "Tests require Subversion 1.8 or later" exit 0 fi } @@ -308,13 +332,12 @@ export FCM_HOME PATH=$FCM_HOME/bin:$PATH -SVN_VERSION_IS_19=false +SVN_MINOR_VERSION=undef if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi + SVN_MINOR_VERSION=$(svn --version | \ + sed -n "s/^svn, version 1.\([0-9]\+\)\.[0-9]\+ .*/1.\1/p") + # Treat versions 1.10 and above the same for the moment + [[ $SVN_MINOR_VERSION =~ ^1\.1[0-9]$ ]] && SVN_MINOR_VERSION=1.10 fi TEST_KEY_BASE=$(basename $0 .t) diff -Nru fcm-2019.09.0/t/svn-hooks/00-pre-revprop-change.t fcm-2021.05.01/t/svn-hooks/00-pre-revprop-change.t --- fcm-2019.09.0/t/svn-hooks/00-pre-revprop-change.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/00-pre-revprop-change.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -19,9 +19,8 @@ #------------------------------------------------------------------------------- # Basic tests for "pre-revprop-change". #------------------------------------------------------------------------------- -. $(dirname $0)/test_header FCM_SVN_HOOK_ADMIN_EMAIL=your.admin.team -. $TEST_SOURCE_DIR/test_header_more +. $(dirname $0)/test_header #------------------------------------------------------------------------------- tests 16 #------------------------------------------------------------------------------- diff -Nru fcm-2019.09.0/t/svn-hooks/01-post-revprop-change-bg.t fcm-2021.05.01/t/svn-hooks/01-post-revprop-change-bg.t --- fcm-2019.09.0/t/svn-hooks/01-post-revprop-change-bg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/01-post-revprop-change-bg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -20,7 +20,6 @@ # Basic tests for "post-revprop-change-bg". #------------------------------------------------------------------------------- . $(dirname $0)/test_header -. $TEST_SOURCE_DIR/test_header_more #------------------------------------------------------------------------------- tests 9 #------------------------------------------------------------------------------- diff -Nru fcm-2019.09.0/t/svn-hooks/02-pre-commit.t fcm-2021.05.01/t/svn-hooks/02-pre-commit.t --- fcm-2019.09.0/t/svn-hooks/02-pre-commit.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/02-pre-commit.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -19,9 +19,8 @@ #------------------------------------------------------------------------------- # Basic tests for "pre-commit". #------------------------------------------------------------------------------- -. $(dirname $0)/test_header FCM_SVN_HOOK_ADMIN_EMAIL='your.admin.team' -. $TEST_SOURCE_DIR/test_header_more +. $(dirname $0)/test_header test_tidy() { rm -f \ @@ -176,7 +175,7 @@ #------------------------------------------------------------------------------- TEST_KEY="$TEST_KEY_BASE-size-2" # bigger than default, threshold increased test_tidy -echo '20' >"$REPOS_PATH/hooks/pre-commit-size-threshold.conf" +echo '40' >"$REPOS_PATH/hooks/pre-commit-size-threshold.conf" perl -e 'map {print(rand())} 1..2097152' >file3 # a large file run_pass "$TEST_KEY" \ svn import --no-auth-cache -q -m'test' file3 "$REPOS_URL/file3" diff -Nru fcm-2019.09.0/t/svn-hooks/03-post-commit-bg.t fcm-2021.05.01/t/svn-hooks/03-post-commit-bg.t --- fcm-2019.09.0/t/svn-hooks/03-post-commit-bg.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/03-post-commit-bg.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -19,9 +19,8 @@ #------------------------------------------------------------------------------- # Basic tests for "post-commit-bg". #------------------------------------------------------------------------------- -. $(dirname $0)/test_header FCM_SVN_HOOK_ADMIN_EMAIL=fcm.admin.team -. $TEST_SOURCE_DIR/test_header_more +. $(dirname $0)/test_header test_tidy() { rm -f \ @@ -59,7 +58,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB RET_CODE=0 __LOG__ if [[ -n ${TRAC_ENV_PATH:-} ]] && ! $TRAC_RESYNC; then @@ -103,7 +102,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB RET_CODE=0 __LOG__ file_cmp "${TEST_KEY}.conf" \ @@ -133,7 +132,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB svnlook cat $REPOS_PATH ${NAME} >$REPOS_PATH/hooks/${NAME} RET_CODE=0 __LOG__ @@ -161,7 +160,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB svnlook cat $REPOS_PATH ${NAME} >$REPOS_PATH/hooks/${NAME} RET_CODE=0 __LOG__ @@ -183,7 +182,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB rm -f $REPOS_PATH/hooks/${NAME} RET_CODE=0 __LOG__ @@ -192,7 +191,7 @@ #------------------------------------------------------------------------------- TEST_KEY="$TEST_KEY_BASE-size" test_tidy -perl -e 'map {print(rand())} 1..524288' >file2 # compress should be >1MB +perl -e 'map {print(rand())} 1..524288' >file2 # compress should be >2MB svn import --no-auth-cache -q -m"$TEST_KEY" file2 "$REPOS_URL/file2" REV=$(/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # >1MB <10MB +REV_FILE_SIZE=??? # >2MB RET_CODE=1 __LOG__ date2datefmt mail.out \ @@ -218,7 +217,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # >1MB <10MB +REV_FILE_SIZE=??? # >2MB RET_CODE=1 __LOG__ #------------------------------------------------------------------------------- @@ -238,7 +237,7 @@ | (dd 'conv=fsync' "of=${PWD}/svn-dumps/foo-${REV}-tmp.gz" 2>/dev/null) * Dumped revision ${REV}. mv "${PWD}/svn-dumps/foo-${REV}-tmp.gz" "${PWD}/svn-dumps/foo-${REV}.gz" -REV_FILE_SIZE=??? # >10MB +REV_FILE_SIZE=??? # >2MB RET_CODE=1 __LOG__ date2datefmt mail.out \ @@ -251,7 +250,7 @@ | (dd 'conv=fsync' "of=${PWD}/svn-dumps/foo-${REV}-tmp.gz" 2>/dev/null) * Dumped revision ${REV}. mv "${PWD}/svn-dumps/foo-${REV}-tmp.gz" "${PWD}/svn-dumps/foo-${REV}.gz" -REV_FILE_SIZE=??? # >10MB +REV_FILE_SIZE=??? # >2MB RET_CODE=1 __LOG__ #------------------------------------------------------------------------------- @@ -276,7 +275,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB $REPOS_PATH/hooks/post-commit-bg-custom $REPOS_PATH $REV $TXN $REPOS_PATH $REV $TXN RET_CODE=0 @@ -305,7 +304,7 @@ | (dd 'conv=fsync' "of=$PWD/svn-dumps/foo-$REV-tmp.gz" 2>/dev/null) * Dumped revision $REV. mv "$PWD/svn-dumps/foo-$REV-tmp.gz" "$PWD/svn-dumps/foo-$REV.gz" -REV_FILE_SIZE=??? # <1MB +REV_FILE_SIZE=??? # <2MB $REPOS_PATH/hooks/post-commit-background-custom $REPOS_PATH $REV $TXN I have gone to the dark side. RET_CODE=1 diff -Nru fcm-2019.09.0/t/svn-hooks/04-svnperms.t fcm-2021.05.01/t/svn-hooks/04-svnperms.t --- fcm-2019.09.0/t/svn-hooks/04-svnperms.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/04-svnperms.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash #------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -19,9 +19,8 @@ #------------------------------------------------------------------------------- # Basic tests for "pre-commit". #------------------------------------------------------------------------------- -. $(dirname $0)/test_header FCM_SVN_HOOK_ADMIN_EMAIL='your.admin.team' -. $TEST_SOURCE_DIR/test_header_more +. $(dirname $0)/test_header svn mkdir --parents $REPOS_URL/foo/trunk -m "create foo trunk" svn mkdir --parents $REPOS_URL/foo/branches -m "create foo branches" diff -Nru fcm-2019.09.0/t/svn-hooks/test_header fcm-2021.05.01/t/svn-hooks/test_header --- fcm-2019.09.0/t/svn-hooks/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash -# ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +#------------------------------------------------------------------------------- +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -16,146 +16,43 @@ # # You should have received a copy of the GNU General Public License # along with FCM. If not, see . -# ------------------------------------------------------------------------------ +#------------------------------------------------------------------------------- # NAME # test_header # # SYNOPSIS -# . $FCM_HOME/t/lib/bash/test_header +# . $(dirname $0)/test_header # # DESCRIPTION -# Provide bash shell functions for writing tests for "fcm" commands to -# output in Perl's TAP format. Add "set -eu". Create a temporary working -# directory $TEST_DIR and change to it. Automatically increment test number. -# If $FCM_HOME is not specified, set it to point to the "fcm" source tree -# containing this script. Add $FCM_HOME/bin to the front of $PATH. +# Provide more bash shell functions for testing svn-hooks. Create a +# subversion repository. Create a Trac environment if possible. Set up +# repository hooks environment file. # # FUNCTIONS -# tests N -# echo "1..$N". -# skip N REASON -# echo "ok $((++T)) # skip REASON" N times, where T is the test number. -# skip_all REASON -# echo "1..0 # SKIP $REASON" and exit. -# pass TEST_KEY -# echo "ok $T - $TEST_KEY" where T is the current test number. -# fail TEST_KEY -# echo "not ok $T - $TEST_KEY" where T is the current test number. -# run_pass TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns true/false. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# run_fail TEST_KEY COMMAND ... -# Run $COMMAND. pass/fail $TEST_KEY if $COMMAND returns false/true. -# Write STDOUT and STDERR in $TEST_KEY.out and $TEST_KEY.err. -# file_cmp TEST_KEY FILE_ACTUAL [$FILE_EXPECT] -# Compare contents in $FILE_ACTUAL and $FILE_EXPECT. pass/fail -# $TEST_KEY if contents are identical/different. If $FILE_EXPECT is "-" -# or not defined, compare $FILE_ACTUAL with STDIN to this function. -# file_test TEST_KEY FILE [OPTION] -# pass/fail $TEST_KEY if "test $OPTION $FILE" returns 0/1. $OPTION is -# -e if not specified. -# file_grep TEST_KEY PATTERN FILE -# Run "grep -q PATTERN FILE". pass/fail $TEST_KEY accordingly. -# branch_tidy INPUT_FILE -# Standardise branch-create output between Subversion 1.8 and 1.9. -# commit_sort INPUT_FILE OUTPUT_FILE -# Sort status and transmitting info within the commit output. -# diff_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion diff output by filename. -# diff_svn_version_filter -# Preprocess stdin to stdout based on relevant '#IF SVN1.X' prefixes. -# status_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion status lines. -# merge_sort INPUT_FILE OUTPUT_FILE -# Sort Subversion merge status lines. -# check_svn_version -# Check Subversion version and skip tests if not compatible. -# FINALLY -# This is run on EXIT or INT to remove the temporary working directory -# for the test. Call FINALLY_MORE if it is declared. +# date2datefmt FILE +# Convert date time in YYYY-mm-ddTHH:MM:SSZ format into the format +# string itself. +# poll HOW_LONG COND ... +# Poll for COND to become true for HOW_LONG seconds. # # VARIABLES -# FCM_HOME -# Root of FCM's installation. (Exported.) -# SIGNALS -# List of signals trapped by FINALLY, currently EXIT and INT. -# TEST_DIR -# Temporary directory that is also the working directory for this test. -# TEST_KEY_BASE -# Base root name of current test file. -# TEST_NUMBER -# Test number of latest test. -# TEST_SOURCE_DIR -# Directory containing the current test file. +# FCM_SVN_HOOK_REPOS_SUFFIX +# FCM_SVN_HOOK_ADMIN_EMAIL +# Optional. See definition in hook scripts. +# HOOK_PATH +# PATH for the hook scripts. +# REPOS_PATH +# Path to the Subversion repository ($PWD/svn-repos/foo). +# REPOS_URL +# URL of the Subversion repository root (file://$REPOS_PATH). +# TRAC_ENV_PATH +# Path to the Trac environment ($PWD/trac-env/foo). +# TRAC_RESYNC +# If true, use "trac-admin resync". If false, use "trac-admin +# changeset added|modified". #------------------------------------------------------------------------------- -set -eu - -SIGNALS="EXIT INT" -TEST_DIR= -function FINALLY() { - for S in $SIGNALS; do - trap '' $S - done - if [[ -n $TEST_DIR ]]; then - cd ~ - rm -rf $TEST_DIR - fi - if declare -F FINALLY_MORE >/dev/null; then - FINALLY_MORE - fi - -} -for S in $SIGNALS; do - trap "FINALLY $S" $S -done - -TEST_NUMBER=0 - -function tests() { - echo "1..$1" -} - -function skip() { - local N_SKIPS=$1 - shift 1 - local I=0 - while ((I++ < N_SKIPS)); do - echo "ok $((++TEST_NUMBER)) # skip $@" - done -} -function skip_all() { - echo "1..0 # SKIP $@" - exit -} - -function pass() { - echo "ok $((++TEST_NUMBER)) - $@" -} - -function fail() { - echo "not ok $((++TEST_NUMBER)) - $@" -} - -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_KEY.out 2>$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} +. $(dirname $0)/../lib/bash/test_header function file_cmp() { local TEST_KEY=$1 @@ -168,17 +65,6 @@ fail $TEST_KEY } -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_grep() { local TEST_KEY=$1 local PATTERN=$2 @@ -190,138 +76,68 @@ fail $TEST_KEY } -function branch_tidy() { - local INPUT_FILE=$TEST_DIR/$1 - sed -i "/^Committing transaction/d; /^$/d" "$INPUT_FILE" +date2datefmt() { + perl -p -e 's/\d+-\d\d-\d\dT\d\d:\d\d:\d\dZ/YYYY-mm-ddTHH:MM:SSZ/' "$@" } -function commit_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - local TMP_OUTPUT_FILE=$(mktemp) - # Sort the svn status part of the message - status_sort $INPUT_FILE $TMP_OUTPUT_FILE - # Sort the 'Adding/Deleting', etc part of the message - python -c 'import re, sys -text = sys.stdin.read() -sending_lines = re.findall("^\w+ing +.*$", text, re.M) -prefix = text[:text.index(sending_lines[0])] -suffix = text[(text.index(sending_lines[-1]) + len(sending_lines[-1])):] -sending_lines.sort() -print prefix + "\n".join(sending_lines) + suffix.rstrip() -' <"$TMP_OUTPUT_FILE" >"$OUTPUT_FILE" - rm "$TMP_OUTPUT_FILE" - # Remove 1.8 to 1.9 specific changes (transmitting, transaction lines). - sed -i "/^Transmitting file data/d; /^Committing transaction/d; /^$/d" \ - "$OUTPUT_FILE" -} - -function diff_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - # Sort the diff file order. - python -c 'import re, sys -text = sys.stdin.read() -print "\nIndex: ".join( - [l.strip() for l in sorted(re.compile("^Index: ", re.M).split(text))]) -' <"$INPUT_FILE" >"$OUTPUT_FILE" - # In 1.9, new files are (nonexistent) rather than (working copy). - sed -i "s/(nonexistent)/(working copy)/" "$OUTPUT_FILE" +poll() { + local HOW_LONG=$1 + shift 1 + local WAIT_UNTIL=$(($(date +%s) + $HOW_LONG)) + while (($(date +%s) < $WAIT_UNTIL)) && ! "$@" 2>/dev/null; do + sleep 1 + done + "$@" } -function diff_svn_version_filter() { - if "$SVN_VERSION_IS_19"; then - sed "s/^#IF SVN1.9 //g; /^#IF SVN1.8 /d" - else - sed "s/^#IF SVN1.8 //g; /^#IF SVN1.9 /d" +HOOK_PATH='/usr/local/bin:/usr/bin:/bin' +mkdir bin svn-dumps svn-repos trac-env +svnadmin create svn-repos/foo 2>/dev/null \ + || skip_all 'cannot create Subversion repository' +REPOS_PATH="$PWD/svn-repos/foo${FCM_SVN_HOOK_REPOS_SUFFIX:-}" +REPOS_URL="file://$REPOS_PATH" +ADMIN_DIR=$(dirname "$(which svnadmin)") +if ! grep -q '^\(/usr/local/bin\|/usr/bin\|/bin\)$' <<<"$ADMIN_DIR"; then + HOOK_PATH="$ADMIN_DIR:$HOOK_PATH" +fi +if trac-admin trac-env/foo initenv foo sqlite:db/trac.db svn "$REPOS_PATH" \ + 1>/dev/null 2>&1 +then + FCM_SVN_HOOK_TRAC_ROOT_DIR="$PWD/trac-env" + TRAC_ENV_PATH="$FCM_SVN_HOOK_TRAC_ROOT_DIR/foo" + ADMIN_DIR=$(dirname "$(which trac-admin)") + if ! grep -q '^\(/usr/local/bin\|/usr/bin\|/bin\)$' <<<"$ADMIN_DIR"; then + HOOK_PATH="$ADMIN_DIR:$HOOK_PATH" fi -} - -function status_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = re.findall("^.{7} [\w./].*$", text, re.M) -prefix = text[:text.index(status_lines[0])] -suffix = text[(text.index(status_lines[-1]) + len(status_lines[-1])):] -status_lines.sort() -print prefix + "\n".join(status_lines) + suffix.rstrip() -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function merge_sort() { - local INPUT_FILE=$1 - local OUTPUT_FILE=$2 - python -c 'import re, sys -text = sys.stdin.read() -status_lines = [] -for line in text.splitlines(): - if line.startswith("Enter \"y\"") and ": " in line: - head, tail = line.split(": ", 1) - if status_lines: - print "\n".join(sorted(status_lines)) - status_lines = [] - print head + ": " - if tail: - line = tail - if re.search("^.{4} [\w./].*$", line): - status_lines.append(line) - elif status_lines: - print "\n".join(sorted(status_lines)) - print line - status_lines = [] - else: - print line -if status_lines: - print "\n".join(sorted(status_lines)) -' <"$INPUT_FILE" >"$OUTPUT_FILE" -} - -function check_svn_version() { - if ! svn --version | head -1 | grep -q "^svn, version 1\.\(8\|9\)"; then - skip_all "Tests require Subversion 1.8 or 1.9" - exit 0 + if [[ $(trac-admin --version) == trac-admin\ 0.11* ]]; then + TRAC_RESYNC=true + else + TRAC_RESYNC=false fi -} + cat >>"${TRAC_ENV_PATH}/conf/trac.ini" <<'__TRAC_INI___' -function fcm_make_build_hello_tests() { - local TEST_KEY=$1 - local HELLO_EXT=${2:-} - shift 2 - rm -fr \ - .fcm-make \ - build \ - fcm-make-as-parsed.cfg \ - fcm-make-on-success.cfg \ - fcm-make.log - run_pass "$TEST_KEY" fcm make "$@" - file_test "$TEST_KEY.hello$HELLO_EXT" "$PWD/build/bin/hello$HELLO_EXT" - "$PWD/build/bin/hello$HELLO_EXT" >"$TEST_KEY.hello$HELLO_EXT.out" - file_cmp "$TEST_KEY.hello$HELLO_EXT.out" \ - "$TEST_KEY.hello$HELLO_EXT.out" <<'__OUT__' -Hello World! -__OUT__ -} - -FCM_HOME=${FCM_HOME:-$(cd $(dirname $(readlink -f $BASH_SOURCE))/../../.. && pwd)} -export FCM_HOME -PATH=$FCM_HOME/bin:$PATH - -SVN_VERSION_IS_19=false -if svn --version 1>/dev/null 2>&1; then - SVN_VERSION=$(svn --version | \ - sed -n "s/^svn, version \([0-9.]\+\) .*/\1/p") - if [[ $SVN_VERSION =~ "1.9." ]]; then - SVN_VERSION_IS_19=true - fi +[components] +tracopt.versioncontrol.svn.* = enabled +__TRAC_INI___ fi - -TEST_KEY_BASE=$(basename $0 .t) -TEST_SOURCE_DIR=$(cd $(dirname $0) && pwd) -TEST_DIR=$(mktemp -d) -export LC_ALL=C -export LANG=C -cd $TEST_DIR - -set +e +unset ADMIN_DIR +cat >bin/mail <<__BASH__ +#!/bin/bash +{ + echo "\$@" + cat +} >$PWD/mail.out +__BASH__ +chmod +x bin/mail +HOOK_PATH="$PWD/bin:$HOOK_PATH" +cat >"$REPOS_PATH/conf/hooks-env" <<__CONF__ +[default] +FCM_HOME=$FCM_HOME +FCM_SITE_HOME=$PWD +FCM_SVN_HOOK_ADMIN_EMAIL=${FCM_SVN_HOOK_ADMIN_EMAIL:-} +FCM_SVN_HOOK_COMMIT_DUMP_DIR=$PWD/svn-dumps +FCM_SVN_HOOK_NOTIFICATION_FROM=notifications@localhost +FCM_SVN_HOOK_REPOS_SUFFIX=${FCM_SVN_HOOK_REPOS_SUFFIX:-} +FCM_SVN_HOOK_TRAC_ROOT_DIR=${FCM_SVN_HOOK_TRAC_ROOT_DIR:-} +PATH=$HOOK_PATH +__CONF__ diff -Nru fcm-2019.09.0/t/svn-hooks/test_header_more fcm-2021.05.01/t/svn-hooks/test_header_more --- fcm-2019.09.0/t/svn-hooks/test_header_more 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-hooks/test_header_more 1970-01-01 00:00:00.000000000 +0000 @@ -1,120 +0,0 @@ -#!/bin/bash -#------------------------------------------------------------------------------- -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. -# -# This file is part of FCM, tools for managing and building source code. -# -# FCM 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. -# -# FCM 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 FCM. If not, see . -#------------------------------------------------------------------------------- -# NAME -# test_header_more -# -# SYNOPSIS -# . $(dirname $0)/test_header -# . $(dirname $0)/test_header_more -# -# DESCRIPTION -# Provide more bash shell functions for testing svn-hooks. Create a -# subversion repository. Create a Trac environment if possible. Set up -# repository hooks environment file. -# -# FUNCTIONS -# date2datefmt FILE -# Convert date time in YYYY-mm-ddTHH:MM:SSZ format into the format -# string itself. -# poll HOW_LONG COND ... -# Poll for COND to become true for HOW_LONG seconds. -# -# VARIABLES -# FCM_SVN_HOOK_REPOS_SUFFIX -# FCM_SVN_HOOK_ADMIN_EMAIL -# Optional. See definition in hook scripts. -# HOOK_PATH -# PATH for the hook scripts. -# REPOS_PATH -# Path to the Subversion repository ($PWD/svn-repos/foo). -# REPOS_URL -# URL of the Subversion repository root (file://$REPOS_PATH). -# TRAC_ENV_PATH -# Path to the Trac environment ($PWD/trac-env/foo). -# TRAC_RESYNC -# If true, use "trac-admin resync". If false, use "trac-admin -# changeset added|modified". -#------------------------------------------------------------------------------- - -date2datefmt() { - perl -p -e 's/\d+-\d\d-\d\dT\d\d:\d\d:\d\dZ/YYYY-mm-ddTHH:MM:SSZ/' "$@" -} - -poll() { - local HOW_LONG=$1 - shift 1 - local WAIT_UNTIL=$(($(date +%s) + $HOW_LONG)) - while (($(date +%s) < $WAIT_UNTIL)) && ! "$@" 2>/dev/null; do - sleep 1 - done - "$@" -} - -HOOK_PATH='/usr/local/bin:/usr/bin:/bin' -mkdir bin svn-dumps svn-repos trac-env -svnadmin create svn-repos/foo 2>/dev/null \ - || skip_all 'cannot create Subversion repository' -REPOS_PATH="$PWD/svn-repos/foo${FCM_SVN_HOOK_REPOS_SUFFIX:-}" -REPOS_URL="file://$REPOS_PATH" -ADMIN_DIR=$(dirname "$(which svnadmin)") -if ! grep -q '^\(/usr/local/bin\|/usr/bin\|/bin\)$' <<<"$ADMIN_DIR"; then - HOOK_PATH="$ADMIN_DIR:$HOOK_PATH" -fi -if trac-admin trac-env/foo initenv foo sqlite:db/trac.db svn "$REPOS_PATH" \ - 1>/dev/null 2>&1 -then - FCM_SVN_HOOK_TRAC_ROOT_DIR="$PWD/trac-env" - TRAC_ENV_PATH="$FCM_SVN_HOOK_TRAC_ROOT_DIR/foo" - ADMIN_DIR=$(dirname "$(which trac-admin)") - if ! grep -q '^\(/usr/local/bin\|/usr/bin\|/bin\)$' <<<"$ADMIN_DIR"; then - HOOK_PATH="$ADMIN_DIR:$HOOK_PATH" - fi - if [[ $(trac-admin --version) == trac-admin\ 0.11* ]]; then - TRAC_RESYNC=true - else - TRAC_RESYNC=false - fi - cat >>"${TRAC_ENV_PATH}/conf/trac.ini" <<'__TRAC_INI___' - -[components] -tracopt.versioncontrol.svn.* = enabled -__TRAC_INI___ -fi -unset ADMIN_DIR -cat >bin/mail <<__BASH__ -#!/bin/bash -{ - echo "\$@" - cat -} >$PWD/mail.out -__BASH__ -chmod +x bin/mail -HOOK_PATH="$PWD/bin:$HOOK_PATH" -cat >"$REPOS_PATH/conf/hooks-env" <<__CONF__ -[default] -FCM_HOME=$FCM_HOME -FCM_SITE_HOME=$PWD -FCM_SVN_HOOK_ADMIN_EMAIL=${FCM_SVN_HOOK_ADMIN_EMAIL:-} -FCM_SVN_HOOK_COMMIT_DUMP_DIR=$PWD/svn-dumps -FCM_SVN_HOOK_NOTIFICATION_FROM=notifications@localhost -FCM_SVN_HOOK_REPOS_SUFFIX=${FCM_SVN_HOOK_REPOS_SUFFIX:-} -FCM_SVN_HOOK_TRAC_ROOT_DIR=${FCM_SVN_HOOK_TRAC_ROOT_DIR:-} -PATH=$HOOK_PATH -__CONF__ diff -Nru fcm-2019.09.0/t/svn-username/00-branch.t fcm-2021.05.01/t/svn-username/00-branch.t --- fcm-2019.09.0/t/svn-username/00-branch.t 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-username/00-branch.t 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # diff -Nru fcm-2019.09.0/t/svn-username/test_header fcm-2021.05.01/t/svn-username/test_header --- fcm-2019.09.0/t/svn-username/test_header 2019-10-02 18:10:56.000000000 +0000 +++ fcm-2021.05.01/t/svn-username/test_header 2021-05-23 12:45:34.000000000 +0000 @@ -1,6 +1,6 @@ #!/bin/bash # ------------------------------------------------------------------------------ -# Copyright (C) 2006-2019 British Crown (Met Office) & Contributors. +# Copyright (C) 2006-2021 British Crown (Met Office) & Contributors. # # This file is part of FCM, tools for managing and building source code. # @@ -24,39 +24,6 @@ . $(dirname $0)/../lib/bash/test_header -function file_cmp() { - local TEST_KEY=$1 - local FILE_ACTUAL=$2 - local FILE_EXPECT=${3:--} - if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_grep() { - local TEST_KEY=$1 - local PATTERN=$2 - local FILE=$3 - if grep -q -e "$PATTERN" $TEST_DIR/$FILE; then - pass $TEST_KEY - return - fi - fail $TEST_KEY -} - -function file_test() { - local TEST_KEY=$1 - local FILE=$2 - local OPTION=${3:--e} - if test $OPTION $TEST_DIR/$FILE; then - pass $TEST_KEY - else - fail $TEST_KEY - fi -} - function file_xxdiff() { local TEST_KEY=$1 local FILE_ACTUAL=$2 @@ -71,7 +38,8 @@ function init_repos() { if [[ -n ${TEST_REMOTE_HOST:-} ]]; then TEST_REMOTE_DIR=$(ssh $TEST_REMOTE_HOST "mktemp -d") - ssh $TEST_REMOTE_HOST "svnadmin create --fs-type fsfs $TEST_REMOTE_DIR" + ssh $TEST_REMOTE_HOST bash -l -c "svnadmin create --fs-type fsfs\ + $TEST_REMOTE_DIR" REPOS_URL="svn+ssh://${TEST_REMOTE_HOST}$TEST_REMOTE_DIR" else svnadmin create --fs-type fsfs $TEST_DIR/test_repos @@ -98,9 +66,8 @@ svnadmin create --fs-type fsfs $TEST_DIR/test_repos REPOS_URL="file://$TEST_DIR/test_repos" fi - svn mkdir -q --parents $REPOS_URL/a/a/0/0/0/trunk svn import -q $TEST_SOURCE_DIR/../etc/repo_files \ - $REPOS_URL/a/a/0/0/0/trunk -m "initial trunk import" + $REPOS_URL/a/a/0/0/0/trunk/ -m "initial trunk import" TMPFILE=$(mktemp) cat >$TMPFILE <<__LAYOUT__ depth-project = 5 @@ -158,56 +125,92 @@ fi init_branch_wc $BRANCH_NAME $REPOS_URL cd $TEST_DIR/wc - file_list=$(find . -type f | sed "/\.svn/d" | sort | head -5) - other_file=$(find . -type f | sed "/\.svn/d" | sort | tail -1) - for file in $file_list; do - sed -i "s/for/FOR/g; s/fi/end if/g; s/in/IN/g;" $file - sed -i "/#/d; /^ *!/d" $file - sed -i "s/!/!!/g; s/q/\nq/g; s/[(]/(\n/g" $file + modify_files="lib/python/info/__init__.py lib/python/info/poems.py \ + module/hello_constants.f90 module/hello_constants.inc \ + module/hello_constants_dummy.inc" + for file in $modify_files; do + sed -i "s/for/FOR/g; s/fi/end if/g; s/in/IN/g;" "$file" + sed -i "/#/d; /^ *!/d" "$file" + sed -i "s/!/!!/g; s/q/\nq/g; s/[(]/(\n/g" "$file" done - file_dir=$(dirname $file) - svn copy -q $file ./added_file - svn copy -q module added_directory - touch module/tree_conflict_file - svn add -q $file_dir/tree_conflict_file - echo "Modified a line" >>$other_file + copy_file="module/hello_constants_dummy.inc" + copy_file_dir=$(dirname "$copy_file") + svn copy -q "$copy_file" "./added_file" + svn copy -q "$copy_file_dir" "added_directory" + touch "$copy_file_dir/tree_conflict_file" + append_line_file="subroutine/hello_sub_dummy.h" + svn add -q "$copy_file_dir/tree_conflict_file" + echo "Modified a line" >>$append_line_file svn commit -q -m "Made changes for future merge of this branch" svn update -q init_branch $OTHER_BRANCH_NAME $REPOS_URL svn switch -q $ROOT_URL/branches/dev/Share/$OTHER_BRANCH_NAME echo " " > unversioned_file - properties_file=$(find . -type f | sed " /\.svn/d" | sort | tail -3 | head -1) + properties_file="subroutine/hello_sub.h" svn propset -q svn:executable "executable" $properties_file - svn copy -q $file renamed_added_file + other_copy_file="module/hello_constants_dummy.inc" + svn copy -q "$other_copy_file" "renamed_added_file" svn commit -q -m "Made changes for future merge" svn update -q svn switch -q $ROOT_URL/trunk - echo "trunk change" >>$(find . -type f | sed "/\.svn/d" | sort | head -1) + trunk_change_file="lib/python/info/__init__.py" + echo "trunk change" >>"$trunk_change_file" svn commit -q -m "Made trunk change" svn update -q - echo "another trunk change" >>$(find . -type f | sed "/\.svn/d" | sort | head -1) + echo "another trunk change" >>"$trunk_change_file" svn commit -q -m "Made another trunk change" svn update -q } -function run_pass() { - local TEST_KEY=$1 - shift 1 - if ! "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return - fi - pass $TEST_KEY -} - -function run_fail() { - local TEST_KEY=$1 - shift 1 - if "$@" 1>$TEST_DIR/$TEST_KEY.out 2>$TEST_DIR/$TEST_KEY.err; then - fail $TEST_KEY - return +function get_results() { + local RESULT_KEY=$1 + local RESULTS_FILE=$2 + local BEGIN="^begin-$RESULT_KEY$" + local END="^end-$RESULT_KEY$" + local RESULTS_TEMP=$(mktemp) + sed -n "/$BEGIN/,/$END/{/$BEGIN\|$END/d; p;}" $RESULTS_FILE >$RESULTS_TEMP + echo $RESULTS_TEMP +} + +function test_mergeinfo() { + local TEST_INFO_NAME="$1-svn-mergeinfo" + local DIFF_BRANCH=$2 + local INPUT_RESULTS_FILE=${3:--} + local WC_REVISION=${4:-WC} + if [[ $SVN_MINOR_VERSION != "1.8" ]]; then + WC_REVISION=WC + elif (( WC_REVISION < 10 )); then + WC_REVISION="$WC_REVISION " + fi + local RESULTS_FILE=$(mktemp) + sed "s/^\(.\{23\}\)WC/\1$WC_REVISION/" "$INPUT_RESULTS_FILE" \ + >"$RESULTS_FILE" + # Test svn:mergeinfo property. + TEST_KEY=$TEST_INFO_NAME-prop + PROP_RESULT_TEXT=$(cat <$(get_results prop $RESULTS_FILE)) + if [[ -n "$PROP_RESULT_TEXT" ]]; then + run_pass "$TEST_KEY" svn propget svn:mergeinfo . + file_cmp "$TEST_KEY.out" "$TEST_KEY.out" <$(get_results prop $RESULTS_FILE) + file_cmp "$TEST_KEY.err" "$TEST_KEY.err"