Skip to content

Commit

Permalink
[GHA] Display logs when validate fail
Browse files Browse the repository at this point in the history
  • Loading branch information
RoiArthurB committed Sep 13, 2021
1 parent bfffd0a commit b15763d
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions travis/validate_and_test.sh 100644 → 100755
Expand Up @@ -3,7 +3,7 @@
MESSAGE=$(git log -1 HEAD --pretty=format:%s)
echo $MESSAGE
if [[ $MESSAGE == *"ci notest"* ]]; then
exit 0
exit 0
else

cd $GITHUB_WORKSPACE/ummisco.gama.product/target/products/ummisco.gama.application.product/linux/gtk/x86_64/headless
Expand All @@ -23,15 +23,16 @@ else
#exec

#GAMA=Gamaq
java -cp $GAMA -Xms512m -Xmx$memory -Djava.awt.headless=true org.eclipse.core.launcher.Main -application msi.gama.headless.id4 -data $passWork -validate
# Run -validate or cat log file and close
java -cp $GAMA -Xms512m -Xmx$memory -Djava.awt.headless=true org.eclipse.core.launcher.Main -application msi.gama.headless.id4 -data $passWork -validate || cat $GITHUB_WORKSPACE/ummisco.gama.product/target/products/ummisco.gama.application.product/linux/gtk/x86_64/headless/.work/.metadata/.log && exit $1
res=$?
if [[ $res -gt 0 ]]; then
rm -rf $passWork
exit $res
fi

echo "GAMA is starting..."
java -cp $GAMA -Xms512m -Xmx$memory -Djava.awt.headless=true org.eclipse.core.launcher.Main -application msi.gama.headless.id4 -data $passWork -test -failed
java -cp $GAMA -Xms512m -Xmx$memory -Djava.awt.headless=true org.eclipse.core.launcher.Main -application msi.gama.headless.id4 -data $passWork -test -failed || cat $GITHUB_WORKSPACE/ummisco.gama.product/target/products/ummisco.gama.application.product/linux/gtk/x86_64/headless/.work/.metadata/.log && exit $1
res=$?
if [[ $res -gt 0 ]]; then
rm -rf $passWork
Expand Down

0 comments on commit b15763d

Please sign in to comment.