You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ea...@apache.org on 2019/11/27 17:10:23 UTC

[qpid-dispatch] branch eallen-DISPATCH-1385 updated (2503d3e -> 76afa7d)

This is an automated email from the ASF dual-hosted git repository.

eallen pushed a change to branch eallen-DISPATCH-1385
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git.


    from 2503d3e  ignoring dev support files for mvn rat check
     new c03d822  Adding back /bin that was inadvertantly removed
     new 74b55ff  Moving console ignores together
     new e646083  Updating the default title and description
     new 76afa7d  Removing redundant LICENSE

The 4 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .gitignore                                         |   4 +-
 bin/export.sh                                      | 105 ++++++
 .reviewboardrc => bin/find_ports.sh                |   8 +-
 bin/grinder                                        | 370 +++++++++++++++++++++
 bin/make_standalone_console_tarball.sh             | 107 ++++++
 .../management/__init__.py => bin/rebuild.sh       |  13 +-
 bin/record-coverage.sh                             |  80 +++++
 config.sh => bin/test.sh                           |  30 +-
 console/react/LICENSE                              | 201 -----------
 console/react/public/manifest.json                 |   4 +-
 10 files changed, 704 insertions(+), 218 deletions(-)
 create mode 100755 bin/export.sh
 copy .reviewboardrc => bin/find_ports.sh (72%)
 mode change 100644 => 100755
 create mode 100755 bin/grinder
 create mode 100755 bin/make_standalone_console_tarball.sh
 copy python/qpid_dispatch_internal/management/__init__.py => bin/rebuild.sh (79%)
 mode change 100644 => 100755
 create mode 100755 bin/record-coverage.sh
 copy config.sh => bin/test.sh (56%)
 delete mode 100644 console/react/LICENSE


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-dispatch] 03/04: Updating the default title and description

Posted by ea...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eallen pushed a commit to branch eallen-DISPATCH-1385
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit e646083e89afc6354192d809575bb5eec68f795f
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Wed Nov 27 12:09:04 2019 -0500

    Updating the default title and description
---
 console/react/public/manifest.json | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/console/react/public/manifest.json b/console/react/public/manifest.json
