annotate mxtool/mx @ 5762:b30cced39597

generalized functionality for finding classes based on searching for patterns in source code and moved it from commands.py to mx.py used above functionality to find classes manually excluded from JaCoCo processing
author Doug Simon <doug.simon@oracle.com>
date Wed, 04 Jul 2012 21:56:48 +0200
parents 71a2cd79c375
children a607682f7ba6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3723
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
1 #!/bin/bash
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
2 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
3 # ----------------------------------------------------------------------------------------------------
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
4 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
5 # Copyright (c) 2007, 2011, Oracle and/or its affiliates. All rights reserved.
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
6 # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
7 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
8 # This code is free software; you can redistribute it and/or modify it
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
9 # under the terms of the GNU General Public License version 2 only, as
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
10 # published by the Free Software Foundation.
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
11 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
12 # This code is distributed in the hope that it will be useful, but WITHOUT
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
14 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
15 # version 2 for more details (a copy is included in the LICENSE file that
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
16 # accompanied this code).
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
17 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License version
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
19 # 2 along with this work; if not, write to the Free Software Foundation,
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
20 # Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
21 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
22 # Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
23 # or visit www.oracle.com if you need additional information or have any
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
24 # questions.
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
25 #
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
26 # ----------------------------------------------------------------------------------------------------
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
27
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
28 dir=`/bin/pwd`
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
29
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
30 # Resolve location of this script so that mx.py can be found in the same directory
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
31 source="${BASH_SOURCE[0]}"
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
32 while [ -h "$source" ] ; do source="$(readlink "$source")"; done
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
33 dir="$( cd -P "$( dirname "$source" )" && pwd )"
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
34
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
35 if [ ! -f "$dir/mx.py" ]; then
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
36 echo "Cannot find mx.py in $dir"
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
37 exit 1
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
38 fi
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
39
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
40 python <<END
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
41 import sys
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
42 major, minor, micro, _, _ = sys.version_info
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
43 if major != 2 or minor != 7:
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
44 raise SystemExit('The mx.py script requires Python 2.7, not {0}.{1}.{2}'.format(major, minor, micro))
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
45 END
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
46 if [ $? -eq 0 ]; then
4186
71a2cd79c375 Made stdout for mx unbuffered.
Doug Simon <doug.simon@oracle.com>
parents: 4167
diff changeset
47 exec python -u "$dir/mx.py" "$@"
3723
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
48 fi
6c5f528c7aac Added a copy of the mxtool to repo.
Doug Simon <doug.simon@oracle.com>
parents:
diff changeset
49
4167
3e749481e445 Trivial change to test gate.
Doug Simon <doug.simon@oracle.com>
parents: 3723
diff changeset
50 #end of file