File: test-plume-lib.sh

package info (click to toggle)
checker-framework-java 3.0.1%2Bds2-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,736 kB
  • sloc: java: 145,286; xml: 785; sh: 456; makefile: 401; perl: 26
file content (55 lines) | stat: -rwxr-xr-x 2,582 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash

set -e
set -o verbose
set -o xtrace
export SHELLOPTS

# Optional argument $1 is the group.
GROUPARG=$1
echo "GROUPARG=$GROUPARG"
# These are all the Java projects at https://github.com/plume-lib
if [[ "${GROUPARG}" == "bcel-util" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "bibtex-clean" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "html-pretty-print" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "icalavailable" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "lookup" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "multi-version-control" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "options" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "plume-util" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "require-javadoc" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "signature-util" ]]; then PACKAGES=(${GROUPARG}); fi
if [[ "${GROUPARG}" == "allJdk11" ]]; then PACKAGES=(bcel-util bibtex-clean html-pretty-print icalavailable lookup multi-version-control options plume-util); fi
if [[ "${GROUPARG}" == "all" ]] || [[ "${GROUPARG}" == "" ]]; then echo "GROUPARG is all or empty"; PACKAGES=(bcel-util bibtex-clean html-pretty-print icalavailable lookup multi-version-control options plume-util require-javadoc); fi
if [ -z ${PACKAGES+x} ]; then
  echo "Bad group argument '${GROUPARG}'"
  exit 1
fi
echo "PACKAGES=${PACKAGES}"


git -C /tmp/plume-scripts pull > /dev/null 2>&1 \
  || git -C /tmp clone --depth 1 -q https://github.com/plume-lib/plume-scripts.git

echo "initial CHECKERFRAMEWORK=$CHECKERFRAMEWORK"
export CHECKERFRAMEWORK="${CHECKERFRAMEWORK:-$(pwd -P)}"
echo "CHECKERFRAMEWORK=$CHECKERFRAMEWORK"

## Build the Checker Framework
if [ -d $CHECKERFRAMEWORK ] ; then
  # Fails if not currently on a branch
  git -C $CHECKERFRAMEWORK pull || true
else
  JSR308="$(cd "$CHECKERFRAMEWORK/.." && pwd -P)"
  (cd $JSR308 && git clone https://github.com/typetools/checker-framework.git) || (cd $JSR308 && git clone https://github.com/typetools/checker-framework.git)
fi
# This also builds annotation-tools
(cd $CHECKERFRAMEWORK && ./checker/bin-devel/build.sh downloadjdk)

echo "PACKAGES=${PACKAGES}"
for PACKAGE in "${PACKAGES[@]}"; do
  echo "PACKAGE=${PACKAGE}"
  (cd /tmp && rm -rf ${PACKAGE} && git clone --depth 1 https://github.com/plume-lib/${PACKAGE}.git)
  echo "About to call ./gradlew --console=plain -PcfLocal assemble"
  (cd /tmp/${PACKAGE} && CHECKERFRAMEWORK=$CHECKERFRAMEWORK ./gradlew --console=plain -PcfLocal assemble)
done