index 1f2f141..5a4ec0b 100644
--- a/console/react/public/manifest.json
+++ b/console/react/public/manifest.json
@@ -1,6 +1,6 @@
 {
-  "short_name": "React App",
-  "name": "Create React App Sample",
+  "short_name": "Dispatch Console",
+  "name": "Console for Apache Qpid Dispatch Router",
   "icons": [
     {
       "src": "favicon.ico",


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-dispatch] 01/04: Adding back /bin that was inadvertantly removed

Posted by ea...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eallen pushed a commit to branch eallen-DISPATCH-1385
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit c03d8227eda88cf979575fc44bcba1a076df8872
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Wed Nov 27 12:05:34 2019 -0500

    Adding back /bin that was inadvertantly removed
---
 bin/export.sh                          | 105 ++++++++++
 bin/find_ports.sh                      |  28 +++
 bin/grinder                            | 370 +++++++++++++++++++++++++++++++++
 bin/make_standalone_console_tarball.sh | 107 ++++++++++
 bin/rebuild.sh                         |  31 +++
 bin/record-coverage.sh                 |  80 +++++++
 bin/test.sh                            |  43 ++++
 7 files changed, 764 insertions(+)

diff --git a/bin/export.sh b/bin/export.sh
new file mode 100755
index 0000000..539af90
--- /dev/null
+++ b/bin/export.sh
@@ -0,0 +1,105 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# export.sh - Create a release archive.
+
+# run this script like this - 
+# Before executing this script, change directory to the folder in which this file is located, for example.
+#   1. cd /home/jdoe/qpid-dispatch/bin
+# Run the script like so - 
+#  2. ./export.sh <output_folder-full-path> <tag-name> 
+#  (Example : ./export.sh /home/jdoe/ 1.5.1 
+#  (/home/jdoe is the folder you want the tar.gz file to be put - specify the full path) 
+#  1.5.1 is the tag name
+# A file named qpid-dispatch-<tag-name>.tar.gz will be created at <output_folder-full-path>
+
+# Simply running ./export.sh will put the tar.gz file in the current folder and use the very latest createed tag 
+
+set -e
+trap "cleanup" 0 1 2 3 9 11 13 15
+
+# ME=export.sh
+ME=$(basename ${0})
+
+SRC=$(dirname $(dirname $(readlink -f $0)))
+echo Source directory=${SRC}
+
+usage()
+{
+    echo
+    echo "Usage: ${ME} [DIR] [TAG]"
+    exit 1
+}
+
+cleanup()
+{
+    trap - 0 1 2 3 9 11 13 15
+    echo
+    [ ${WORKDIR} ] && [ -d ${WORKDIR} ] && rm -rf ${WORKDIR}
+}
+
+
+DIR=$PWD
+
+# This will get the latest created tag
+TAG=$(git describe --tags --always)
+echo Using tag ${TAG} to create archive
+
+##
+## Allow overrides to be passed on the cmdline
+##
+if [ $# -gt 2 ]; then
+    usage
+elif [ $# -ge 1 ]; then
+    DIR=$1
+    if [ $# -eq 2 ]; then
+        TAG=$2
+    fi
+fi
+
+# verify the tag exists
+git rev-list -1 tags/${TAG} -- >/dev/null || usage
+
+# mktemp command creates a temp directory for example - /tmp/tmp.k8vDddIzni
+WORKDIR=$(mktemp -d)
+echo Working Directory=${WORKDIR}
+
+
+##
+## Create the archive
+##
+(
+    cd ${SRC}
+    MTIME=$(date -d @`git log -1 --pretty=format:%ct tags/${TAG}` '+%Y-%m-%d %H:%M:%S')
+    VERSION=$(git show tags/${TAG}:VERSION.txt)
+    ARCHIVE=$DIR/qpid-dispatch-${VERSION}.tar.gz
+    PREFIX=qpid-dispatch-${VERSION}
+    [ -d ${WORKDIR} ] || mkdir -p ${WORKDIR}
+    git archive --format=tar --prefix=${PREFIX}/ tags/${TAG} \
+        | tar -x -C ${WORKDIR}
+    cd ${WORKDIR}
+    tar -c -z \
+        --owner=root --group=root --numeric-owner \
+        --mtime="${MTIME}" \
+        -f ${ARCHIVE} ${PREFIX}
+    echo Created "${ARCHIVE}"
+    echo Success!!!
+)
diff --git a/bin/find_ports.sh b/bin/find_ports.sh
new file mode 100755
index 0000000..4c1239e
--- /dev/null
+++ b/bin/find_ports.sh
@@ -0,0 +1,28 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+
+# Usage: $0 [ dir ]
+# Find all the listening ports mentioned in *.log files under dir.
+# With no dir search under current directory.
+
+find "$@" -name '*.log' | xargs gawk 'match($0, /Listening on .* ([0-9]+)/, m) { print m[1] } match($0, /Configured Listener: .*:([0-9]+)/, m) { print m[1] }'
+
diff --git a/bin/grinder b/bin/grinder
new file mode 100755
index 0000000..9a4aa77
--- /dev/null
+++ b/bin/grinder
@@ -0,0 +1,370 @@
+#!/usr/bin/python
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+#
+# a tool for post-processing Valgrind output from the unit tests
+# Use:
+#    1) configure the build to use valgrind and output xml
+#       $ cmake .. -DUSE_VALGRIND=Yes -DVALGRIND_XML=Yes
+#    2) build and run the unit tests
+#       $ make && make test
+#    3) run grinder from your build directory.  It will look for valgrind xml
+#       files named "valgrind-*.xml in the current directory and all
+#       subdirectories and process them. Output is sent to stdout
+#       $ ../bin/grinder
+#
+# Note: be sure to clean the build directory before running the unit tests
+# to remove old valgrind-*.xml files
+#
+
+import logging
+import os
+import re
+import sys
+import xml.etree.ElementTree as ET
+from xml.etree.ElementTree import ParseError
+
+
+class Frame(object):
+    """
+    Represents info for a single stack frame
+    """
+    FIELDS = ["fn", "dir", "file", "line"]
+    def __init__(self, frame):
+        self._fields = dict()
+        for tag in self.FIELDS:
+            _ = frame.find(tag)
+            self._fields[tag] = _.text if _ is not None else "<none>"
+
+    def __str__(self):
+        return ("(%s) %s/%s:%s" %
+                (self._fields['fn'],
+                 self._fields['dir'],
+                 self._fields['file'],
+                 self._fields['line']))
+
+    def __hash__(self):
+        return hash(self.__str__())
+
+
+class ErrorBase(object):
+    """
+    Base class representing a single valgrind error
+    """
+    def __init__(self, kind):
+        self.kind = kind
+        self.count = 1
+
+    def __hash__(self):
+        return hash(self.kind)
+
+    def __str__(self):
+        return "kind = %s  (count=%d)" % (self.kind, self.count)
+
+    def merge(self, other):
+        self.count += other.count
+
+    def __lt__(self, other):
+        return self.count < other.count
+    def __le__(self, other):
+        return self.count <= other.count
+    def __eq__(self, other):
+        return self.count == other.count
+    def __gt__(self, other):
+        return self.count > other.count
+    def __ge__(self, other):
+        return self.count >= other.count
+
+
+class GeneralError(ErrorBase):
+    """
+    For simple single stack errors
+    """
+    def __init__(self, error_xml):
+        kind = error_xml.find("kind").text
+        super(GeneralError, self).__init__(kind)
+        w = error_xml.find("what")
+        self._what = w.text if w is not None else "<none>"
+
+        # stack
+        self._stack = list()
+        s = error_xml.find("stack")
+        for frame in s.findall("frame"):
+            self._stack.append(Frame(frame))
+
+    def __hash__(self):
+        h = super(GeneralError, self).__hash__()
+        for f in self._stack:
+            h += hash(f)
+        return h
+
+    def __str__(self):
+        s = super(GeneralError, self).__str__() + "\n"
+        if self._what:
+            s += self._what + "\n"
+        s += "Stack:"
+        for frame in self._stack:
+            s += "\n  %s" % str(frame)
+        return s
+
+
+class LeakError(ErrorBase):
+    def __init__(self, error_xml):
+        kind = error_xml.find("kind").text
+        assert(kind.startswith("Leak_"))
+        super(LeakError, self).__init__(kind)
+        self._leaked_bytes = 0
+        self._leaked_blocks = 0
+        self._stack = list()
+
+        # xwhat:
+        #    leakedbytes
+        #    leakedblocks
+        lb = error_xml.find("xwhat/leakedbytes")
+        if lb is not None:
+            self._leaked_bytes = int(lb.text)
+        lb = error_xml.find("xwhat/leakedblocks")
+        if lb is not None:
+            self._leaked_blocks = int(lb.text)
+
+        # stack
+        s = error_xml.find("stack")
+        for frame in s.findall("frame"):
+            self._stack.append(Frame(frame))
+
+    def merge(self, other):
+        super(LeakError, self).merge(other)
+        self._leaked_bytes += other._leaked_bytes
+        self._leaked_blocks += other._leaked_blocks
+
+    def __hash__(self):
+        h = super(LeakError, self).__hash__()
+        for f in self._stack:
+            h += hash(f)
+        return h
+
+    def __str__(self):
+        s = super(LeakError, self).__str__() + "\n"
+        s += "Leaked Bytes = %d Blocks = %d\n" % (self._leaked_bytes,
+                                                  self._leaked_blocks)
+        s += "Stack:"
+        for frame in self._stack:
+            s += "\n  %s" % str(frame)
+        return s
+
+
+class InvalidMemError(ErrorBase):
+    def __init__(self, error_xml):
+        kind = error_xml.find("kind").text
+        super(InvalidMemError, self).__init__(kind)
+        # expect
+        #  what
+        #  stack  (invalid access)
+        #  followed by zero or more:
+        #      aux what  (aux stack description)
+        #      aux stack  (where alloced, freed)
+        self._what = "<none>"
+        self._stack = None
+        self._auxwhat = list()
+        self._aux_stacks = list()
+        for child in error_xml:
+            if child.tag == "what":
+                self._what = child.text
+            if child.tag == "auxwhat":
+                self._auxwhat.append(child.text)
+            if child.tag == "stack":
+                stack = list()
+                for frame in child.findall("frame"):
+                    stack.append(Frame(frame))
+                if self._stack == None:
+                    self._stack = stack
+                else:
+                    self._aux_stacks.append(stack)
+
+    def __hash__(self):
+        # for now don't include what/auxwhat as it may
+        # be different for the same codepath
+        h = super(InvalidMemError, self).__hash__()
+        for f in self._stack:
+            h += hash(f)
+        for s in self._aux_stacks:
+            for f in s:
+                h += hash(f)
+        return h
+
+    def __str__(self):
+        s = super(InvalidMemError, self).__str__() + "\n"
+        s += "%s\n" % self._what
+        s += "Stack:"
+        for frame in self._stack:
+            s += "\n  %s" % str(frame)
+
+        for what, stack in zip(self._auxwhat, self._aux_stacks):
+            s += "\n%s:" % what
+            for frame in stack:
+                s += "\n  %s" % str(frame)
+        return s
+
+
+class SignalError(ErrorBase):
+    def __init__(self, error_xml):
+        super(SignalError, self).__init__("FatalSignal")
+        # expects:
+        #  signo
+        #  signame
+        #  stack
+        self._signo = "<none>"
+        sn = error_xml.find("signo")
+        if sn is not None:
+            self._signo = sn.text
+        self._signame = "<none>"
+        sn = error_xml.find("signame")
+        if sn is not None:
+            self._signame = sn.text
+
+        self._stack = list()
+        s = error_xml.find("stack")
+        for frame in s.findall("frame"):
+            self._stack.append(Frame(frame))
+
+    def __hash__(self):
+        # for now don't include what/auxwhat as it may
+        # be different for the same codepath
+        h = super(SignalError, self).__hash__()
+        h += hash(self._signo)
+        h += hash(self._signame)
+        for f in self._stack:
+            h += hash(f)
+        return h
+
+    def __str__(self):
+        s = super(SignalError, self).__str__() + "\n"
+        s += "Signal %s (%s)\n" % (self._signo, self._signame)
+        s += "Stack:"
+        for frame in self._stack:
+            s += "\n  %s" % str(frame)
+        return s
+
+
+_ERROR_CLASSES = {
+    'InvalidRead':         InvalidMemError,
+    'InvalidWrite':        InvalidMemError,
+    'Leak_DefinitelyLost': LeakError,
+    'Leak_IndirectlyLost': LeakError,
+    'Leak_PossiblyLost':   LeakError,
+    'Leak_StillReachable': LeakError,
+    'UninitCondition':     GeneralError,
+    'SyscallParam':        GeneralError,
+    'InvalidFree':         InvalidMemError,
+    'FishyValue':          InvalidMemError,
+    # TBD:
+    'InvalidJump': None,
+    'UninitValue': None,
+}
+
+
+def parse_error(error_xml):
+    """
+    Factory that returns an Error instance
+    """
+    kind = error_xml.find("kind").text
+    e_cls = _ERROR_CLASSES.get(kind)
+    if e_cls:
+        return e_cls(error_xml)
+    raise Exception("Unsupported error type %s, please update grinder"
+                    " to handle it" % kind)
+
+
+def parse_xml_file(filename, exe_name='qdrouterd'):
+    """
+    Parse out errors from a valgrind output xml file
+    """
+    logging.debug("Parsing %s", filename)
+    error_list = list()
+    try:
+        root = ET.parse(filename).getroot()
+    except ParseError as exc:
+        if "no element found" not in str(exc):
+            logging.warning("Error parsing %s: %s - skipping",
+                            filename, str(exc))
+        else:
+            logging.debug("No errors found in: %s - skipping",
+                          filename)
+        return error_list
+
+    pv = root.find('protocolversion')
+    if pv is None or not "4" == pv.text:
+        # unsupported xml format version
+        logging.warning("Unsupported format version for %s, skipping...",
+                      filename)
+        return error_list
+
+    pt = root.find('protocoltool')
+    if pt is None or not "memcheck" == pt.text:
+        logging.warning("Not a memcheck file %s, skipping...",
+                        filename)
+        return error_list
+
+    if not exe_name in root.find('args/argv/exe').text:
+        # not from the target executable, skip
+        logging.debug("file %s is not generated from %s, skipping...",
+                      filename, exe_name)
+        return error_list
+
+    for error in root.findall('error'):
+        error_list.append(parse_error(error))
+
+    # sigabort, etc classified as fatal_signal
+    for signal in root.findall("fatal_signal"):
+        error_list.append(SignalError(signal))
+    return error_list
+
+
+def main():
+    errors_map = dict()
+    file_name = re.compile("valgrind-[0-9]+\.xml")
+    for dp, dn, fn in os.walk("."):
+        for name in fn:
+            if file_name.match(name):
+                errors = parse_xml_file(os.path.join(dp, name))
+                for e in errors:
+                    h = hash(e)
+                    if h in errors_map:
+                        # coalesce duplicate errors
+                        errors_map[h].merge(e)
+                    else:
+                        errors_map[h] = e
+
+    # sort by # of occurances
+    error_list = sorted([e for e in errors_map.values()], reverse=True)
+
+    if error_list:
+        for e in error_list:
+            print("\n-----")
+            print("%s" % str(e))
+        print("\n\n-----")
+        print("----- %s total issues detected" % len(error_list))
+        print("-----")
+    else:
+        print("No Valgrind errors found! Congratulations ;)")
+
+
+if __name__ == "__main__":
+    sys.exit(main())
diff --git a/bin/make_standalone_console_tarball.sh b/bin/make_standalone_console_tarball.sh
new file mode 100755
index 0000000..e7f68e8
--- /dev/null
+++ b/bin/make_standalone_console_tarball.sh
@@ -0,0 +1,107 @@
+#!/bin/bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+# export.sh - Create a release archive.
+set -e
+trap "cleanup" 0 1 2 3 9 11 13 15
+
+# ME=export.sh
+ME=$(basename ${0})
+
+SRC=$(dirname $(dirname $(readlink -f $0)))
+echo Source directory=${SRC}
+
+usage()
+{
+    echo
+    echo "Usage: ${ME} [DIR] [TAG]"
+    exit 1
+}
+
+cleanup()
+{
+    trap - 0 1 2 3 9 11 13 15
+    echo
+    [ ${WORKDIR} ] && [ -d ${WORKDIR} ] && rm -rf ${WORKDIR}
+}
+
+
+DIR=$PWD
+
+# This will get the latest created tag
+TAG=$(git describe --tags --always)
+
+##
+## Allow overrides to be passed on the cmdline
+##
+if [ $# -gt 2 ]; then
+    usage
+elif [ $# -ge 1 ]; then
+    DIR=$1
+    if [ $# -eq 2 ]; then
+        TAG=$2
+    fi
+fi
+
+if [ "$DIR" = "." ]; then 
+    DIR=$PWD
+fi
+
+echo Using tag ${TAG} to create archive
+echo File will be output to ${DIR}
+
+# verify the tag exists
+git rev-list -1 tags/${TAG} -- >/dev/null || usage
+
+# mktemp command creates a temp directory for example - /tmp/tmp.k8vDddIzni
+WORKDIR=$(mktemp -d)
+echo Working Directory=${WORKDIR}
+
+
+##
+## Create the archive
+##
+(
+    cd ${SRC}
+    MTIME=$(date -d @`git log -1 --pretty=format:%ct tags/${TAG}` '+%Y-%m-%d %H:%M:%S')
+    VERSION=$(git show tags/${TAG}:VERSION.txt)
+    ARCHIVE=$DIR/qpid-dispatch-console-${VERSION}.tar.gz
+    PREFIX=qpid-dispatch-${VERSION}
+    [ -d ${WORKDIR} ] || mkdir -p ${WORKDIR}
+    git archive --format=tar --prefix=${PREFIX}/ tags/${TAG} \
+        | tar -x -C ${WORKDIR}
+    cd ${WORKDIR}
+    BUILD_DIR=${WORKDIR}/build
+    INSTALL_DIR=${WORKDIR}/install
+    mkdir $BUILD_DIR
+    pushd $BUILD_DIR
+    cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Release ../$PREFIX
+    make install
+    pushd $INSTALL_DIR/share/qpid-dispatch/
+    tar -c -h -z \
+        --owner=root --group=root --numeric-owner \
+        --mtime="${MTIME}" \
+        -f ${ARCHIVE} console
+    popd
+    popd
+    echo Created "${ARCHIVE}"
+    echo Success!!!
+)
diff --git a/bin/rebuild.sh b/bin/rebuild.sh
new file mode 100755
index 0000000..465c103
--- /dev/null
+++ b/bin/rebuild.sh
@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+set -ev
+
+rm -rf $BUILD_DIR
+rm -rf $INSTALL_DIR
+
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+
+cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Debug "$@" $SOURCE_DIR
+make -j4
+make install
diff --git a/bin/record-coverage.sh b/bin/record-coverage.sh
new file mode 100755
index 0000000..33fe278
--- /dev/null
+++ b/bin/record-coverage.sh
@@ -0,0 +1,80 @@
+#! /usr/bin/env bash
+
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License
+#
+
+
+# This script collates coverage data already present from running instrumented code.
+#
+# It requires the lcov tool to be installed (this provides the lcov and genhtml commands)
+#
+# It will produce a coverage analysis for gcc or clang compiled builds and currently for
+# C and C++ parts of the build tree.
+#
+# It takes two command line arguments:
+# - The first is the dispatch router source tree: this is mandatory.
+# - The second is the build tree: this is optional and if not specified is assumed to be the
+#   current directory.
+#
+# The output is in the form of an html report which will be found in the generated html direectory.
+# - There will also be a number of intermediate files left in the current directory.
+#
+# The typical way to use it would be to use the "Coverage" build type to get instrumented
+# code, then to run the tests then to extract the coverage information from running the
+# tests.
+# Something like:
+#   cmake -DCMAKE_BUILD_TYPE=Coverage ..
+#   make
+#   make test
+#   make coverage
+
+# set -x
+
+# get full path
+function getpath {
+  pushd -n $1 > /dev/null
+  echo $(dirs -0 -l)
+  popd -n > /dev/null
+}
+
+SRC=${1?}
+BLD=${2:-.}
+
+BLDPATH=$(getpath $BLD)
+SRCPATH=$(getpath $SRC)
+
+# Get base profile
+# - this initialises 0 counts for every profiled file
+#   without this step any file with no counts at all wouldn't
+#   show up on the final output.
+lcov -c -i -d $BLDPATH -o dispatch-base.info
+
+# Get actual coverage data
+lcov -c -d $BLDPATH -o dispatch-ctest.info
+
+# Total them up
+lcov --add dispatch-base.info --add dispatch-ctest.info > dispatch-total-raw.info
+
+# Snip out stuff in /usr (we don't care about coverage in system code)
+lcov --remove dispatch-total-raw.info "/usr/include*" "/usr/share*" "${SRCPATH}/tests/*" > dispatch-total.info
+
+# Generate report
+rm -rf html
+genhtml -p $SRCPATH -p $BLDPATH dispatch-total.info --title "Dispatch Router Test Coverage" --demangle-cpp -o html
+
diff --git a/bin/test.sh b/bin/test.sh
new file mode 100755
index 0000000..f0fd69b
--- /dev/null
+++ b/bin/test.sh
@@ -0,0 +1,43 @@
+#!/usr/bin/env bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+
+test -z "$SOURCE_DIR" -a -f config.sh && source ./config.sh
+
+if [[ -z "$SOURCE_DIR" ]]; then
+    echo "The devel environment isn't ready.  Run 'source config.sh' from"
+    echo "the base of the dispatch source tree"
+    exit 1
+fi
+
+set -ev
+
+rm -rf $BUILD_DIR
+rm -rf $INSTALL_DIR
+
+mkdir $BUILD_DIR
+cd $BUILD_DIR
+
+cmake -DCMAKE_INSTALL_PREFIX=$INSTALL_DIR -DCMAKE_BUILD_TYPE=Debug ${DISPATCH_CMAKE_EXTRA_ARGS} $SOURCE_DIR
+make -j4
+# Test the build.
+ctest -VV ${DISPATCH_CTEST_EXTRA_ARGS}
+# Run system tests on the install.
+make install
+python $INSTALL_DIR/lib/qpid-dispatch/tests/run_system_tests.py


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-dispatch] 02/04: Moving console ignores together

Posted by ea...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eallen pushed a commit to branch eallen-DISPATCH-1385
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 74b55ffb35c03edb62e11b004cd0ad98333d4bf0
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Wed Nov 27 12:07:21 2019 -0500

    Moving console ignores together
---
 .gitignore | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.gitignore b/.gitignore
index 448a0fb..0714987 100644
--- a/.gitignore
+++ b/.gitignore
@@ -18,12 +18,12 @@ tests/system_tests_handle_failover.py
 .history/
 .tox
 .vscode
+tools/qdmanage
+tools/qdstat
 console/stand-alone/node_modules/
 console/react/node_modules/
 console/stand-alone/dist/
 console/stand-alone/package-lock.json
-tools/qdmanage
-tools/qdstat
 console/react/build/
 console/react/coverage/
 console/react/.prettierrc


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


[qpid-dispatch] 04/04: Removing redundant LICENSE

Posted by ea...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

eallen pushed a commit to branch eallen-DISPATCH-1385
in repository https://gitbox.apache.org/repos/asf/qpid-dispatch.git

commit 76afa7d74a4330057d4c6f451e47a035e188378e
Author: Ernest Allen <ea...@redhat.com>
AuthorDate: Wed Nov 27 12:10:04 2019 -0500

    Removing redundant LICENSE
---
 console/react/LICENSE | 201 --------------------------------------------------
 1 file changed, 201 deletions(-)

diff --git a/console/react/LICENSE b/console/react/LICENSE
deleted file mode 100644
index 261eeb9..0000000
--- a/console/react/LICENSE
+++ /dev/null
@@ -1,201 +0,0 @@
-                                 Apache License
-                           Version 2.0, January 2004
-                        http://www.apache.org/licenses/
-
-   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
-
-   1. Definitions.
-
-      "License" shall mean the terms and conditions for use, reproduction,
-      and distribution as defined by Sections 1 through 9 of this document.
-
-      "Licensor" shall mean the copyright owner or entity authorized by
-      the copyright owner that is granting the License.
-
-      "Legal Entity" shall mean the union of the acting entity and all
-      other entities that control, are controlled by, or are under common
-      control with that entity. For the purposes of this definition,
-      "control" means (i) the power, direct or indirect, to cause the
-      direction or management of such entity, whether by contract or
-      otherwise, or (ii) ownership of fifty percent (50%) or more of the
-      outstanding shares, or (iii) beneficial ownership of such entity.
-
-      "You" (or "Your") shall mean an individual or Legal Entity
-      exercising permissions granted by this License.
-
-      "Source" form shall mean the preferred form for making modifications,
-      including but not limited to software source code, documentation
-      source, and configuration files.
-
-      "Object" form shall mean any form resulting from mechanical
-      transformation or translation of a Source form, including but
-      not limited to compiled object code, generated documentation,
-      and conversions to other media types.
-
-      "Work" shall mean the work of authorship, whether in Source or
-      Object form, made available under the License, as indicated by a
-      copyright notice that is included in or attached to the work
-      (an example is provided in the Appendix below).
-
-      "Derivative Works" shall mean any work, whether in Source or Object
-      form, that is based on (or derived from) the Work and for which the
-      editorial revisions, annotations, elaborations, or other modifications
-      represent, as a whole, an original work of authorship. For the purposes
-      of this License, Derivative Works shall not include works that remain
-      separable from, or merely link (or bind by name) to the interfaces of,
-      the Work and Derivative Works thereof.
-
-      "Contribution" shall mean any work of authorship, including
-      the original version of the Work and any modifications or additions
-      to that Work or Derivative Works thereof, that is intentionally
-      submitted to Licensor for inclusion in the Work by the copyright owner
-      or by an individual or Legal Entity authorized to submit on behalf of
-      the copyright owner. For the purposes of this definition, "submitted"
-      means any form of electronic, verbal, or written communication sent
-      to the Licensor or its representatives, including but not limited to
-      communication on electronic mailing lists, source code control systems,
-      and issue tracking systems that are managed by, or on behalf of, the
-      Licensor for the purpose of discussing and improving the Work, but
-      excluding communication that is conspicuously marked or otherwise
-      designated in writing by the copyright owner as "Not a Contribution."
-
-      "Contributor" shall mean Licensor and any individual or Legal Entity
-      on behalf of whom a Contribution has been received by Licensor and
-      subsequently incorporated within the Work.
-
-   2. Grant of Copyright License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      copyright license to reproduce, prepare Derivative Works of,
-      publicly display, publicly perform, sublicense, and distribute the
-      Work and such Derivative Works in Source or Object form.
-
-   3. Grant of Patent License. Subject to the terms and conditions of
-      this License, each Contributor hereby grants to You a perpetual,
-      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
-      (except as stated in this section) patent license to make, have made,
-      use, offer to sell, sell, import, and otherwise transfer the Work,
-      where such license applies only to those patent claims licensable
-      by such Contributor that are necessarily infringed by their
-      Contribution(s) alone or by combination of their Contribution(s)
-      with the Work to which such Contribution(s) was submitted. If You
-      institute patent litigation against any entity (including a
-      cross-claim or counterclaim in a lawsuit) alleging that the Work
-      or a Contribution incorporated within the Work constitutes direct
-      or contributory patent infringement, then any patent licenses
-      granted to You under this License for that Work shall terminate
-      as of the date such litigation is filed.
-
-   4. Redistribution. You may reproduce and distribute copies of the
-      Work or Derivative Works thereof in any medium, with or without
-      modifications, and in Source or Object form, provided that You
-      meet the following conditions:
-
-      (a) You must give any other recipients of the Work or
-          Derivative Works a copy of this License; and
-
-      (b) You must cause any modified files to carry prominent notices
-          stating that You changed the files; and
-
-      (c) You must retain, in the Source form of any Derivative Works
-          that You distribute, all copyright, patent, trademark, and
-          attribution notices from the Source form of the Work,
-          excluding those notices that do not pertain to any part of
-          the Derivative Works; and
-
-      (d) If the Work includes a "NOTICE" text file as part of its
-          distribution, then any Derivative Works that You distribute must
-          include a readable copy of the attribution notices contained
-          within such NOTICE file, excluding those notices that do not
-          pertain to any part of the Derivative Works, in at least one
-          of the following places: within a NOTICE text file distributed
-          as part of the Derivative Works; within the Source form or
-          documentation, if provided along with the Derivative Works; or,
-          within a display generated by the Derivative Works, if and
-          wherever such third-party notices normally appear. The contents
-          of the NOTICE file are for informational purposes only and
-          do not modify the License. You may add Your own attribution
-          notices within Derivative Works that You distribute, alongside
-          or as an addendum to the NOTICE text from the Work, provided
-          that such additional attribution notices cannot be construed
-          as modifying the License.
-
-      You may add Your own copyright statement to Your modifications and
-      may provide additional or different license terms and conditions
-      for use, reproduction, or distribution of Your modifications, or
-      for any such Derivative Works as a whole, provided Your use,
-      reproduction, and distribution of the Work otherwise complies with
-      the conditions stated in this License.
-
-   5. Submission of Contributions. Unless You explicitly state otherwise,
-      any Contribution intentionally submitted for inclusion in the Work
-      by You to the Licensor shall be under the terms and conditions of
-      this License, without any additional terms or conditions.
-      Notwithstanding the above, nothing herein shall supersede or modify
-      the terms of any separate license agreement you may have executed
-      with Licensor regarding such Contributions.
-
-   6. Trademarks. This License does not grant permission to use the trade
-      names, trademarks, service marks, or product names of the Licensor,
-      except as required for reasonable and customary use in describing the
-      origin of the Work and reproducing the content of the NOTICE file.
-
-   7. Disclaimer of Warranty. Unless required by applicable law or
-      agreed to in writing, Licensor provides the Work (and each
-      Contributor provides its Contributions) on an "AS IS" BASIS,
-      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-      implied, including, without limitation, any warranties or conditions
-      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
-      PARTICULAR PURPOSE. You are solely responsible for determining the
-      appropriateness of using or redistributing the Work and assume any
-      risks associated with Your exercise of permissions under this License.
-
-   8. Limitation of Liability. In no event and under no legal theory,
-      whether in tort (including negligence), contract, or otherwise,
-      unless required by applicable law (such as deliberate and grossly
-      negligent acts) or agreed to in writing, shall any Contributor be
-      liable to You for damages, including any direct, indirect, special,
-      incidental, or consequential damages of any character arising as a
-      result of this License or out of the use or inability to use the
-      Work (including but not limited to damages for loss of goodwill,
-      work stoppage, computer failure or malfunction, or any and all
-      other commercial damages or losses), even if such Contributor
-      has been advised of the possibility of such damages.
-
-   9. Accepting Warranty or Additional Liability. While redistributing
-      the Work or Derivative Works thereof, You may choose to offer,
-      and charge a fee for, acceptance of support, warranty, indemnity,
-      or other liability obligations and/or rights consistent with this
-      License. However, in accepting such obligations, You may act only
-      on Your own behalf and on Your sole responsibility, not on behalf
-      of any other Contributor, and only if You agree to indemnify,
-      defend, and hold each Contributor harmless for any liability
-      incurred by, or claims asserted against, such Contributor by reason
-      of your accepting any such warranty or additional liability.
-
-   END OF TERMS AND CONDITIONS
-
-   APPENDIX: How to apply the Apache License to your work.
-
-      To apply the Apache License to your work, attach the following
-      boilerplate notice, with the fields enclosed by brackets "[]"
-      replaced with your own identifying information. (Don't include
-      the brackets!)  The text should be enclosed in the appropriate
-      comment syntax for the file format. We also recommend that a
-      file or class name and description of purpose be included on the
-      same "printed page" as the copyright notice for easier
-      identification within third-party archives.
-
-   Copyright [yyyy] [name of copyright owner]
-
-   Licensed under the Apache License, Version 2.0 (the "License");
-   you may not use this file except in compliance with the License.
-   You may obtain a copy of the License at
-
-       http://www.apache.org/licenses/LICENSE-2.0
-
-   Unless required by applicable law or agreed to in writing, software
-   distributed under the License is distributed on an "AS IS" BASIS,
-   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-   See the License for the specific language governing permissions and
-   limitations under the License.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org