nitester: keep Jenkin's xml files in a common directory
authorAlexis Laferrière <alexis.laf@xymus.net>
Fri, 24 Oct 2014 11:32:30 +0000 (07:32 -0400)
committerAlexis Laferrière <alexis.laf@xymus.net>
Fri, 7 Nov 2014 15:06:49 +0000 (10:06 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

contrib/nitester/src/nitester.nit
tests/tests.sh

index 5edfe22..ecab642 100644 (file)
@@ -332,6 +332,9 @@ class Worker
        # Output file directory
        var out_dir = "/dev/shm/nit_out{rank}" is lazy
 
+       # Directory to store the xml files produced for Jenkins
+       var xml_dir = "~/jenkins_xml/"
+
        # Output file of the `tests.sh` script
        var tests_sh_out = "/dev/shm/nit_local_out{rank}" is lazy
 
@@ -402,7 +405,7 @@ class Worker
                                        var task = tasks[task_id]
 
                                        # Command line to execute test
-                                       var cmd = "XMLDIR={out_dir} ERRLIST={out_dir}/errlist TMPDIR={out_dir} " +
+                                       var cmd = "XMLDIR={xml_dir} ERRLIST={out_dir}/errlist TMPDIR={out_dir} " +
                                                "CCACHE_DIR={ccache_dir} CCACHE_TEMPDIR={ccache_dir} CCACHE_BASEDIR={comp_dir} " +
                                                "./tests.sh --compdir {comp_dir} --outdir {out_dir} -o \"--make-flags '-j1'\"" +
                                                " --node --engine {task.engine} {nit_copy_dir / "tests" / task.test_program} > {tests_sh_out}"
index 8179c9c..42817b3 100755 (executable)
@@ -458,6 +458,7 @@ if [ "x$XMLDIR" = "x" ]; then
        xml="tests-$engine.xml"
 else
        xml="$XMLDIR/tests-$engine.xml"
+       mkdir -p "$XMLDIR"
 fi
 
 echo >$xml "<testsuites><testsuite>"