Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Duplicate cleanup instructions for jenkins builds in other scripts.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Sat, 13 Mar 2021 21:25:04 +0000 (22:25 +0100)
Useful e.g. for cleaning /tmp on node debian-testing.

tools/jenkins/Coverage.sh
tools/jenkins/DynamicAnalysis.sh

index aeab276..c87bd31 100755 (executable)
@@ -1,14 +1,28 @@
 #!/usr/bin/env sh
 
-set -e
-
-BUILDFOLDER=$WORKSPACE/build
-
 die() {
     echo "$@"
     exit 1
 }
 
+[ -n "$WORKSPACE" ] || die "No WORKSPACE"
+[ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
+
+echo "XXXX Cleanup previous attempts. Remaining content of /tmp:"
+rm -f /tmp/cc*
+rm -f /tmp/*.so
+rm -rf /tmp/simgrid-java*
+rm -rf /var/tmp/simgrid-java*
+rm -rf /tmp/jvm-*
+find "$WORKSPACE" -name "hs_err_pid*.log" -exec rm -f {} +
+ls /tmp
+df -h
+echo "XXXX Let's go"
+
+set -e
+
+BUILDFOLDER=$WORKSPACE/build
+
 ### Check the node installation
 
 pkg_check() {
@@ -27,9 +41,6 @@ pkg_check xsltproc gcovr ant cover2cover.py
 
 ### Cleanup previous runs
 
-[ -n "$WORKSPACE" ] || die "No WORKSPACE"
-[ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
-
 do_cleanup() {
   for d
   do
index f3e2930..8b32358 100755 (executable)
@@ -1,12 +1,26 @@
 #!/usr/bin/env sh
 
-set -e
-
 die() {
     echo "$@"
     exit 1
 }
 
+[ -n "$WORKSPACE" ] || die "No WORKSPACE"
+[ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
+
+echo "XXXX Cleanup previous attempts. Remaining content of /tmp:"
+rm -f /tmp/cc*
+rm -f /tmp/*.so
+rm -rf /tmp/simgrid-java*
+rm -rf /var/tmp/simgrid-java*
+rm -rf /tmp/jvm-*
+find "$WORKSPACE" -name "hs_err_pid*.log" -exec rm -f {} +
+ls /tmp
+df -h
+echo "XXXX Let's go"
+
+set -e
+
 ### Check the node installation
 
 pkg_check() {
@@ -25,9 +39,6 @@ pkg_check valgrind pcregrep
 
 ### Cleanup previous runs
 
-[ -n "$WORKSPACE" ] || die "No WORKSPACE"
-[ -d "$WORKSPACE" ] || die "WORKSPACE ($WORKSPACE) does not exist"
-
 do_cleanup() {
   for d
   do