Merge: Beefup check contrib
authorJean Privat <jean@pryen.org>
Mon, 24 Aug 2015 17:56:56 +0000 (13:56 -0400)
committerJean Privat <jean@pryen.org>
Mon, 24 Aug 2015 17:56:56 +0000 (13:56 -0400)
This change make the caller pass the additional `make` rules to execute. So now `check` or `android` can be given to mass build projects that expose such rules.

Pull-Request: #1652
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
Reviewed-by: Lucas Bajolet <r4pass@hotmail.com>

lib/json/Makefile
lib/markdown/.gitignore [new file with mode: 0644]
misc/jenkins/check_contrib.sh

index 8d10e1e..8d0650f 100644 (file)
@@ -1,2 +1,7 @@
-compile-parser:
-       ../../contrib/nitcc/src/nitcc ../../contrib/nitcc/examples/json.sablecc
+NITCCDIR=../../contrib/nitcc/
+
+compile-parser: $(NITCCDIR)src/nitcc
+       $(NITCCDIR)src/nitcc $(NITCCDIR)examples/json.sablecc
+
+$(NITCCDIR)src/nitcc:
+       make -C $(NITCCDIR)
diff --git a/lib/markdown/.gitignore b/lib/markdown/.gitignore
new file mode 100644 (file)
index 0000000..048b768
--- /dev/null
@@ -0,0 +1 @@
+nitmd
index 320dac8..fafeb92 100755 (executable)
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# Check the build and the execution of software in examples/ and contrib/
+# Check the build and the execution of software in lib/, examples/ and contrib/
 # The script must be run from the root Nit directory.
 #
 # various .xml junit file will be generated in the root directory for jenkins.
+#
+# Arguments will be additional `make` rules to execute. eg.
+#
+#     check_contrib.sh check android
 
-projects=`echo examples/*/Makefile contrib/*/Makefile`
+projects=`echo lib/*/Makefile examples/*/Makefile contrib/*/Makefile`
+rules=$*
 
 failed=
 for p in $projects; do
@@ -26,20 +31,19 @@ for p in $projects; do
        name=`basename "$dir"`
        echo "*** make $dir ***"
        if misc/jenkins/unitrun.sh "cmd-$name-make" make -C "$dir"; then
-               # Make OK, is there a `check` rule?
-               make -C "$dir" check -n 2>/dev/null || continue
-               echo "*** makecheck $dir ***"
-               if misc/jenkins/unitrun.sh "cmd-$name-makecheck" make -C "$dir" check; then
-                       :
-               else
-                       failed="$failed $name-check"
-               fi
-
+               # Make OK. Check additional rules if they exists
+               for rule in $rules; do
+                       make -C "$dir" $rule -n 2>/dev/null ||
+                               continue
+                       echo "*** make$rule $dir ***"
+                       misc/jenkins/unitrun.sh "cmd-$name-make$rule" make -C "$dir" $rule ||
+                               failed="$failed $name-$rule"
+               done
        else
                failed="$failed $name"
        fi
 done
-grep '<error message' *-make.xml *-makecheck.xml
+grep '<error message' *-make*.xml
 if test -n "$failed"; then
        echo "FAILED: $failed"
        exit 1