瀏覽代碼

tools/dev: move scripts used to check code in checker sub-directory

Nathalie Furmento 8 年之前
父節點
當前提交
551d96fc42

tools/dev/check_unrenamed_list_types.sh → tools/dev/checker/check_unrenamed_list_types.sh


tools/dev/mycocci.sh → tools/dev/checker/mycocci.sh


tools/dev/rename.sed → tools/dev/checker/rename.sed


tools/dev/rename.sh → tools/dev/checker/rename.sh


tools/dev/rename_filter.sed → tools/dev/checker/rename_filter.sed


tools/dev/rename_filter.sh → tools/dev/checker/rename_filter.sh


tools/dev/rename_internal.sed → tools/dev/checker/rename_internal.sed


tools/dev/rename_internal.sh → tools/dev/checker/rename_internal.sh


tools/dev/starpu_check_braces.sh → tools/dev/checker/starpu_check_braces.sh


+ 29 - 0
tools/dev/checker/starpu_check_copyright.sh

@@ -0,0 +1,29 @@
+#!/bin/bash
+#
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2013 Centre National de la Recherche Scientifique
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+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)
+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
+
+    svn log $f | grep '|' | awk -F'|' '{print $2}' | sort | uniq
+done

+ 37 - 0
tools/dev/checker/starpu_check_macros.sh

@@ -0,0 +1,37 @@
+#!/bin/bash
+#
+# StarPU --- Runtime system for heterogeneous multicore architectures.
+#
+# Copyright (C) 2016, 2017 CNRS
+#
+# StarPU is free software; you can redistribute it and/or modify
+# it under the terms of the GNU Lesser General Public License as published by
+# the Free Software Foundation; either version 2.1 of the License, or (at
+# your option) any later version.
+#
+# StarPU is distributed in the hope that it will be useful, but
+# WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+#
+# See the GNU Lesser General Public License in COPYING.LGPL for more details.
+
+dirname=$(dirname $0)
+
+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_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 '()!,')
+macros=$(echo $macros1 $macros2 | tr ' ' '\012' | sort | uniq)
+
+for m in $macros
+do
+    count=$(grep -c $m $STARPU_CONFIG)
+    if test $count -eq 0
+    then
+	echo $m missing in $STARPU_CONFIG_DISPLAY
+    fi
+done
+
+

tools/dev/starpu_check_malloc.sh → tools/dev/checker/starpu_check_malloc.sh


tools/dev/starpu_check_public.sh → tools/dev/checker/starpu_check_public.sh


tools/dev/starpu_check_register.cocci → tools/dev/checker/starpu_check_register.cocci


tools/dev/starpu_check_register.sh → tools/dev/checker/starpu_check_register.sh


tools/dev/starpu_use_macro.sh → tools/dev/checker/starpu_use_macro.sh