Skip to content

Commit 19de5e5

Browse files
authored
Add support for native-image tests to smoketest script (helidon-io#1622)
1 parent 91298b7 commit 19de5e5

1 file changed

Lines changed: 22 additions & 5 deletions

File tree

etc/scripts/smoketest.sh

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,35 @@ full(){
162162
cd ${SCRATCH}/helidon
163163

164164
echo "===== Checking out tags/${VERSION} ====="
165-
git checkout tags/${VERSION}
165+
if [[ "${VERSION}" =~ .*SNAPSHOT ]]; then
166+
echo "WARNING! SNAPSHOT version. Skipping tag checkout"
167+
else
168+
git checkout tags/${VERSION}
169+
fi
166170

171+
echo "===== Building examples ====="
172+
cd ${SCRATCH}/helidon/examples
173+
mvn clean install ${STAGED_PROFILE}
174+
cd ${SCRATCH}
167175

168176
echo "===== Running tests ====="
169177
cd ${SCRATCH}/helidon/tests
170178
mvn clean install ${STAGED_PROFILE}
171179

172-
173-
echo "===== Building examples ====="
174-
cd ${SCRATCH}/helidon/examples
180+
# Primes dependencies for native-image builds
181+
cd ${SCRATCH}/helidon/tests/integration/native-image
175182
mvn clean install ${STAGED_PROFILE}
176-
cd ${SCRATCH}
183+
184+
echo "===== Running native image tests ====="
185+
if [ -z "${GRAALVM_HOME}" ]; then
186+
echo "WARNING! GRAALVM_HOME is not set. Skipping native image tests"
187+
else
188+
readonly native_image_tests="se-1 mp-1 mp-2 mp-3"
189+
for native_test in ${native_image_tests}; do
190+
cd ${SCRATCH}/helidon/tests/integration/native-image/${native_test}
191+
mvn clean package -Pnative-image ${STAGED_PROFILE}
192+
done
193+
fi
177194

178195
}
179196

0 commit comments

Comments
 (0)