From dc29e3e84d41f7cb38e5b48172fe4edafed0d331 Mon Sep 17 00:00:00 2001 From: Artem Bityutskiy Date: Thu, 10 May 2012 12:48:41 +0300 Subject: [PATCH] Move rename and move serialize-log Move the serialize-log program to the top-level because it is not external. Rename it to aiaiai-locker. Add Makefile at the top level as well. Signed-off-by: Artem Bityutskiy --- Makefile | 9 +++++++++ aiaiai-checker | 4 ++-- external/serialize-log.c => aiaiai-locker.c | 2 +- aiaiai-make-kernel | 6 +++--- doc/README | 15 ++++++++------- external/Makefile | 3 +-- 6 files changed, 24 insertions(+), 15 deletions(-) create mode 100644 Makefile rename external/serialize-log.c => aiaiai-locker.c (99%) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..b97a353 --- /dev/null +++ b/Makefile @@ -0,0 +1,9 @@ +CFLAGS = -O2 -g -Wextra + +all: + $(CC) $(CFLAGS) -o aiaiai-locker aiaiai-locker.c + make -C external + +clean: + $(RM) aiaiai-locker + make -C external clean diff --git a/aiaiai-checker b/aiaiai-checker index 9143dd0..e99fbfb 100755 --- a/aiaiai-checker +++ b/aiaiai-checker @@ -65,9 +65,9 @@ run_coccinelle() flags="-D report -no_show_diff -very_quiet -no_includes -include_headers -timeout 60" # Run coccinelle for each semantic patch in parallel. This may load the - # system too heavily, though. We use serialize-log to make sure + # system too heavily, though. We use aiaiai-locker to make sure # we have non-scrambled output. - serialize-log -s -l "$tmpdir/lockfile" -c \ + aiaiai-locker -s -l "$tmpdir/lockfile" -c \ "spatch $flags -sp_file $spatch $file_to_check" ||: & pids="$pids $!" done diff --git a/external/serialize-log.c b/aiaiai-locker.c similarity index 99% rename from external/serialize-log.c rename to aiaiai-locker.c index 27a4baa..e76d284 100644 --- a/external/serialize-log.c +++ b/aiaiai-locker.c @@ -17,7 +17,7 @@ #include #include -#define PROGRAM_NAME "serialize-log" +#define PROGRAM_NAME "aiaiai-locker" #define TMPFILE_NAME "/tmp/" PROGRAM_NAME ".XXXXXX" #define BUF_SIZE 8192 diff --git a/aiaiai-make-kernel b/aiaiai-make-kernel index 698e117..b47fe78 100755 --- a/aiaiai-make-kernel +++ b/aiaiai-make-kernel @@ -82,13 +82,13 @@ make_target() { local target="$1" - serialize-log $split -l "$lockfile" -c \ + aiaiai-locker $split -l "$lockfile" -c \ "make $keep_going -j $jobs -C $kernel_tree ${arch:+ARCH="$arch"} \ ${cross:+CROSS_COMPILE="$cross"} ${objdir:+O="$objdir"} \ CHECK=\"aiaiai-checker $sparse $smatch $cppcheck $coccinelle $check_only --\" \ C=$check W=1 \ KCFLAGS='-Wno-missing-field-initializers -Wno-sign-compare' \ - SHELL=\"serialize-log $split -l $lockfile\" $target" + SHELL=\"aiaiai-locker $split -l $lockfile\" $target" } lockfile= @@ -106,7 +106,7 @@ cleanup_handler() } set_cleanup_handler cleanup_handler -program_required "serialize-log" +program_required "aiaiai-locker" TEMP=`getopt -n $PROG -o o:,j:,O:,E:,k:,a:,v,h --long objdir:,jobs:,stdout:,stderr:,keep-going:,arch:,sparse,smatch,cppcheck,coccinelle,check-only:,verbose,help -- "$@"` || fail_usage "" diff --git a/doc/README b/doc/README index 6332183..5598f48 100644 --- a/doc/README +++ b/doc/README @@ -17,9 +17,8 @@ Also it is useful to know that the scripts never modify the repositories you specify and the scripts remove all the temporary files upon exit, Ctrl-C interruption, or error (unless -p option is specified). -Do not forget to compile the 'remap-log' and 'serialize-log' tools before using -Aiaiai: -$ make -C external +Do not forget to compile the 'remap-log' and 'aiaiai-locker' tools before using +Aiaiai by just typing "make". The layout of the repository. @@ -28,6 +27,8 @@ The layout of the repository. you do not need these scripts. * aiaiai/external/ Some external tools and files which we use are stored here. +* aiaiai/doc + Some documentation. * aiaiai/ The root repository directory contains the scripts which do all the patch checking work. The central script is 'aiaiai-test-patchset' which @@ -103,17 +104,17 @@ sends it back to the patch submitter. change its behavior, e.g., you can select whether you want to run sparse/smatch/cppcheck/coccinelle tools or not. - 'aiaiai-make-kernel' utilizes the 'external/serialize-log' utility to make + 'aiaiai-make-kernel' utilizes the 'aiaiai-locker' utility to make sure the build logs of parallel builds are not scrambled and stay readable. -* external/serialize-log +* aiaiai-locker This utility was inspired by Eric Melski's blog-post I found in the Internet. We use this tool to make Linux kernel build logs saner than parallel build produces (e.g., "make -j 20"). Indeed, parallel make scrambles all the lines which makes build logs not comparable and not readable. - The idea is to run all make commands via the 'serialize-log' utility using - the GNU make 'SHELL' variable re-definition. 'serialize-log' intercepts the + The idea is to run all make commands via the 'aiaiai-locker' utility using + the GNU make 'SHELL' variable re-definition. 'aiaiai-locker' intercepts the stdout and stderr output of commands, gathers all the output until the command finishes, and locks a common lockfile, and prints the intercepted output. So the effect of this is that the in the build log the output of diff --git a/external/Makefile b/external/Makefile index 47f3561..cbc9493 100644 --- a/external/Makefile +++ b/external/Makefile @@ -2,7 +2,6 @@ CFLAGS = -O2 -g -Wextra all: $(CC) $(CFLAGS) -o remap-log remap-log.c - $(CC) $(CFLAGS) -o serialize-log serialize-log.c clean: - $(RM) remap-log serialize-log + $(RM) remap-log -- 2.49.0