Explorar o código

tools: minor fixes

Nathalie Furmento %!s(int64=7) %!d(string=hai) anos
pai
achega
5b6b24ca43

+ 11 - 6
tools/dev/checker/starpu_check_copyright.sh

@@ -17,13 +17,18 @@
 
 REP=${1:-.}
 
-for f in $(find $REP -not -path "*svn*" -not -path "*build*" -not -path "*starpu-top*"  -not -path "*min-dgels*" -not -name ".gitignore"  -not -name "*.doxy"  -not -name "*.eps"  -not -name "*.pdf" -not -name "*.png" -type f)
+find $REP -not -path "*svn*" -not -path "*build*" -not -path "*starpu-top*"  -not -path "*min-dgels*" -not -name ".gitignore"  -not -name "*.doxy"  -not -name "*.eps"  -not -name "*.pdf" -not -name "*.png" -not -path "*.deps*" -type f > /tmp/list_$$
+
+for f in $(cat /tmp/list_$$)
 do
-#    copyright=$(grep "StarPU is free software" $f 2>/dev/null)
-#    if test -z "$copyright"
-#    then
-#	echo "File $f does not include a proper copyright"
-#    fi
+    copyright=$(grep "StarPU is free software" $f 2>/dev/null)
+    if test -z "$copyright"
+    then
+	echo "File $f does not include a proper copyright"
+    fi
+done
 
+for f in $(cat /tmp/list_$$)
+do
     svn log $f | grep '|' | awk -F'|' '{print $2}' | sort | uniq
 done

+ 3 - 3
tools/dev/checker/starpu_check_macros.sh

@@ -17,9 +17,9 @@
 
 dirname=$(dirname $0)
 
-INC_DIRS=$(find $dirname/../../ -name include -type d)
+INC_DIRS=$(find $dirname/../../../ -name include -type d)
 STARPU_H_FILES=$(find $INC_DIRS -name '*.h')
-STARPU_CONFIG=$dirname/../../include/starpu_config.h.in
+STARPU_CONFIG=$dirname/../../../include/starpu_config.h.in
 STARPU_CONFIG_DISPLAY=$(python -c "import os.path; print os.path.relpath('$STARPU_CONFIG', '.')")
 macros1=$(grep 'ifdef' $STARPU_H_FILES|grep STARPU|awk '{print $NF}')
 macros2=$(grep defined $STARPU_H_FILES | tr ' (' '\012' | grep STARPU | sed 's/defined//' | tr -d '()!,')
@@ -28,7 +28,7 @@ macros=$(echo $macros1 $macros2 | tr ' ' '\012' | sort | uniq)
 for m in $macros
 do
     count=$(grep -c $m $STARPU_CONFIG)
-    if test $count -eq 0
+    if test "$count" -eq "0"
     then
 	echo $m missing in $STARPU_CONFIG_DISPLAY
     fi

+ 1 - 1
tools/dev/checker/starpu_check_malloc.sh

@@ -16,7 +16,7 @@
 # See the GNU Lesser General Public License in COPYING.LGPL for more details.
 
 dirname=$(dirname $0)
-cd $dirname/../../
+cd $dirname/../../../
 
 DIRS="src tools mpi/src"
 #sc_hypervisor/src"

+ 2 - 2
tools/dev/checker/starpu_check_register.sh

@@ -4,7 +4,7 @@
 
 # StarPU --- Runtime system for heterogeneous multicore architectures.
 #
-# Copyright (C) 2011 CNRS
+# Copyright (C) 2011, 2017 CNRS
 # Copyright (C) 2011 INRIA
 #
 # StarPU is free software; you can redistribute it and/or modify
@@ -25,7 +25,7 @@ filese=$(find examples -type f -not -path "*svn*" -name '*.c')
 filest=$(find tests -type f -not -path "*svn*" -name '*.c')
 
 for file in $filest $filese ; do
-    handles=$(spatch -very_quiet -sp_file tools/dev/starpu_check_register.cocci $file)
+    handles=$(spatch -very_quiet -sp_file tools/dev/checker/starpu_check_register.cocci $file)
     if test "x$handles" != "x" ; then
 	for handle in $handles; do
 	    echo "$handle"

+ 2 - 1
tools/starpu_replay_sched.c

@@ -239,7 +239,8 @@ void schedRecInit(const char * filename)
 	}
 
 	size_t lnsize = 128;
-	char * s = malloc(sizeof(*s) * lnsize);
+	char *s;
+	_STARPU_MALLOC(s, sizeof(*s) * lnsize);
 	int eof = 0;
 
 	reset();