[fcm] 06/16: New upstream release 2015.11.0
Alastair McKinstry
mckinstry at moszumanska.debian.org
Tue Nov 1 12:16:28 UTC 2016
This is an automated email from the git hooks/post-receive script.
mckinstry pushed a commit to branch debian/master
in repository fcm.
commit 9e9b41e578ab432e0d86f903f699595eeab9ecab
Author: Alastair McKinstry <mckinstry at debian.org>
Date: Fri Dec 4 18:24:35 2015 +0000
New upstream release 2015.11.0
---
CHANGES.md | 16 +++++++++++
doc/etc/fcm-version.js | 2 +-
lib/FCM/System/Make/Build/FileType/C.pm | 2 +-
lib/FCM/Util/Locator/FS.pm | 4 +--
lib/FCM1/CmBranch.pm | 4 +--
sbin/post-revprop-change-bg | 2 +-
t/fcm-make/49-build-c-more.t | 50 +++++++++++++++++++++++++++++++++
t/fcm-make/49-build-c-more/fcm-make.cfg | 4 +++
t/fcm-make/49-build-c-more/src/greet.c | 4 +++
t/fcm-make/49-build-c-more/src/hello.c | 5 ++++
t/fcm-make/49-build-c-more/src/hi.c | 5 ++++
t/fcm-merge/01-complex.t | 3 +-
t/fcm-switch/00-simple.t | 3 +-
t/fcm-switch/01-subtree.t | 3 +-
t/fcm-switch/test_header | 2 +-
t/fcm-update/00-simple.t | 6 ++--
t/fcm-update/01-subtree.t | 6 ++--
t/fcm-update/test_header | 2 +-
t/lib/bash/test_header | 8 ++++++
19 files changed, 115 insertions(+), 16 deletions(-)
diff --git a/CHANGES.md b/CHANGES.md
index 9913a5b..e80c993 100644
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -5,6 +5,22 @@ for a full listing of issues for each release.
--------------------------------------------------------------------------------
+## 2015.11.0 (2015-11-17)
+
+FCM release 30. Minor update.
+
+### Noteworthy Changes
+
+[#208](https://github.com/metomi/fcm/pull/208):
+fcm make: build: now recognises more patterns as indicators of the existence of
+a main program in a C source file.
+
+[#207](https://github.com/metomi/rose/pull/207):
+fcm test-battery: now runs correctly in the absence of site/user configuration
+on recent Ubuntu distros.
+
+--------------------------------------------------------------------------------
+
## 2015.10.0 (2015-10-15)
FCM release 29. Minor update.
diff --git a/doc/etc/fcm-version.js b/doc/etc/fcm-version.js
index b4b3d48..025f4f2 100644
--- a/doc/etc/fcm-version.js
+++ b/doc/etc/fcm-version.js
@@ -1 +1 @@
-FCM.VERSION="2015.10.0";
+FCM.VERSION="2015.11.0";
diff --git a/lib/FCM/System/Make/Build/FileType/C.pm b/lib/FCM/System/Make/Build/FileType/C.pm
index b170d27..bd530d0 100644
--- a/lib/FCM/System/Make/Build/FileType/C.pm
+++ b/lib/FCM/System/Make/Build/FileType/C.pm
@@ -33,7 +33,7 @@ use File::Basename qw{basename};
my $RE_FILE = qr{[\w\-+.]+}imsx;
# RE: main program
-my $RE_MAIN = qr{int\s*main\b}msx;
+my $RE_MAIN = qr{\A\s*(?:int|void)?\s*main\b\s*\(?}msx;
my %SOURCE_ANALYSE_DEP_OF = (
include => sub { $_[0] =~ qr{\A\#\s*include\s+"($RE_FILE)"}msx },
diff --git a/lib/FCM/Util/Locator/FS.pm b/lib/FCM/Util/Locator/FS.pm
index 58ce9c9..bd302d2 100644
--- a/lib/FCM/Util/Locator/FS.pm
+++ b/lib/FCM/Util/Locator/FS.pm
@@ -49,14 +49,14 @@ sub _cat {
my ($attrib_ref, $value, @paths) = @_;
_parse(
$attrib_ref,
- File::Spec->catfile(_parse($attrib_ref, $value), @paths),
+ File::Spec->catfile(scalar(_parse($attrib_ref, $value)), @paths),
);
}
# Returns the directory name of $value.
sub _dir {
my ($attrib_ref, $value) = @_;
- dirname(_parse($attrib_ref, $value));
+ dirname(scalar(_parse($attrib_ref, $value)));
}
# Searches directory tree.
diff --git a/lib/FCM1/CmBranch.pm b/lib/FCM1/CmBranch.pm
index 452fb13..c92d3ec 100644
--- a/lib/FCM1/CmBranch.pm
+++ b/lib/FCM1/CmBranch.pm
@@ -963,7 +963,7 @@ sub _report_merges {
if ($self->config->verbose) {
# Verbose mode, print the log of each revision
- for my $key (keys %avail) {
+ for my $key (sort keys %avail) {
next unless @{ $avail{$key} };
$return .= $indent . $key . "\n";
@@ -977,7 +977,7 @@ sub _report_merges {
} else {
# Normal mode, print only the revisions
- for my $key (keys %avail) {
+ for my $key (sort keys %avail) {
next unless @{ $avail{$key} };
$return .= $indent . $key . ' ' . join (' ', @{ $avail{$key} }) . "\n";
diff --git a/sbin/post-revprop-change-bg b/sbin/post-revprop-change-bg
index 9e804bb..1226241 100755
--- a/sbin/post-revprop-change-bg
+++ b/sbin/post-revprop-change-bg
@@ -89,7 +89,7 @@ main() {
if [[ -n ${FCM_SVN_HOOK_NOTIFICATION_FROM:-} ]]; then
FROM="-r${FCM_SVN_HOOK_NOTIFICATION_FROM:-}"
fi
- ADDRS=$(fcm-user-to-email "$REV_AUTHOR" "$PROP_AUTHOR")
+ ADDRS=$(fcm-user-to-email "$REV_AUTHOR" "$PROP_AUTHOR" 2>'/dev/null')
mail "$FROM" "$SUBJECT" "$ADDRS" <"$DIFF_FILE" || true
fi
rm -f "$OLD_FILE" "$DIFF_FILE"
diff --git a/t/fcm-make/49-build-c-more.t b/t/fcm-make/49-build-c-more.t
new file mode 100755
index 0000000..7353fc7
--- /dev/null
+++ b/t/fcm-make/49-build-c-more.t
@@ -0,0 +1,50 @@
+#!/bin/bash
+#-------------------------------------------------------------------------------
+# (C) British Crown Copyright 2006-15 Met Office.
+#
+# 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 <http://www.gnu.org/licenses/>.
+#-------------------------------------------------------------------------------
+# Test build C source file with mixed case name and has main function.
+#-------------------------------------------------------------------------------
+. "$(dirname "$0")/test_header"
+#-------------------------------------------------------------------------------
+tests 8
+cp -r "${TEST_SOURCE_DIR}/${TEST_KEY_BASE}/"* '.'
+#-------------------------------------------------------------------------------
+TEST_KEY="${TEST_KEY_BASE}"
+run_pass "${TEST_KEY}" fcm make
+grep '^\[info\] target ' fcm-make.log >"${TEST_KEY}.target.log"
+file_cmp "${TEST_KEY}.target.log" "${TEST_KEY}.target.log" <<'__LOG__'
+[info] target hi
+[info] target - hi.o
+[info] target hello
+[info] target - hello.o
+[info] target greet
+[info] target - greet.o
+__LOG__
+
+"${PWD}/build/bin/greet" >"${TEST_KEY}.greet.out"
+run_pass "${TEST_KEY}.greet.rc" test $? -eq 12
+file_cmp "${TEST_KEY}.greet.out" "${TEST_KEY}.greet.out" <<<'Greet World'
+
+run_pass "${TEST_KEY}.hello" "${PWD}/build/bin/hello"
+file_cmp "${TEST_KEY}.hello.out" "${TEST_KEY}.hello.out" <<<'Hello World'
+
+"${PWD}/build/bin/hi" >"${TEST_KEY}.hi.out"
+run_pass "${TEST_KEY}.hi.rc" test $? -eq 9
+file_cmp "${TEST_KEY}.hi.out" "${TEST_KEY}.hi.out" <<<'Hi World'
+#-------------------------------------------------------------------------------
+exit 0
diff --git a/t/fcm-make/49-build-c-more/fcm-make.cfg b/t/fcm-make/49-build-c-more/fcm-make.cfg
new file mode 100644
index 0000000..9216a4d
--- /dev/null
+++ b/t/fcm-make/49-build-c-more/fcm-make.cfg
@@ -0,0 +1,4 @@
+steps=build
+build.source=$HERE/src
+build.target{task}=link
+build.prop{file-ext.bin}=
diff --git a/t/fcm-make/49-build-c-more/src/greet.c b/t/fcm-make/49-build-c-more/src/greet.c
new file mode 100644
index 0000000..300016d
--- /dev/null
+++ b/t/fcm-make/49-build-c-more/src/greet.c
@@ -0,0 +1,4 @@
+#include <stdio.h>
+void main(void) {
+ printf("Greet World\n");
+}
diff --git a/t/fcm-make/49-build-c-more/src/hello.c b/t/fcm-make/49-build-c-more/src/hello.c
new file mode 100644
index 0000000..ccd6fe0
--- /dev/null
+++ b/t/fcm-make/49-build-c-more/src/hello.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+int main(void) {
+ printf("Hello World\n");
+ return 0;
+}
diff --git a/t/fcm-make/49-build-c-more/src/hi.c b/t/fcm-make/49-build-c-more/src/hi.c
new file mode 100644
index 0000000..a4fbf72
--- /dev/null
+++ b/t/fcm-make/49-build-c-more/src/hi.c
@@ -0,0 +1,5 @@
+#include <stdio.h>
+void
+main(void) {
+ printf("Hi World\n");
+}
diff --git a/t/fcm-merge/01-complex.t b/t/fcm-merge/01-complex.t
index 94a1985..80c63fb 100644
--- a/t/fcm-merge/01-complex.t
+++ b/t/fcm-merge/01-complex.t
@@ -1233,7 +1233,8 @@ U module/hello_constants_dummy.inc
U subroutine/hello_sub_dummy.h
-------------------------------------------------------------------------dry-run
Would you like to go ahead with the merge?
-Enter "y" or "n" (or just press <return> for "n"): Merge succeeded.
+Enter "y" or "n" (or just press <return> for "n"):
+Merge succeeded.
--------------------------------------------------------------------------actual
--- Merging r4 through r13 into '.':
U .
diff --git a/t/fcm-switch/00-simple.t b/t/fcm-switch/00-simple.t
index 7d9112a..bf753a5 100644
--- a/t/fcm-switch/00-simple.t
+++ b/t/fcm-switch/00-simple.t
@@ -39,8 +39,9 @@ file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
switch: status of "$TEST_DIR/wc":
? unversioned_file
switch: continue?
-Enter "y" or "n" (or just press <return> for "n"): D added_file
+Enter "y" or "n" (or just press <return> for "n"):
D added_directory
+D added_file
D module/tree_conflict_file
U lib/python/info/__init__.py
U lib/python/info/poems.py
diff --git a/t/fcm-switch/01-subtree.t b/t/fcm-switch/01-subtree.t
index 1569c5f..e6b2d04 100644
--- a/t/fcm-switch/01-subtree.t
+++ b/t/fcm-switch/01-subtree.t
@@ -42,8 +42,9 @@ file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
switch: status of "$TEST_DIR/wc":
? $TEST_DIR/wc/unversioned_file
switch: continue?
-Enter "y" or "n" (or just press <return> for "n"): D $TEST_DIR/wc/added_file
+Enter "y" or "n" (or just press <return> for "n"):
D $TEST_DIR/wc/added_directory
+D $TEST_DIR/wc/added_file
D tree_conflict_file
U $TEST_DIR/wc/lib/python/info/__init__.py
U $TEST_DIR/wc/lib/python/info/poems.py
diff --git a/t/fcm-switch/test_header b/t/fcm-switch/test_header
index 6d52eac..3824eb5 100644
--- a/t/fcm-switch/test_header
+++ b/t/fcm-switch/test_header
@@ -28,7 +28,7 @@ function file_cmp() {
local TEST_KEY=$1
local FILE_ACTUAL=$2
local FILE_EXPECT=${3:--}
- if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then
+ if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then
pass $TEST_KEY
return
fi
diff --git a/t/fcm-update/00-simple.t b/t/fcm-update/00-simple.t
index 0b1c7a2..e2683fd 100644
--- a/t/fcm-update/00-simple.t
+++ b/t/fcm-update/00-simple.t
@@ -41,7 +41,8 @@ file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
update: status of ".":
? unversioned_file
update: continue?
-Enter "y" or "n" (or just press <return> for "n"): Updating '.':
+Enter "y" or "n" (or just press <return> for "n"):
+Updating '.':
D added_directory
D added_file
D module/tree_conflict_file
@@ -83,7 +84,8 @@ merge_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out"
file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
update: status of ".":
update: continue?
-Enter "y" or "n" (or just press <return> for "n"): Updating '.':
+Enter "y" or "n" (or just press <return> for "n"):
+Updating '.':
A added_directory
A added_directory/hello_constants.f90
A added_directory/hello_constants.inc
diff --git a/t/fcm-update/01-subtree.t b/t/fcm-update/01-subtree.t
index 42b8d44..2b0e043 100644
--- a/t/fcm-update/01-subtree.t
+++ b/t/fcm-update/01-subtree.t
@@ -42,7 +42,8 @@ file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
update: status of "$TEST_DIR/wc":
? $TEST_DIR/wc/unversioned_file
update: continue?
-Enter "y" or "n" (or just press <return> for "n"): Updating '$TEST_DIR/wc':
+Enter "y" or "n" (or just press <return> for "n"):
+Updating '$TEST_DIR/wc':
D $TEST_DIR/wc/added_directory
D $TEST_DIR/wc/added_file
D tree_conflict_file
@@ -84,7 +85,8 @@ merge_sort "$TEST_DIR/$TEST_KEY.out" "$TEST_DIR/$TEST_KEY.sorted.out"
file_cmp "$TEST_KEY.sorted.out" "$TEST_KEY.sorted.out" <<__OUT__
update: status of "$TEST_DIR/wc":
update: continue?
-Enter "y" or "n" (or just press <return> for "n"): Updating '$TEST_DIR/wc':
+Enter "y" or "n" (or just press <return> for "n"):
+Updating '$TEST_DIR/wc':
A $TEST_DIR/wc/added_directory
A $TEST_DIR/wc/added_directory/hello_constants.f90
A $TEST_DIR/wc/added_directory/hello_constants.inc
diff --git a/t/fcm-update/test_header b/t/fcm-update/test_header
index 6d52eac..3824eb5 100644
--- a/t/fcm-update/test_header
+++ b/t/fcm-update/test_header
@@ -28,7 +28,7 @@ function file_cmp() {
local TEST_KEY=$1
local FILE_ACTUAL=$2
local FILE_EXPECT=${3:--}
- if cmp $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT; then
+ if diff -u $TEST_DIR/$FILE_ACTUAL $FILE_EXPECT >&2; then
pass $TEST_KEY
return
fi
diff --git a/t/lib/bash/test_header b/t/lib/bash/test_header
index 30213c4..6e28431 100644
--- a/t/lib/bash/test_header
+++ b/t/lib/bash/test_header
@@ -232,6 +232,14 @@ function merge_sort() {
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:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/fcm.git
More information about the debian-science-commits
mailing list