The general transition to new constructor is nearer each day.
May fix an issue informally signaled by @R4PaSs.
Pull-Request: #783
Reviewed-by: Alexandre Terrasa <alexandre@moz-code.org>
--- /dev/null
+#!/bin/bash
+# This file is part of NIT ( http://www.nitlanguage.org ).
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Check missing signed-off-by in commits
+
+if test "$#" -lt 2; then
+ echo "Usage: checklicense from to"
+ echo ""
+ exit
+fi
+
+from=$1
+to=$2
+
+err=0
+
+git diff --name-status $from..$to -- "*.nit" "*.sh" | sed -n 's/^A\s*//p' > checklicense_new_files.out
+test -s checklicense_new_files.out || exit 0
+grep -L 'his file is part of NIT' `cat checklicense_new_files.out` 2>/dev/null | tee checklicense_missing.out
+test \! -s checklicense_missing.out
# Magic here! This tee and save both stdout and stderr in distinct files without messing with them
# Time just get the user time
-/usr/bin/time -f%U -o "${name}.t.out" "$@" > >(tee "${name}.out") 2> >(tee "${name}.2.out" >&2)
+/usr/bin/time -f%U --quiet -o "${name}.t.out" "$@" > >(tee "${name}.out") 2> >(tee "${name}.2.out" >&2)
res=$?
+c=`echo "${name%-*}" | tr "-" "."`
+n=${name##*-}
+
cat > "${name}.xml"<<END
<testsuites><testsuite>
-<testcase classname='other' name='$name' time='`cat "${name}.t.out"`' timestamp='`date -Iseconds`'>
+<testcase classname='$c' name='$n' time='`cat "${name}.t.out"`' timestamp='`date -Iseconds`'>
END
if test "$res" != "0"; then
echo >> "${name}.xml" "<error message='Command returned $res'/>"
doc_entities += 1
tc = new HTMLTag("testcase")
# NOTE: jenkins expects a '.' in the classname attr
- tc.attr("classname", mmodule.full_name + ".<module>")
+ tc.attr("classname", "nitunit." + mmodule.full_name + ".<module>")
tc.attr("name", "<module>")
d2m.extract(ndoc, tc)
end label x
if ndoc != null then
doc_entities += 1
tc = new HTMLTag("testcase")
- tc.attr("classname", mmodule.full_name + "." + mclassdef.mclass.full_name)
+ tc.attr("classname", "nitunit." + mmodule.full_name + "." + mclassdef.mclass.full_name)
tc.attr("name", "<class>")
d2m.extract(ndoc, tc)
end
if ndoc != null then
doc_entities += 1
tc = new HTMLTag("testcase")
- tc.attr("classname", mmodule.full_name + "." + mclassdef.mclass.full_name)
+ tc.attr("classname", "nitunit." + mmodule.full_name + "." + mclassdef.mclass.full_name)
tc.attr("name", mpropdef.mproperty.full_name)
d2m.extract(ndoc, tc)
end
var mclassdef = test_method.mclassdef
var tc = new HTMLTag("testcase")
# NOTE: jenkins expects a '.' in the classname attr
- tc.attr("classname", mclassdef.mmodule.full_name + "." + mclassdef.mclass.full_name)
+ tc.attr("classname", "nitunit." + mclassdef.mmodule.full_name + "." + mclassdef.mclass.full_name)
tc.attr("name", test_method.mproperty.full_name)
if was_exec then
tc.add new HTMLTag("system-err")
../examples/pnacl/converter/converter.nit \
../examples/nitcorn/src/*.nit \
../examples/mpi/src/*.nit \
- ../lib/*.nit \
- ../lib/*/*.nit \
- ../lib/*/*/*.nit \
+ ../lib/*/examples/*.nit \
+ ../contrib/friendz/src/solver_cmd.nit \
+ ../contrib/pep8analysis/src/pep8analysis.nit \
../src/nit*.nit \
- ../src/test_*.nit \
- ../contrib/*.nit \
- ../contrib/*/*.nit \
- ../contrib/*/src/*.nit
+ ../src/test_*.nit
+++ /dev/null
-*** No Array stats ***
+++ /dev/null
-../lib/mnit_linux/linux_app.nit:29,16--31: Redef Error: a virtual type cannot be refined.
-../lib/mnit_linux/linux_app.nit:30,16--29: Redef Error: a virtual type cannot be refined.
+++ /dev/null
-~~~No hash statistics~~~
+++ /dev/null
-../lib/mnit_linux/linux_app.nit:29,16--31: Redef Error: a virtual type cannot be refined.
-../lib/mnit_linux/linux_app.nit:30,16--29: Redef Error: a virtual type cannot be refined.
+++ /dev/null
-../lib/mnit_linux/linux_app.nit:29,16--31: Redef Error: a virtual type cannot be refined.
-../lib/mnit_linux/linux_app.nit:30,16--29: Redef Error: a virtual type cannot be refined.
+++ /dev/null
-../lib/mnit_linux/linux_app.nit:29,16--31: Redef Error: a virtual type cannot be refined.
-../lib/mnit_linux/linux_app.nit:30,16--29: Redef Error: a virtual type cannot be refined.
+++ /dev/null
-GET injected_input_stream /dev/null
-END OF INPUTS
-END OF INPUT
+++ /dev/null
-../contrib/nitcc/src/re2nfa.nit:18,8--18: Error: cannot find module nitcc_lexer from nitcc. tried alt, ../lib, ../contrib/nitcc
-../contrib/nitcc/src/nitcc_semantic.nit:21,8--19: Error: cannot find module nitcc_parser from nitcc. tried alt, ../lib, ../contrib/nitcc
+++ /dev/null
-../contrib/nitcc/src/nitcc_lexer0.nit:21,8--19: Error: cannot find module nitcc_parser from nitcc. tried alt, ../lib, ../contrib/nitcc
+++ /dev/null
-LR automaton: 93 states (see nitcc0.lr.dot)
+++ /dev/null
-../contrib/nitcc/src/re2nfa.nit:18,8--18: Error: cannot find module nitcc_lexer from nitcc. tried alt, ../lib, ../contrib/nitcc
-../contrib/nitcc/src/nitcc_semantic.nit:21,8--19: Error: cannot find module nitcc_parser from nitcc. tried alt, ../lib, ../contrib/nitcc
+++ /dev/null
-GET injected_input_stream /dev/null
+++ /dev/null
-usage: nitmd <file.md>
-test_nitunit.nit:20,1--22,0: ERROR: test_nitunit.test_nitunit::X.<class> (in .nitunit/test_nitunit2.nit): Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
+test_nitunit.nit:20,1--22,0: ERROR: nitunit.test_nitunit.test_nitunit::X.<class> (in .nitunit/test_nitunit2.nit): Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
-test_nitunit.nit:23,2--25,0: FAILURE: test_nitunit.test_nitunit::X.test_nitunit::X::foo (in .nitunit/test_nitunit3.nit): .nitunit/test_nitunit3.nit:5,8--27: Error: Method or variable 'undefined_identifier' unknown in Sys.
+test_nitunit.nit:23,2--25,0: FAILURE: nitunit.test_nitunit.test_nitunit::X.test_nitunit::X::foo (in .nitunit/test_nitunit3.nit): .nitunit/test_nitunit3.nit:5,8--27: Error: Method or variable 'undefined_identifier' unknown in Sys.
test_test_nitunit.nit:36,2--40,4: ERROR: test_foo1 (in file .nitunit/test_test_nitunit_TestX_test_foo1.nit): Runtime error: Assert failed (test_test_nitunit.nit:39)
TestSuites:
Class suites: 1; Test Cases: 3; Failures: 1
-<testsuites><testsuite package="test_nitunit"><testcase classname="test_nitunit.<module>" name="<module>"><system-err></system-err><system-out>assert true
-</system-out></testcase><testcase classname="test_nitunit.test_nitunit::X" name="<class>"><system-err></system-err><system-out>assert false
+<testsuites><testsuite package="test_nitunit"><testcase classname="nitunit.test_nitunit.<module>" name="<module>"><system-err></system-err><system-out>assert true
+</system-out></testcase><testcase classname="nitunit.test_nitunit.test_nitunit::X" name="<class>"><system-err></system-err><system-out>assert false
</system-out><error message="Runtime error: Assert failed (.nitunit/test_nitunit2.nit:5)
-"></error></testcase><testcase classname="test_nitunit.test_nitunit::X" name="test_nitunit::X::foo"><system-err></system-err><system-out>assert undefined_identifier
+"></error></testcase><testcase classname="nitunit.test_nitunit.test_nitunit::X" name="test_nitunit::X::foo"><system-err></system-err><system-out>assert undefined_identifier
</system-out><failure message=".nitunit/test_nitunit3.nit:5,8--27: Error: Method or variable 'undefined_identifier' unknown in Sys.
-"></failure></testcase></testsuite><testsuite package="test_test_nitunit"><testcase classname="test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo"><system-err></system-err><system-out>out</system-out></testcase><testcase classname="test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo1"><system-err></system-err><system-out>out</system-out><error message="Runtime error: Assert failed (test_test_nitunit.nit:39)
-"></error></testcase><testcase classname="test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo2"><system-err></system-err><system-out>out</system-out></testcase></testsuite></testsuites>
\ No newline at end of file
+"></failure></testcase></testsuite><testsuite package="test_test_nitunit"><testcase classname="nitunit.test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo"><system-err></system-err><system-out>out</system-out></testcase><testcase classname="nitunit.test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo1"><system-err></system-err><system-out>out</system-out><error message="Runtime error: Assert failed (test_test_nitunit.nit:39)
+"></error></testcase><testcase classname="nitunit.test_test_nitunit.test_test_nitunit::TestX" name="test_test_nitunit::TestX::test_foo2"><system-err></system-err><system-out>out</system-out></testcase></testsuite></testsuites>
\ No newline at end of file
--- /dev/null
+Initial: eabf.cdgh
+eab
+f.c
+dgh
+Solved, after looking at 14 positions during 0.0s
+Solution in 10 moves: right(>) down(v) left(<) left(<) up(^) right(>) right(>) up(^) left(<) left(<)
+++ /dev/null
-../contrib/nitcc/src/re2nfa.nit:18,8--18: Error: cannot find module nitcc_lexer from nitcc. tried alt, ../lib, ../contrib/nitcc
+++ /dev/null
-Not configured, make sure you modify the script and set is_configured to true
+++ /dev/null
-You must specify one source drawing file
-You must specify a single format (--android or --large)
-Usage: svg_to_icons [Options] drawing.svg
-Options:
- --out, -o Where to output PNG files
- --id, -i Extract only object with given ID
- --android, -a Generate in the file structure for Android
- --large, -l Generate large icons (512 and 1024 px)
- --help, -h Print this help message
+++ /dev/null
-You must specify at least one source drawing file
-Usage: svg_to_png_and_nit [Options] drawing.svg [Other files]
-Options:
- --src, -s Path to output source file
- --assets, -a Path to assert dir where to put PNG files
- --scale, -x Apply scaling to exported images (defaut at 1.0 of 90dpi)
- --help, -h Print this help message
fi
f=`basename "$ii" .nit`
- pack=`echo $ii | perl -p -e 's|^../([^/]*)/([a-zA-Z_]*).*|\1.\2| || s|^([a-zA-Z]*)[^_]*_([a-zA-Z]*).*|\1.\2| || s|\W*([a-zA-Z_]*).*|\1|'`
+ pack="tests.${engine}".`echo $ii | perl -p -e 's|^../([^/]*)/([a-zA-Z_]*).*|\1.\2| || s|^([a-zA-Z]*)[^_]*_([a-zA-Z]*).*|\1.\2| || s|\W*([a-zA-Z_]*).*|\1|'`
# Sould we skip the file for this engine?
need_skip $f $f $pack && continue
> "$ff.cmp.err"
> "$ff.compile.log"
ERR=0
+ echo 0.0 > "$ff.time.out"
else
if skip_cc "$bf"; then
nocc="--no-cc"
echo $NITC --no-color $OPT -o "$ffout" "$i" "$includes" $nocc
fi
NIT_NO_STACK=1 JNI_LIB_PATH=$JNI_LIB_PATH JAVA_HOME=$JAVA_HOME \
- /usr/bin/time -f%U -o "$ff.time.out" $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log"
+ /usr/bin/time --quiet -f%U -o "$ff.time.out" $TIMEOUT $NITC --no-color $OPT -o "$ffout" "$i" $includes $nocc 2> "$ff.cmp.err" > "$ff.compile.log"
ERR=$?
if [ "x$verbose" = "xtrue" ]; then
cat "$ff.compile.log"
echo "NIT_NO_STACK=1 ./$ff.bin" $args
fi
NIT_NO_STACK=1 LD_LIBRARY_PATH=$JNI_LIB_PATH \
- $TIMEOUT "./$ff.bin" $args < "$inputs" > "$ff.res" 2>"$ff.err"
+ /usr/bin/time --quiet -f%U -a -o "$ff.time.out" $TIMEOUT "./$ff.bin" $args < "$inputs" > "$ff.res" 2>"$ff.err"
+ mv $ff.time.out $ff.times.out
+ awk '{ SUM += $1} END { print SUM }' $ff.times.out > $ff.time.out
+
if [ "x$verbose" = "xtrue" ]; then
cat "$ff.res"
cat >&2 "$ff.err"
echo -n "==> $name "
echo "./$ff.bin $args" > "./$fff.bin"
chmod +x "./$fff.bin"
- WRITE="$fff.write" /usr/bin/time -f%U -o "$fff.time.out" sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $ffinputs > $fff.res 2>$fff.err"
+ WRITE="$fff.write" /usr/bin/time --quiet -f%U -o "$fff.time.out" sh -c "NIT_NO_STACK=1 $TIMEOUT ./$fff.bin < $ffinputs > $fff.res 2>$fff.err"
if [ "x$verbose" = "xtrue" ]; then
cat "$fff.res"
cat >&2 "$fff.err"