Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c9c175141ceee1a48c843b297ff87d1776057404 (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
#!/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"

# Build Sirius core using the normal Target Platform definition
mvn -Dplatform-version-name="$PLATFORM" -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" -s "$TESTS_SETTINGS" -f "$TESTS_POM" -P "$TESTS_SUITES" clean "$TESTS_GOAL"
mv "$ORIGINAL_SETTINGS" "$TESTS_SETTINGS"

Back to the top