Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: bd39f1298f59a675ab3ea4a29626f4d2c9945162 (plain) (blame)
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
#!/bin/sh

set -e

readonly PLATFORM=${1:-mars}
readonly TESTS_GOAL=${2:-package}
readonly TESTS_SUITES=${3:-junit,swtbot-sequence,swtbot}
readonly BASEDIR=$(pwd)
readonly BUILD_POM="packaging/org.eclipse.sirius.parent/pom.xml"
readonly TESTS_POM="packaging/org.eclipse.sirius.tests.parent/pom.xml"
readonly TESTS_SETTINGS="packaging/org.eclipse.sirius.tests.parent/sirius-local-settings.xml"
readonly USE_P2_MIRRORS="-Declipse.p2.mirrors=true"

# Build Sirius core using the normal Target Platform definition
mvn -Dplatform-version-name="$PLATFORM" -Declipse.p2.mirrors=$USE_P2_MIRRORS -f "$BUILD_POM" clean package

# Build (and optionally execute) the Sirius test suites, using an
# adjusted Target Platform which uses the locally build Sirius core
# instead of the latest published nightly.
readonly ORIGINAL_SETTINGS=$(mktemp)
cp "$TESTS_SETTINGS" "$ORIGINAL_SETTINGS"
sed -i -e "s|@BASEDIR@|$BASEDIR|" "$TESTS_SETTINGS"
if [ "$OSTYPE" = "msys" ]; then
    # for windows, replace file:///c/xxx by  file:///c:/xxx
    sed -r -i -e "s|file:///([A-Za-z]{1})/|file:///\1:/|" "$TESTS_SETTINGS"
fi

SWT_GTK3=0 mvn -Dplatform-version-name="$PLATFORM"  -Declipse.p2.mirrors=$USE_P2_MIRRORS -s "$TESTS_SETTINGS" -f "$TESTS_POM" -P "$TESTS_SUITES" clean "$TESTS_GOAL"
mv "$ORIGINAL_SETTINGS" "$TESTS_SETTINGS"

Back to the top