SEBA-497 Run 'make test' when appropriate
Change-Id: Iddb77785ca495b462b211fa2a0b36d3654646ee9
diff --git a/jjb/shell/xos-unit.sh b/jjb/shell/xos-unit.sh
index 8ddc9d9..53af6b6 100644
--- a/jjb/shell/xos-unit.sh
+++ b/jjb/shell/xos-unit.sh
@@ -29,19 +29,27 @@
# find the path to the project that is checked out
PROJECT_PATH=$(xmllint --xpath "string(//project[@name=\"$GERRIT_PROJECT\"]/@path)" cord/.repo/manifest.xml)
-if [ "$GERRIT_PROJECT" = 'xos' ] ; then
+if [ -f "$WORKSPACE/cord/$PROJECT_PATH/Makefile" ]; then
pushd "$WORKSPACE/cord/$PROJECT_PATH"
+ make test
else
- pushd "$WORKSPACE/cord/$PROJECT_PATH/xos"
+ echo "No Makefile present"
+
+ if [ "$GERRIT_PROJECT" = 'xos' ] ; then
+ pushd "$WORKSPACE/cord/$PROJECT_PATH"
+ else
+ pushd "$WORKSPACE/cord/$PROJECT_PATH/xos"
+ fi
+
+ echo "Checking Migrations"
+ if [ "$GERRIT_PROJECT" = 'xos' ] ; then
+ xos-migrate -r $WORKSPACE/cord -s core --check
+ else
+ xos-migrate -r $WORKSPACE/cord -s $GERRIT_PROJECT --check
+ fi
+
+ echo "Performing nose2 tests"
+ nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
fi
-echo "Checking Migrations"
-if [ "$GERRIT_PROJECT" = 'xos' ] ; then
- xos-migrate -r $WORKSPACE/cord -s core --check
-else
- xos-migrate -r $WORKSPACE/cord -s $GERRIT_PROJECT --check
-fi
-
-echo "Performing nose2 tests"
-nose2 --verbose --coverage-report xml --coverage-report term --junit-xml
popd
diff --git a/jjb/xos-unit.yaml b/jjb/xos-unit.yaml
index b474971..89fd6c1 100644
--- a/jjb/xos-unit.yaml
+++ b/jjb/xos-unit.yaml
@@ -46,7 +46,7 @@
publishers:
- junit:
- results: "**/nose2-junit.xml"
+ results: "**/*junit.xml,**/*results.xml"
- cobertura:
report-file: "**/coverage.xml"
targets: