summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-10-06aiaiai-test-patchset: Ignore checkpatch's CONST_STRUCTHEADmasterFlorian Fainelli1-1/+1
checkpatch.pl can generate a ton of false positive warnings when used with CONST_STRUCT, so ignore those warnings to make its output useful again. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-10-05test-patchset: Make a copy of const_structs.checkpatchDaniel Thompson1-1/+7
Currently aiaiai issues the following warning for each patch under test because recent versions of checkpatch look for a list of structures in scripts/const_structs.checkpatch . This patch fixes the problem by copying out the extra file (if one is found). Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2017-06-14README: Provide an example hook scriptFlorian Fainelli1-1/+7
Provide a simple hook script that just looks at the X-Aiaiai-Project header that could be added, with e.g: git format-patch --add-header="X-Aiaiai-Project: foo" while formatting patches. This is enough to avoid per-project email addresses. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2017-04-12README: Improve my-email-lda scriptFlorian Fainelli1-1/+2
In case someone may want to simply copy/paste the example, make that possible by providing the necessary shebang and properly quote the log file argument. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12README: Explain how email delivery works wrt. projectsFlorian Fainelli1-0/+9
Without looking at the code, it may not be entirely obvious that we may need a custom hook just to print X-Aiaiai-Project and avoid the need for per-project email addresses. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12aiaiai: Include User=aiaiai in services filesFlorian Fainelli2-0/+2
Most installations will certainly run with the aiaiai username for simplicity so make these files copy/pastable into an existing distribution's systemd directory. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12packaging: Add a .gitignore fileFlorian Fainelli1-0/+2
Ignore *.tar.bz2 and *.rpm in preparation for subsequent changes. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2017-04-12packaging: Add a "rpm" make targetFlorian Fainelli1-1/+9
It requires the tarball to be created and will create a source RPM in the current directory. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
2016-06-22email: protect output of subject_m in quotesJacob Keller1-1/+1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-26aiaiai-email-test-patchset: notify admin when patches can't find baseJacob Keller1-0/+2
Also notify the administrator of aiaiai when a user's patch gets rejected by the hook. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-26aiaiai-email-lda: allow reaping of series directoriesJacob Keller1-1/+1
reap_old did not remove series directories, because "rm -f" does not remove directories. However, adding just "-r" to the rm command results in extraneous "directory does not exist" because find will be searching more than one depth. Change reap_old to have a max depth of 1 so that it doesn't descend into directories and will happily remove series directories created inside of queue. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-26email-lda: use git-apply to more accurately find patch emailsJacob Keller2-10/+32
Instead of using the subject as the sole arbiter of whether an email contains a patch, reject all emails which cannot be recognized by git-apply. In this way, we can locate even patches with non-standard subject lines. Use the subject line to differentiate between patch series and individual patches when possible. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-25autodetect-project: limit search to nearest annotated tagJacob Keller1-2/+4
This patch limits the search for patching patch-id commits to only check commits since the most recent tag. This works well for the Linux kernel, as we only worry about exact resubmissions of recent work, that may have been applied before aiaiai could test it. This may not work for all projects, and probably some sort of configurable setting should be created. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-17aiaiai: don't check patch-id for revisions with no diffJacob Keller1-3/+8
Mostly merges, but some other revisions may not include a diff so we should skip these revisions when we check for equivalent patch ids. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-14aiaiai: document reap_archive and reap_incompleteJacob Keller1-4/+23
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-14aiaiai: specify rev-list to correctly list revisionsJacob Keller1-1/+1
Fix a typo aiaiai-email-autodetect-project to specify rev-list command along with branch name rather than just the branch name. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-14aiaiai: use correct backref numbers for $m and $nJacob Keller1-2/+2
Fix subject handling of X/n patches which incorrectly pulled the subject out using the wrong prefix. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Fixes: 3531d588c7f4 ("aiaiai-email-sh-functions: allow patches without PATCH prefix")
2015-08-11email: update message on autodetect project failureJacob Keller1-5/+6
Update the message so that it is more clear why git-find-base fails generally. The most common case is patches based on work which is not yet applied by the maintainer. The previous message did not make this clear, and thus users were confused. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-11email: skip applied patches in autodetect projectJacob Keller1-0/+24
Update the project autodetection hook to use git-patch-id to search for patches which have already been applied. This helps ensure that patches which have already been applied to the "branch_base" are skipped with a different warning message. Otherwise, git-find-base will not work for these patches, and they will be sent a more confusing message. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-11send-mail-on-failure: specify correct directoryJacob Keller1-1/+1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-11aiaiai-test-patchset: remove leftover 'wait for bisect test' codeBrian Norris1-16/+9
I didn't notice this code in my first (quick) pass at fixing a race condition here. Apparently we *were* trying to wait for the bisection test to complete, but we just weren't doing it at the right time. Anyway, with the current code, multi-config test runs will fail, since the second config will have a valid $pid_bisect from the previous config, meaning we will try to 'wait' again for the same expired process. The shell doesn't like that, so we fail. Let's move the bisect process's PID into a function-local context, and ensure that each config is completely finished before moving to the next one. So there will be a single, obvious place to wait for the process completion. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-04aiaiai-test-patchset: sync with bisection test before moving onBrian Norris1-1/+4
For whatever reason (parallelism, I suppose?) we fork the bisectability test to the background and continue -- we only sync with this test after all configs are completed. This is bad for a number of reasons. 1. commit 2115f7ff0592 ("aiaiai-test-patchset: optimize disk space") introduced a race condition, where we might try to blow away the build objects before the bisection test is complete. This is really bad. 2. Theoretically, we could have more than one bisection test forked to the background, if there are more than 1 running config. But we clobber $pid_bisect every time we run test_configuration(), so we effectively only sync with the last one. This is *usually* OK, because the prior config can likely complete by the time subsequent config(s) complete, but that's still technically a race. So, let's move the 'wait $pid_bisect' into the test_configuration() function, to make sure the test is complete before we move to the next config (and remove the build objects). While this removes a little bit of parallelism, I suspect that parallelism was unintentional. Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-08-04aiaiai-email-sh-functions: allow patches without PATCH prefixJacob Keller1-1/+1
Not all patches are submitted with a PATCH prefix. This patch enables the PATCH prefix to be left out, and hopefully cover more patches in testing. Future work should include a more robust way of determining if an email is a patch that does not rely on the subject format, such as searching for the diff line. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-07-15aiaiai: update systemd unit filesJacob Keller5-6/+27
The current approach uses user instance of systemd, instead of running under root's instance with a "User=" blurb. Also add a README file indicating the purpose of these scripts and service files. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-07-15aiaiai-project-update: ignore repos without a pathJacob Keller1-3/+6
If the repository isn't yet checked out, don't completely fail. Future TODO is to try and figure out a way to automatically clone the repository. However, currently repositories are stored per-project and multiple URLs could end up being used as remotes, which makes it difficult to determine the right way to clone the repository. In addition, reverse-lookup of project from path is not really easy to do. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2015-01-23test-patchset: Make a copy of the typo dictionaryDaniel Thompson1-0/+7
Currently aiaiai issues the following warning for each patch under test: No typos will be found - file '/tmp/aiaiai-test-patchset.32BU/checkpatch/spellin g.txt': No such file or directory In fact the problem can even more acute when testing older kernels that do not have this patch: https://lkml.org/lkml/2014/10/22/609 This patch fixes the problem by copying out the typo dictionary if one is found. Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org> Tested-by: Lee Jones <lee.jones@linaro.org>
2014-11-13aiaiai-email-lda: use the References mail headerRobert Jarzmik2-7/+33
Aiaiai local mail delivery agent should be able to cope with forwarded mails, not only git-send-email. One popular method of forwarding a mail thread is to have it embedded in a single mulitpart mail in rfc822 format. But this transformation changes the In-Reply-To: headers into References: headers. The goal of this patch is to teach aiaiai LDA to understand both In-Reply-To and References in its mail handling. This enables mail forwarding. Jacob: Fix up variable quotes in the README example. Fix up style for mail headers, and fix a typo. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-11-13TRIVIAL: fix spacing issue in aiaiai-test-patchsetJacob Keller1-3/+3
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-11-13aiaiai-test-patchset: optimize disk spaceRobert Jarzmik1-0/+7
When compiling multiple defconfigs, remove the build tree between each compilation to spare disk space. In this way the build trees don't accumulate on the disk while testing the same patchset, and the patchset scales with the number of defconfigs, which is not limiting the build anymore. Jacob: Honor preserve variable, so that when requested we maintain files. Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-11-13aiaiai: merge development workJacob Keller6-22/+77
The development branch has been stable in my test environment for a while now. I think now is a good time to get these changes back into master. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-24test-patchset: add [no] options for each checkerJacob Keller2-11/+33
Also, enable checkpatch.pl by default unless otherwise disabled. This fixes a compatibility regression introduced by 33c41203f0c9 ("aiaiai-test-patchset: make checkpatch optional like other checkers") as well as provides disable options for once aiaiai-test-patchset supports a configuration file. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-24aiaiai-test-patchset: document --checkpatch optionBrian Norris1-0/+1
commit 33c41203f0c9 ("aiaiai-test-patchset: make checkpatch optional like other checkers") added the --checkpatch, and disabled its functionality by default. The least we can do is document it! Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-24aiaiai-diff-log-helper: spellingBrian Norris1-2/+2
Signed-off-by: Brian Norris <computersforpeace@gmail.com> Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-09aiaiai: update TODO.txt to include note about randconfigJacob Keller1-0/+1
Currently there is no good way to add an attachment to the email, and so we don't really have a way to add the random configuration as an attachment. Update the TODO to indicate that we need a solution for this issue. (Random configurations failures are less useful if we can't show how to reproduce them in our response email). Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-08aiaiai: test all patches when testing bisectionJacob Keller1-3/+4
Instead of only testing until a patch series fails, we should test every patch. This provides more information, and does not seriously harm the output. To take advantage of this, we also have to modify our check for "base commit failed but it is fixed in the first patch". We simply say that the base commit failed and is fixed as long as the series has no failures. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-08aiaiai: cleanup display of randconfig buildsJacob Keller1-6/+5
This patch removes some code attempting to show the random configuration generated for the build. It does not correctly show up in the email, so I need to spend some time figuring out where to display the configuration file. Additionally, clean up some display about generating the random config so that we don't see the errors. Also we do a make mrproper to cleanup any generated files so that builds will be clean when we start. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-09-08README: spellingBrian Norris1-2/+2
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2014-07-16test-patchset: allow proper support for randconfigJacob Keller2-7/+38
Make randconfig pre-generate a configuration so that the pre and post patch series builds use the same configuration (vs using random configs each time). In addition, append the random configuration whenever there is a build diff, so that the user can see. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-06-18libshell: use a git submodule to track upstream libshell projectJacob Keller117-4770/+3
Rather than inlining the various libshell code we need, just add a git submodule pointing to the upstream tree. This makes it easier to manage changes rather than having to hand merge them. This brings with it several bug fixes and changes from the upstream project, so may require some patience to work out any subtle changes. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-06-18email-test-configuration: add helper program to debug configurationJacob Keller1-0/+115
This script is very useful for debugging the configuration file. It takes a snapshot of the environment before and after parse_config and after each parse_prj_config, and then uses diff to display the output. This makes it very easy to see if the configuration is being read as desired. This script has already helped debug an issue in the shell_ini_config parser. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-06-18email-test-patchset: fix typo for the bisectability flagJacob Keller1-1/+1
The bisectability flag had a typo, and thus was never getting enabled. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-06-18config_check_boolean: add _ to yes and no markersJacob Keller1-2/+2
The config_check_boolean function had a bug, since no and yes were not properly prefixed. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-06-18doc: drop reference to 'make'Brian Norris1-3/+0
We don't have a top-level Makefile any more, and we automatically build the helper tools if they aren't present, so drop the README reference. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2014-06-18helpers: track dependencies in MakefileBrian Norris1-5/+2
Updates to remap-log.c and aiaiai-locker.c won't trigger rebuilds. Fix that. Also use the pattern-matching shorthand '%'. Signed-off-by: Brian Norris <computersforpeace@gmail.com>
2014-05-27aiaiai-test-patchset: make checkpatch optional like other checkersJacob Keller5-12/+39
This modifies behavior of aiaiai such that checkpatch will be an option much like sparse and coccinelle. In addition, only work if checkpatch.pl is found in the project at the requested location. Will disable checkpatch if it cannot be found. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-05-27aiaiai-test-patchset: check for coccinelle scripts firstJacob Keller1-4/+9
Rather than always archiving the coccinelle scripts, check to ensure they exist first. This prevents issues when attempting to build a non-kernel tree, (ie: ethtool). Will display a warning if coccinelle was requested but no scripts were found. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-05-27aiaiai: merge development branch to masterJacob Keller29-276/+1459
Finally merge the development changes after some fairly serious use in the email environment. I have appended the shortlog below, as well as a helpful short summary of the large changes in no particular order. * Moved as much as possible for configuring email setup to the cfgfile * Added several options previously not configurable at all * Add support for "hooks" framework, including a simple dispatcher hook * Add hook which automatically detects project based on git-index info * Add systemd scripts for the email setup * Allow default values for project configuration * Add script to help keep project repos up to date These changes hopefully make configuration and setup of the email workflow easier. In addition, the hook enabling automatic project detection makes handling multiple project kernel trees much easier. Artem Bityutskiy (6): test-pattchet: add a couple quotes aiaiai-test-patchset: move --targets option down aiaiai-diff-log-helper: fix logs diffing for gcc-4.8 aiaiai-checker: use --no-data for smatch aiaiai-checker: ignore debugging output from spatch TODO: remove a completed item Jacob Keller (51): Add support for choosing build targets aiaiai-sh-functions: remove extra quotes in call to ini_config_get aiaiai-test-patchset: use merge_addresses only once aiaiai-sh-functions: remove [email] section from cfgfile aiaiai-sh-functions: re-order options to match example config aiaiai-email: add [defaults] section to config aiaiai-email: move test-patchset options into the configuration file aiaiai: don't allow arbitrary validator command aiaiai-email: move -J bigjobs into configuration file aiaiai-test-patchset: add missing colon on targets option aiaiai-email-dispatcher-helper: fix typo on aiaiai aiaiai-email-test-patchset: fix parameter substitution aiaiai-email-test-patchset: move -- to end of all options email: add "debug" section to configuration file email-test-patchset: parse general configuration settings earlier sh-function: add insert_header function doc: add CONFIGURATION file describing the cfgfile aiaiai: add initial support for dispatcher hook hook: add support for X-Aiaiai-Project aiaiai: fixup srcdir in email and gerrit scripts dispatcher: add aiaiai-email-sh-functions to source list doc: rename CONFIGURATION to configuration.txt email: don't allow pcfg_branch to default email: add canonical_url variable for list_projects aiaiai: split sed project listing from list_projects email: rename error_test_patchset_failed aiaiai: change dispatcher hook to email hook aiaiai: add git-find-base utility for finding base commit from mbox email: example hook for aiaiai-email-test-patchset aiaiai: use fail_usage on incorrect number of arguments apply-patch: prefix diff output with '> ' autodetect-project: fix change of function name systemd: add scripts for running the aiaiai processes email-hook: remove options that can't be used git-find-base: Add authorship, copyright, and license notice git-find-base: add detection for possible duplicate patches git-find-base: add help text to the program send-mail-on-failure: generalize email address aiaiai-project-update: fix srcdir line from location change aiaiai-project-update: fix typo of printf in usage statement aiaiai-project-update: correct function to upstream change git-find-base: rewritten to use newer design aiaiai-email-test-patchset: correct hook calling to actually grab error aiaiai: extract patches from email prior to using git-am aiaiai-diff-log-helper: explicitely call out python2 aiaiai: add checks to configuration file aiaiai-email-lda: move reap options to cfgfile email: fix incorrect variable name in email for hook rejection aiaiai: don't display log output from git-find-base aiaiai: don't cat the $mbox file at begining of email-testpatchset aiaiai: don't hardcode KCFLAGS or W=1 Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-04-25TODO: remove a completed itemArtem Bityutskiy1-9/+0
I've fixed the gcc 4.8 issue in d4b585c aiaiai-diff-log-helper: fix logs diffing for gcc-4.8 Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai: don't hardcode KCFLAGS or W=1Jacob Keller3-10/+7
This patch fixes the TODO item regarding hardcoded kernel make parameters. We now default -M to be "KCFLAGS='-Wno-missing-initializers -Wno-sign-compare' W=1", and allow redefining the option via the email configuration line or the command line setting for aiaiai-test-patchset Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai: don't cat the $mbox file at begining of email-testpatchsetJacob Keller1-2/+1
This patch corrects an inadverdent addition of cat "$mbox" which apears to come from commit bbf0119cbfc0. Possibly originating as some sort of debugging code, it has essentially been lost in a rebase most likely. However, this cat of the mbox contents is quite annoying. Possibly add this back as a feature, since it sometimes proves useful, but generally slows down aiaiai due to sometimes printing an exceptional amount of data to stdout! Also fixes a typo of private. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Fixes: bbf0119cbfc0 ("email-lda: use cover letter subject if available") Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai: don't display log output from git-find-baseJacob Keller1-1/+6
git-find-base outputs a large amount of data, given the number of projects in a cfgfile. This can cause systemd to overload with too much information. This patch alleviates the issue by only displaying the output of git-find-base if it fails. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25email: fix incorrect variable name in email for hook rejectionJacob Keller1-1/+1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai-email-lda: move reap options to cfgfileJacob Keller3-17/+17
This patch moves the last few options of the LDA email program into the configuration file, so that all email scripts don't require options for configuration. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai: add checks to configuration fileJacob Keller1-0/+77
This patch adds configuration check functions and performs some basic checks against the configuration file. A future effort may be to clean up these checks so that it outputs a bit more error cases. The main value of these checks is to prevent weird errors later when we assume that values have some standard meaning. In addition, it allows cleaning up boolean values to always be canonicalized into 0 or 1. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai-diff-log-helper: explicitely call out python2Jacob Keller1-1/+1
Since this script is not a python3 script, (it runs in python2!) then we shouldn't rely on "/usr/bin/env python" to always land us on a python2 installation, as some machines may have installed python3, and configured their default python to be the python3 executable. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai: extract patches from email prior to using git-amJacob Keller2-1/+77
Some patch authors submit patches directly attached via git-format-patch output as an attachment. Sometimes they include both the patch and the inline diff. This is problematic because it causes aiaiai to fail to apply the patch, due to git being confused about the attached patch. This patch modifies how aiaiai reads the commits, using a python script which is capable of extracting the patches from the mbox (including attachments) before calling git-am. This helps aiaiai more easily handle this weird patch case, and still works great for regular patch submissions. In addition, turn on 3-way merge of git-am, so that duplicate patches will be properly ignored (as in the case with inlined and attached patches) Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai-email-test-patchset: correct hook calling to actually grab errorJacob Keller1-13/+17
We can't grab the $? value from inside an if block, as the if statement already changed the return code. Instead, we just call the hook script without an error section, and then check for errors afterwards. This corrects an issue where the return code would always be 0, even if the command failed. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-25aiaiai-checker: ignore debugging output from spatchArtem Bityutskiy1-2/+6
spatch is a great tool, but it is still not very stable and crashes sometimes, in which case it prints a lot of debugging stuff to stderr, which we do not want in out logs. Normal warnings go to stdout. Therefore, ignore stderr output of spatch. And switch to the new style options format instead of using the old style. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-24aiaiai-checker: use --no-data for smatchArtem Bityutskiy1-1/+1
Otherwise smatch complains about missing data, which will show up in diff-log when new files are added. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-24aiaiai-diff-log-helper: fix logs diffing for gcc-4.8Artem Bityutskiy1-4/+14
gcc 4.8 changed its output format a bit. Now it appends lines like this to the warning messages: net/ipv4/ip_tunnel.c:394:25: warning: variable ‘fbt’ set but not used [-Wunused-but-set-variable] struct ip_tunnel *nt, *fbt; ^ Which made aiaiai output very messy. This patch fixes the problem. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-24aiaiai-test-patchset: move --targets option downArtem Bityutskiy1-11/+11
This patch has no functional changes. It is just a clean-up which makes the help output a tiny bit easier to follow by moving --target out of the block of options related to checkers. Also, it changes the orger of option handling to match the order in the help output. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-07git-find-base: rewritten to use newer designJacob Keller1-113/+193
Instead of just checking a few extra headers, add support for all header types that git can output, and be a bit more robust about renames and deletes. For now, assume a rename won't attempt to overwrite an existing file.. Ideally we should do a full check on the base as well.. This model should allow support of all git commit types, not just simple ones. In addition, in order to allow a certain patch format, we add an option to remove duplicates. Do it by default, but enable option to keep duplicate diff chunks. Primarily useful for patches which contain both an inline and attachment. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-07aiaiai-project-update: correct function to upstream changeJacob Keller1-1/+1
Upstream used get_cfgfile_projects_list as the name of the function that determined the full project listing. aiaiai-project-update was missed in the change. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-07aiaiai-project-update: fix typo of printf in usage statementJacob Keller1-1/+1
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-07aiaiai-project-update: fix srcdir line from location changeJacob Keller1-1/+1
The new location of aiaiai-project requires a new srcdir line, as I forgot to update this when moving the path. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-07send-mail-on-failure: generalize email addressJacob Keller2-4/+8
Rather than using a personal email address (oops!) generalize the address in the script as an argument. In addition, modify the systemd script to use root@localhost. The user *is* expected to modify the systemd script in their own copy to point to the correct address. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03git-find-base: add help text to the programJacob Keller1-0/+50
This patch adds a help-text output and the -h or -? option to git-find-base in order to allow user to request help for how to use the utility. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03git-find-base: add detection for possible duplicate patchesJacob Keller1-5/+7
Some users send a patch which includes both an attachment and inline of the diff. This confuses git-find-base, because it will see equivalent patch blobs. If we see the same diff hunk with identical git-index information, print a warning, and ignore it. This patch also rewords some of the other warnings to be more consistent and always show the intial -> modified blobs for possible debugging. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03git-find-base: Add authorship, copyright, and license noticeJacob Keller1-0/+4
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03email-hook: remove options that can't be usedJacob Keller1-26/+2
Hooks don't really support options, so just remove them. Also, use fail_usage instead of die for the exit message, so that we actually show the usage when wrong number of arguments is given. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03systemd: add scripts for running the aiaiai processesJacob Keller7-0/+172
This patch adds 3 service files for use with aiaiai 1) aiaiai.service which runs the aiaiai email dispatcher 2) aiaiai-project-update.service which runs aiaiai-project-update which will update remotes for all projects in the configuration file 3) send-mail-on-failure for notifying an administrator of service errors The services are primarily useful for tracking aiaiai output as well as keeping remotes that aiaiai needs up to date. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-04-03autodetect-project: fix change of function nameJacob Keller1-1/+1
One of the function names changed upstream, so we need to fix it in the hook also. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31apply-patch: prefix diff output with '> 'Jacob Keller1-1/+1
When aiaiai responds to a mailing list that is monitored by patchwork, a failure to apply a diff can cause patchwork to generate false positive "patches" due to the diff in the email. This patch modifies aiaiai so that it prefixes the output of the command with a '> ' which will prevent patchwork from recognizing this as a diff with a patch inlined to the reply. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31aiaiai: use fail_usage on incorrect number of argumentsJacob Keller10-10/+10
We should display the full usage with an error message when we have an incorrect number of arguments, rather than just die. The advantage is that the user will see what the actual usage of the program is, rather than just a somewhat cryptic error message. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31email: example hook for aiaiai-email-test-patchsetJacob Keller1-0/+153
This commit introduces an example hook which uses git-find-base to determine what project (and even what commit inside that project!) the patch is based on. This can be used so that patches automatically go to the correct project, without having to specify the project in the email address. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31aiaiai: add git-find-base utility for finding base commit from mboxJacob Keller1-0/+159
This patch adds a helper utility for git, git-find-base which works by checking the index information provided by git-diff's output. It works by parsing the mbox for diff lines, and extracting the index line. This is the shortblob of the file in git's database that this patch originally applied to. The general flow of this perl tool is: 1) Extract all the files and base blob indexes that the patch modifies, using a regular expression. 2) Run git log with all arguments directly passed through 3) For each commit returned by git log, check the ls-tree output for the modified file. If any of them fail to match, then this patch cannot apply cleanly to the commit. 4) print the sha1sum of the first commit which passes the check blobs test. This tool can be used to automatically determine if a commit can be applied cleanly to a branch, and even detect which commit it should be applied to. Various options passed to the log can change how much detection it does. If a patch series is applied, it will check each modification of a file, and ensure that it could apply in sequence generating the final result. This allows finding the first commit at which a series will apply. If a series is not self-consistent, then git-find-base will fail to supply the base commit, and may output errors regarding the nature of the inconsistency. The primary intention for this tool will be an example hook for aiaiai which automatically detects which project a patch was originally based on. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31aiaiai: change dispatcher hook to email hookJacob Keller5-55/+101
This patch modifies the current dispatcher hook to the new model of hook (reading hook contents from stdout of hook). In addition, it also moves the hook into aiaiai-email-test-patchset instead of putting it in the dispatcher-helper. This helps simplify the hook process overall. Amended by Artem. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31email: rename error_test_patchset_failedJacob Keller1-5/+5
Since this function could be used to generically refer to any internal error, modify the name and description. We will be using this function in a later patch to indicate an internal error in a hook as well. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31aiaiai: split sed project listing from list_projectsJacob Keller2-2/+10
In order to allow other places such as hooks to list the projects, seperate out the sed script into its own function. This enables less code duplication if another script wants to list all projects in a cfgfile. Artem: re-named the function for a bit better readability. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31email: add canonical_url variable for list_projectsJacob Keller4-3/+21
If supplied, this url can be used to add a [git clone -b <branch> <url>] section to the list_projects output, which indicates to the user how to clone the specified project. This can be useful to enable users to more easily see how to start working on a project. The canonical url is not used by aiaiai as an access point. It mainly is useful if the local clones that aiaiai uses are setup as --mirror clones. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31email: don't allow pcfg_branch to defaultJacob Keller3-26/+24
Since we don't allow pcfg_path to default, it makes little sense to allow pcfg_branch to default. Also, it would be better to have a die check on branch, so that we fail if the project doesn't specify the branch. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31doc: rename CONFIGURATION to configuration.txtJacob Keller1-0/+0
Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31dispatcher: add aiaiai-email-sh-functions to source listJacob Keller1-0/+1
We need the email-sh-functions in the source list in order to parse configuration files. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-31aiaiai: fixup srcdir in email and gerrit scriptsJacob Keller5-10/+10
$srcdir should represent the current directory where the actual shell file is located. This requires also updating $PATH so that it points to the correct directories. This is somewhat confusing since we have to add '..' to a section, but it fixes the switch to dash check for email scripts which previously was broken. It also makes everything more consistent. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-18hook: add support for X-Aiaiai-ProjectJacob Keller2-1/+10
Rather than determining the project strictly from the +project portion of the aiaiai address, also allow the dispatcher hook to insert the project hook into the mbox header. This could be used to allow advanced configuration of the project, such as by checking patch diffs to see which files are modified. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-18aiaiai: add initial support for dispatcher hookJacob Keller4-0/+51
This patch adds some initial support for a dispatcher hook which could be used to add custom headers, which will (later) be interpreted by aiaiai to include specialized settings. A follow-on patch will add the first initial custom header. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-18doc: add CONFIGURATION file describing the cfgfileJacob Keller2-1/+164
This patch adds a CONFIGURATION file which describes the aiaiai configuration file. This will be expanded upon in future commits which introduce the aiaiai hooks. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-18sh-function: add insert_header functionJacob Keller2-15/+20
Since we use a special trick to insert header information into the mbox, this could be extraced into a function in aiaiai-sh-functions. This will help future work which will want to add multiple headers into this mbox file, using the same file descriptor trick. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11email-test-patchset: parse general configuration settings earlierJacob Keller1-3/+2
This patch modifies the email patch testing program so that it parses the general configuration settings as soon as it reads the configuration file location. It also modifies the script so that it will use readlink on the path instead of just blindly using the path. This is taken from the LDA which does this as well. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11email: add "debug" section to configuration fileJacob Keller4-27/+25
This patch further extends the configuration file so that it has a debug section which currently includes replacements for test-mode and preserve options. These options are very useful for debugging aiaiai, but today cannot easily be changed without modifying the command line. Instead, remove them from the options and include them via the configuration file. I chose not to add "verbose" to this list, because we actually use verbose earlier than we parse the configuration. It may still be worth coming up with some interface where command line options overwrite configuration options, but I wasn't sure the best way to handle this yet. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11aiaiai-email-test-patchset: move -- to end of all optionsJacob Keller1-2/+2
A previous patch added kmake_opts to the configuration file, and when passing this into aiaiai-test-patchset, the -- field which ends option scanning was not correctly moved to the end of the options arguments. This would result in incorrect behavior if anyone tried to use this option. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11aiaiai-email-test-patchset: fix parameter substitutionJacob Keller1-1/+1
The targets parameter was incorrectly failing to add the --targets, because the substitution did not have a +. This patch corrects the parameter substitution so that the targets will correctly include the required option for use with aiaiai-test-patchset directly. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11aiaiai-email-dispatcher-helper: fix typo on aiaiaiJacob Keller1-1/+1
This patch fixes a typo on aiaiai-email-test-patchset, which prevented the validator from being called, as it was misspelled. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-11aiaiai-test-patchset: add missing colon on targets optionJacob Keller1-1/+1
The targets option recently added was broken. It did not properly handle a value for the argument, because no colon was present. This patch fixes the getopt line so that target will infact select an option. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-10aiaiai-email: move -J bigjobs into configuration fileJacob Keller3-11/+13
This modifies aiaiai-email-dispatcher to use the configuration file instead of the command line for the bigjobs parameter. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai: don't allow arbitrary validator commandJacob Keller3-27/+23
Since aiaiai-email-test-patchset is the only validator that makes sense, and we should extend it if new features are desired, we don't need to support multiple validators, as this is clunky, and difficult to configure for the user. Now that the configuration file supports all the options from the aiaiai-email-test-patchset, we can just directly call it instead of having to use a passed in parameter. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-email: move test-patchset options into the configuration fileJacob Keller4-53/+70
This patch modifies the configuration file to include most of the options around the validator command, so that those no longer have to be specified manually. This does break compatability with the current validator setup, since those old options must now be specified on the command line. - v2 * Fix typo in coccinelle variable Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-email: add [defaults] section to configJacob Keller3-31/+130
This patch adds a [defaults] section for the configuration file which allows setting shared project settings which might be overridden per-project. This will be used more in a follow-on patch which adds additional configuration options. - v2 * put ini_config_is_set into the libshell file * use __ instead of _ to indicate internal variable * update comment to better reflect per-project and default variable interaction Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-sh-functions: re-order options to match example configJacob Keller1-5/+7
This patch re-orders the parsing for the standard configuration variables, in order to match what is in our example configuration. It also updates the header comment to match. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-sh-functions: remove [email] section from cfgfileJacob Keller2-20/+17
This patch is part of a series to improve user friendliness regarding options for aiaiai-email-test-patchset, and improving use of the configuration file. This patch removes the seperate [email] section, as it really doesn't have any use. Just put these inside the global section, since email and global really have no different meaning. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-test-patchset: use merge_addresses only onceJacob Keller1-2/+1
Since merge addresses can now handle arbitrary lists of parameters, we should just use a single call instead of multiple calls in a row. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-10aiaiai-sh-functions: remove extra quotes in call to ini_config_getJacob Keller1-1/+1
This patch cleans up a case of ini_config_get for grabbing the unwanted keywords variable. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-03-06test-pattchet: add a couple quotesArtem Bityutskiy1-2/+2
The previous patch forgot to quote the "target" variable expansion, and this patch fixes this minor imperfection. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-03-06Add support for choosing build targetsJacob Keller2-5/+17
Since aiaiai-make-kernel has support for multiple targets, we should extend the aiaiai-test-patchset to have a parameter which enables selection of targets. By default, we should use the "all" target, but enable the user to select what target they want. An example of a different or additional target includes "namespacecheck" Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-14email-test-patchset: fix pcfg_reply_to_allJacob Keller1-2/+2
Through the course of several refactors, one of the patches accidentallly broke reply_to_all functionality. In the older code, we did a negative check, and if reply_to_all was not set, we would then unset $to in order to prevent the compose_email function/code from adding any Cc addresses. However, one of the refactors missed this negative check, assumed it was positive, and then changed the semantics so that reply_to_all = 0 caused reply behavior rather than otherwise. This patch corrects the given commit by making it check for 1, instead of not 1. Artem: amend an weird comment while on it Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Fixes: 092f2ca246 "(email-test-patchset: further improve readability)" Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-12email-test-patchset: grab all To and Cc headers.Jacob Keller1-2/+7
This change modifies email-test-patchset to grab every To and Cc header instead of just the first. Because refernces to to and cc except email lists (comma seperated), we use merge_addresses with an empty second parameter. This works due to recent changes to the merge_addresses function see in a previous patch in this series. Artem: amend the patch a tiny bit. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-12sh-functions: add fetch_all_headers functionJacob Keller1-1/+14
This patch adds a fetch_all_headers function which is used to get every occurrence of an mbox header, rather than just the first. In combination with the change to merge_addresses, this can be used to grab every Cc, and To address. Artem: massage comments Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-12email-sh-functions: make merge addresses more flexibleJacob Keller1-12/+17
This patch combines effort from a previous patch, as well as worm from Artem to make merge_addresses more flexible. First, it enables multiple line inputs, so that it can convert a list of addresses per line into a single comma seperated string. In addition, make the arguments optional, so it will merge as many argumements as it is passed instead of limiting to 1 or 2. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-10Add some missing quotesArtem Bityutskiy8-18/+18
We are trying to use quotes every time we expand variables. Let's be consistent and do this everywhere. This patch adds quotes to several paces where we missed them. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-10aiaiai-concat-mboxes: improve the help textArtem Bityutskiy1-0/+4
Explain why this script is needed and why one can't just use "cat". Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-10coccinelle: remove own copies of the scriptsArtem Bityutskiy45-3873/+0
Now we do not need them since we use the scripts from the kernel tree instead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-10Start using cocci scripts from the kernel treeArtem Bityutskiy4-16/+34
Start using coccinelle scripts from the kernel tree we build against. This is better than carrying our own copies of coccinelle scripts, since they tend to become out-of-date. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07test-subj-parsing: unbreak the testArtem Bityutskiy1-6/+3
I broke it when moved stuff to the "helpers" sub-directory, let's fix it. While on it, remove a stale commentary in the test. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07Compile helper tools if necessaryArtem Bityutskiy8-17/+37
Some of our tools like 'remap-log' have to be compiled. This is not a problem when using Aiaiai from a package, because it has the compiled version of the tool, but this is a problem when using Aiaiai from sources. Introduce a function which tries to compile the internal tools. This is supposed to improve user experience with Aiaiai. Remove the top-level Makefile since it is not really needed after this change. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07Move internal scripts to the "helper" subdirectoryArtem Bityutskiy18-23/+15
This patch implements the following TODO entry: Re-arrange the source code structure so that the internal scripts would all sit in a separate sub-directory. Internal scripts are those which users are not supposed to run directly. For example, 'aiaiai-locker' is one of them. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07Rename 'external' to 'helpers'Artem Bityutskiy179-25/+26
I would like to move all the internal tools to a separate directory. Let's call it 'helpers'. The 'external' directory now contains all the tools which came from an external project. Probably this is not the best way to lay-out our files. Let's just re-name it to helpers. Later we'll move more stuff to 'helpers'. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07Remove the 'diffconfig' scriptArtem Bityutskiy1-129/+0
This is an old leftover, a copy of the 'diffconfig' script from the Linux kernel sources. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07Rename jenkins to gerritArtem Bityutskiy1-0/+0
This is just a bit more logical. The 'email' subdirectory is for the email-based workflow, and 'gerrit' subdirectory is for the gerrit-based workflow. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07doc: improve the contents of Overview.txtArtem Bityutskiy1-31/+47
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: process all series directories at the endJacob Keller1-0/+43
Sometimes the email-lda program can misbehave and a series could end up becoming "complete" but the LDA does not queue it when the last patch was added. This patch modifies the LDA so that it will check all series at the end of each mail and queue them, rather than only checking a series when some thing is added. The primary benefit of this is if a series does not properly get queued, the administrator can come in and manually add the patches to the series directory. Then the series will properly be "queued" after the next email triggers the LDA. This does come at a slight hit in terms of performance as we now have to check whether series are complete for every email. However, the gain in being able to easily fixup and get a series queued again when errors occur is much more useful. Artem: this patch did not really work properly, because it was missing the "series_is_complete" check. I also did some re-factoring, and tested the final version. Seems to work fine. I also got rid of bash-only constructs. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
2014-02-07email-lda: make m and n local everywhereArtem Bityutskiy1-10/+10
Similar to the previos patch, but for $m and $n. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: make 'mbox' to be a local variableArtem Bityutskiy1-6/+25
Make 'mbox' to be a local variable in all the functions. This is nicer and saver, and makes the code easier to change. The only plase where we use the global variable is the clean-up handler. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: fix copy-paste errorArtem Bityutskiy1-2/+2
The 'reject_and_reply' function accepts the mbox to act upon as the parameter, and internally names it "file". However, in few places it actually uses "mbox" instead of "file", which happens to work fine, but is generally a bug. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: few spelling fixesArtem Bityutskiy1-2/+2
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: improve readability some moreArtem Bityutskiy1-4/+14
This patch adds some useful commentaries. Also, it partially makes the mbox parameter to be non-global. Next patches will do more in this direction. This idea is to improve code readability but making it using less global variables. Ideally there should be none, but I am not sure I'll have time to do that. Let's do this for mbox and probably "m" and "n". See next patches. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: rename seq_nameArtem Bityutskiy1-6/+9
This name is not self-documenting, make it "generate_file_name()" instead. Also, add a better commentary to this function. This is for the sake of code readability. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: centralise naming decisionArtem Bityutskiy1-6/+8
The 'sec_name' function basically defines the name of the mbox file or a directory for use. Currently we use the date as the prefix. Later we may change this. Anyway, make 'sec_name' always use the current date, isntead of getting it from the caller. This should make things a bit easier to understand. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: fix name generatorArtem Bityutskiy1-1/+1
This patch fixes the 'seq_name' finction which generates a file name to use for storing an mbox. Currently it just appends a counter to the end. And it uses the "-" for this, like something-counter, but sometimes it uses "_", which is a bug. Let's fix it and use "-" everiwhere. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: make the queued file name sanerArtem Bityutskiy1-1/+1
When aiaiai-email-lda collects all patches in the series, it concatenates them into a single file, and calls 'queue_mboxfile'. This function basically saves a copy of the mbox in the "queue_saved" directory, and then moves it to the queue directory. The name of the file will be like this: date_m_of_n-counter. However, the "m" part makes no sense at all. It is equivalent to the mumber of the patch which came last. For example, if we have a series of 2 patches, and path 1 came last, the name will be: date_1_of_2-counter Or if patch 2 came last, the name will be date_2_of_2-counter And this makes no sense. Just remove the "m" part from the name and make it to be: date_2-counter. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: use verbose output for everythingArtem Bityutskiy1-23/+23
The current split does not make much sence: we always print some cruft, but with --verbose we print more of it. Let's just make all the cruft be under the --verbose option. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: introduce a function for printing the separatorArtem Bityutskiy1-2/+7
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: improve the debugging output a bitArtem Bityutskiy1-7/+13
Improve the 'series_is_complete()' function's debugging output a bit. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: introduce the 'queue_series' helperJacob Keller1-35/+43
Artem: this is part of a bigger patch from Jacob, which I made to be a separate patch. So Jacob is the author, but I am writing the commit message. Introduce a separate function for queueing a patch series. This is a bit more readable, and also this is a preparation for further changes. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: always use the cover letterArtem Bityutskiy1-4/+2
The previous patch from Jacob only works when there is more than one patch in the series, but did not work for the situation when there is a cover letter (0/1) and a single patch (1/1). This patch fixes the situation. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-07email-lda: use cover letter subject if availableJacob Keller2-8/+63
Often, a patch series will be sent with a cover letter which describes the series and is given the '0/n' patch number. Rather than dropping these patches, keep track of them in series. We do this by checking whether the 1/n patch has an "In-Reply-To" header. This usually means that their will be an associated cover letter. Once this is found, rather than sending the patch directly on to the test program, we use the cover letter's subject by using formail to add a special "Series-Subject". This makes it so that the aiaiai-email will end up as a reply to the cover letter which is a bit more aesthetically pleasing to users. To help this process, a new "series_is_complete" function is added in place of the original series complete check. This function reports whether the series is completely queued, for both cases of cover letter and no cover letter. Artem: I've modified this patch. 1. Removed a couple of '[[' bash constructs 2. Also preserved the Message ID of the cover letter to make the reply not only have the subject of the cover letter, but also refer the cover letter properly. 3. Use common prefix for the special cover letter e-mail headers that we add: X-Aiaiai-Cover-Letter-Subject X-Aiaiai-Cover-Letter-Message-Id 4. Dropped sponge dependency. Generally, this is a nice tool, and I did not hear about it before. I'll definitely start using it when constructing pipes in the console. But this tool is not that well-known, so it is not typically present in systems. E.g., mine do not have it. And I decided to avoid adding another dependency, we already require a lot of tools. Instead, I used another trick, which is actual just as elegant as using sponge. Well, needs more lines of code, but it is really nice trick anyway, I like it. I just open the mbox file, then unlink it, which means it won't be visible in the file-system, but won't be deleted since we have the file descriptor opened. Then I pipe the data from the file descriptor to 'formail', and redirect the results to the mbox file. So a new mbox file will be created and all the new contents will be there. I think this is elegant, and does not add a new dependency. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: clean up comments some moreArtem Bityutskiy1-4/+3
Just fix poor English and a typo. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-lda: improve consistency and readabilityArtem Bityutskiy1-16/+13
Similarly to what we did in 'aiaiai-email-test-patchset', use 'reply_*' variable to specify the reply recipient, the Cc list, the subject, and the message ID. This is a bit easier to read and consistent. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-lda: remove a piece of bashismArtem Bityutskiy1-1/+1
Remove the '==' operator and use the '=' instead. Otherwise 'dash' fails. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-sh-functions: fix e-mail addresses processingArtem Bityutskiy1-2/+2
This patch is a bug-fix. It fixes the 'strip_address()' and 'merge_addresses()' which were for some reason removing all the blanks from the list of addresses. The result was that "Artem Bityutskiy" became "ArtemBityutskiy". Instead of removing all blanks, it is supposed to make multiple blanks to become a single white-space. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: alwasy include the "always_cc" listArtem Bityutskiy1-1/+2
I do not know when we broke this, but some day that worked, and the "always_cc" list from the configuration file was always Cced to all replies. But now it is ignored, which is exactly what this patch fixes. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: further improve readabilityArtem Bityutskiy1-32/+23
This script was confusing and difficult to follow because it used 'to', 'cc', and 'from' variables when composing the reply. E.g., "to" means the "To:" header of the patch under test, but when used in context of the reply, we used it for creating the "Cc:" header. Very confusing and easy to mess things up. This patch cleans that up. Let's leave 'to', 'cc', 'from', 'subj', and 'id' variables to represent the _original_ "To:", "Cc:", "From:", "Subj:", and "Id:". For replies, introduce 'reply_to', 'reply_cc', 'reply_subj', and 'reply_id' variables. The code becames a lot easier to follow with this change. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: minor re-structuringArtem Bityutskiy1-8/+7
This is another minor clean-up. Let's fetch all the headers we need in one place. Just for better readability. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: remove a useless variableArtem Bityutskiy1-3/+2
This is another cosmetic clean-up. Just trying to make this script a bit smaller and more readable. Remove the 'msgname' variable since we only use it once. Also, substitute 'echo' with 'printf', since we are trying to not using echo as a general policy, see this URL for more infor why echo may be dangeros and printf is safe: http://unix.stackexchange.com/questions/65803/why-is-printf-better-than-echo Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-sh-functions: rename project configuration variablesArtem Bityutskiy3-27/+28
This is another cosmetic change which is supposed to improve the readability. Let's distinguish between global and project parameters by using slightly differnet variabls prefix: "cfg_" for global parameters and "pcfg_" for per-project. Then in the contexts where we do not yet know the project, we'd not use any of the "pcfg_" variables, and possibly avoid introducing bugs. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-sh-functions: rename cfg_descrArtem Bityutskiy2-7/+9
All the configuration variables we use internally have the same name as the corresponding configuration option. The only exception is 'cfg_descr'. Let's re-name it to 'cfg_description' to match this pattern and be consistent. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05Rename 'make_options' to 'kmake_opts'Artem Bityutskiy3-4/+4
The command-line option corresponding to the 'make_options' configuration knob is called '--kmake-opts'. Let's be consistent and use the same names for both, just to make things be more logical. Alternatively, if 'kmake_opts' is not the best name, we could rename both to 'make_options' instead, or to something else. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05TODO: add a note about config file for all other scriptsArtem Bityutskiy1-0/+5
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05TODO: add a note about make optionsArtem Bityutskiy1-0/+4
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05example-aiaiai.cfg: add the "make_options" parameterArtem Bityutskiy1-0/+4
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05Remove email/aiaiai-email.cfgArtem Bityutskiy1-68/+0
I did not notice that we have 'email/aiaiai-email.cfg' file, and created the 'doc/email/example-aiaiai.cfg' file instead. This file has more comments and looks better, so let's delete the old file and leave the new one. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05Switch to dash when possibleArtem Bityutskiy12-0/+92
Aiaiai is written in a portable manner, meaning that it does not use Bash features and should work with different shells, like dash and ksh. Actually, dash is a nice, small, and fast shell implementing only POSIX feature (or may be mostly), and it is good to use it when it is available. This will ensure that we do not accidentally break protability. This patch adds a small code snippet to each script which will check if dash is installed in the system, and if it is, "re-start" with dash. People hacking on Aiaiai are encouradge to install the 'dash' package on their systems. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05email-test-patchset: add support for Make options.Jacob Keller2-4/+10
aiaiai-test-patchset has support for kernel make options which allows the user to have more fine grained control over the compilation process. However, the email form did not support passing these options to the test program. This patch adds a configuration (per project) for specifying make options, so that the user can have this fine grained control over the kernel build process. Artem: amend commentaries a bit. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05TODO: add a note about separating all internal scriptsArtem Bityutskiy1-0/+4
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05.gitignore: correct pathe for compiled toolsArtem Bityutskiy1-2/+2
Paths for 'remap-log' and 'aiaiai-locker' have changed. Reflect this in the .gitconfig file. This will prevent 'git clean' from removing them. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-05TODO: add another entryArtem Bityutskiy1-0/+7
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04TODO: remove a note about own checkpatch.pl copyArtem Bityutskiy1-5/+3
We've removed the copy of checkpatch.pl, so amend the TODO note. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04aiaiai: remove checkpatch.pl from repositoryJacob Keller1-4407/+0
This patch removes the file tracked in this repository, since we now use the in-kernel checkpatch version, or a user specified location. This enables better control of what checkpatch.pl is used for those who care, without having to manually update the file in git every time there is a change upstream. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04test-patchset: stop using own copy of checkpatch.plArtem Bityutskiy1-3/+11
Own copy of checkpatch.pl tends to be out-of-date. Start using checkpatch.pl from the tree we test against instead. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04test-patchset: remove a couple of commentsArtem Bityutskiy1-2/+0
Remove a couple of comments containing phrase "screw up". These comments do not look very useful, and "screw up" may sound a bit harsh. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: be silentArtem Bityutskiy1-7/+7
This patch is rather cosmetic. It basically makes the script stop printing information to stdout and instead, print only with the verbose messages. Indeed, this little information is useless anyway, it does not tell enough about what really goes on. So let's just move it to the verbose output. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: improve readabilityArtem Bityutskiy1-47/+102
I've noticed that this script is rather difficult to read because of many "DocHere" usage, which break indentation. These are used when we send replies back to the patch submitter. This patch is an attempt to improve this. It introduces a number of helper functions which incorporate the e-mail sending. The main script then contains just a function calls, which improves readability. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04Revert "Remove --check-only option support"Artem Bityutskiy2-3/+26
This reverts commit dbaf970c857e2a6fda9f6fd418bc873e5eb391cb. The idea to revert was stupid. This option is used internally to optimize Aiaiai and only check those files which were modified by the patch under test. Thus, reverting the change. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04example-aiaiai.cfg: refine the meaning of project description optionArtem Bityutskiy1-2/+2
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: fix projects list generationArtem Bityutskiy1-2/+8
This patch fixes the 'list_projects()' which did not work because it was using the 'cfg_descr' variable which was undefined. Indeed, this function is called when the user either forgot to specify the project, or specified a non-existing project. This patch uses 'ini_config_get_or_die' to get project description. The whole loop conctruct is cleaned up a bit too to make it more readable. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-sh-functions: "export" __ini_config_get_or_dieArtem Bityutskiy1-18/+18
In this project we try to mark all internal functions with leading "__". Of course, we do this only for "shared" files like "aiaiai-email-sh-functions". Any symbol which is not supposed to be used ouside of the shared function starts with "__". Thie patch removes the prefix from the "__ini_config_get_or_die" helper because we will need it in the next patch. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: fix a typo in the help outputArtem Bityutskiy1-1/+1
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: clean-up commentaryArtem Bityutskiy1-1/+1
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04email-test-patchset: move project configuration parsing down a bitArtem Bityutskiy1-3/+3
This patch is a little clean-up which makes the code a bit more consistent. It makes sure we first check if the user specified the project, and only then try to parse project configuration, not vice-versa. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-04TODO: add some items more to the wishlistArtem Bityutskiy1-1/+9
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03checker: fix a typoArtem Bityutskiy1-1/+1
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03Remove --check-only option supportArtem Bityutskiy2-26/+3
This patch removes the --check-only option because it is useless. I never used it, and I did not see anyone using it. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03Remove URLs with old cross-compilersArtem Bityutskiy2-4/+2
Cross-compilers at https://www.kernel.org/pub/tools/crosstool/ are old and not maintained up-to-date anymore. Lets not recommend it to the users. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03doc: refresh the Aiaiai overview textArtem Bityutskiy2-87/+66
Rename the 'README.announcement' file to descriptive 'Overview.txt'. Refresh its contents too. This file is supposed to give general information about what Aiaiai is. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03email-sh-functions: add local variables to parse_prj_configJacob Keller1-0/+3
Rather than assuming that the $cfgfile and $prj will be correctly defined, use the passed parameters. Use local to create local variables to use, just like in the regular config parsing. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03email-test-patchset: fix a bug when project is unknownJacob Keller1-10/+12
This patch corrects an issue due to attempting to use cfg_reply_to_all (a per-project configuration option) before we have checked whether the project is valid. This causes the whole aiaiai-email service to die. To fix this, move the checks for no project and unknown project above the cfg_reply_to_all use. Also unassign the to variable when sending these emails so that we don't spam everyone, (regardless of the reply_to_all setting). This restores the behavior to the previous default. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03aiaiai-email-lda: help output clean-upArtem Bityutskiy1-3/+3
Clean-up the help output a bit: * use <config.ini> consistently * mention <config.ini> at the first "usage" line. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03doc: add the TODO listArtem Bityutskiy1-0/+35
Add the TODO file. I've added some of my current wishes there. This does not mean that I am going to implement this. But may be some time, when I have time or if users request. Or may be someone else implements one of those. Others are welcome to add more wishes there too. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2014-02-03doc: add example-aiaiai.cfgArtem Bityutskiy1-0/+102
Add an example configuration file for the Aiaiai e-mail front-end. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-11test-patchset: remove junk commaArtem Bityutskiy1-1/+1
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04test-bisectability: print full config nameArtem Bityutskiy2-4/+5
Print full configration name, not just the defconfig name. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04test-bisectability: do not print base commit failure detailsArtem Bityutskiy1-2/+13
Now, when we allow for the base commit to be broken if the first patch fixes it, it makes little sense providing the base commit failure details in that case. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04test-bisectability: restructure the code a little bitArtem Bityutskiy1-14/+24
This commit does not do any functional changing, just some re-structuring and renaming as a preparation to the next change. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04Improve help outputArtem Bityutskiy6-11/+10
This is a cosmetic patch. It changes globally: s/working directory/work directory/ And it fixes the bogus 'aiaiai-diff-log' help output. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04diff-log-helper: group lines starting with "make:"Artem Bityutskiy1-2/+11
Thie makes the diff look a tiny bit nice when there is a build failure. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04bisectability: don't fail if base commit can't compileJacob Keller1-2/+1
This makes the bisectability test only fail when it can't compile inbetween a patch series. It is perfectly reasonable that the first patch in the series could fix the compile issue, so we should still check the patch for bisection issues. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-04test-patchset: improve build failure outputArtem Bityutskiy2-7/+18
The previous patch made it acceptable for the base commit to fail. However, the e-mail message we generate in this case contained something like: "Failed to build the following commit for configuration ..." which is not too readable, because it does not make it clear that this is the base commit which fails to compile. This patch improves the output and makes it look like this: "Failed to build base commit ..." This is just a bit nicer. Additionally, when the base commit fails, and the first patch fixes it, the resulting build diff is rather messy. This patch makes aiaiai-test-patchset print a short explanation for the messy build diff. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-03test-patchset: don't skip email when pre-patch build failsJacob Keller1-2/+5
Currently, whenever the pre-patched kernel fails to build, we don't show the results for the post-patched kernel. This is faulty, because we could easily be providing a patch which fixes the issue. Instead, we should show the results for the failed build, but still continue. If the post-patched kernel fails to build there is little need to show a complex diff, but we can at least show the results for both the pre-patched and post-patched kernel. This patch also additionally adds --keep-going to the pre-patched kernel in order to obtain more data for comparison. Artem: add a commentary Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-03test-patchset: add a perl checkArtem Bityutskiy1-0/+1
Check that the perl interpreter is available. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-03Use a helper for the 'fatal()' functionArtem Bityutskiy12-22/+29
Unfortunately libshell's "fatal()" does not prefix messages with an "Error" prefix. Introduce a new helper called "die()" which prepends messages with "Fatal error". Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-02sh-functions: protect from double inclusionArtem Bityutskiy2-0/+10
Add simple protection against double inclusion of the shared sh files. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-02email-lda: honor 'always_cc' and 'reply_to_all'Artem Bityutskiy3-20/+39
When rejecting a patch we should try to honor the 'always_cc' and 'reply_to_all' per-project configuration variables. This patch does exactly that - parses the 'To' and 'Cc' list, finds out which project the e-mail belongs to, parses the config file and CCes the 'always_cc' list, as well as preserves the 'To' and 'Cc' addresses if 'reply_to_all' is true. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-02email-lda: send a reply when chaining was incorrectArtem Bityutskiy2-2/+51
This patch is based on Jacob Keller's work. It teaches the aiaiai-email-lda script sending rejection notifications to the patch submitter. Right now it only sends a reply when the submitter missed the 'In-Reply-To:' e-mail header. Later more conditions may be added. At the moment we do not CC the 'always_cc' list, neither honor the 'reply_to_all' flag. This may be changed later, if needed. I've added several 'program_required's too, I was too lazy to separate them, again, sorry. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-12-02email-lda: introduce --test-mode optionArtem Bityutskiy1-1/+7
We are going to teach this script sending replies, and this option will disable the functionality, just like in the aiaia-email-test-patchset script. This patch is just a preparation. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email-lda: start parsing the configuration fileArtem Bityutskiy1-2/+12
This is a preparation for the further changes where we teach the email-lda script sending notifications when it rejects a patch. We'll need to know some basic information like own e-mail address, and this is stored in the config file. So parse it. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email-sh-functions: rework e-mail sending some moreArtem Bityutskiy2-20/+27
Leave only the email composition stuff in the common code, and move the e-mail sending stuff to email-test-patchset. This way the common code does not depend on the "verbose" and "test_mode" variables anymore, which is a bit cleaner. Plus add an explicit check that mutt is present. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email-sh-functions: misc improvementsArtem Bityutskiy2-34/+62
This is a huge patch and it should really be split. But I am being lazy and committing all at once. Yes, this is bad, sorry, but I am trying to save time. Anyway, this patch does 2 big changes: 1. Improves the strip_address function so that it does not anymore depend on any global 'cfg_*' variables and gets the e-mail address to strip as a parameter. 2. Simplifies the 'compose_email' function interface and teach it to get a single list of addresses to CC. This required some an additional function for merging 2 lists of e-mails. But the end result is that email-test-patchset becomes simpler. I have tested this patch. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29aiaiai-checker: used printf for printing uncontrolled dataArtem Bityutskiy1-1/+1
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email-test-patchset: move compose_email to email-sh-functionsArtem Bityutskiy2-39/+48
Move the 'compose_email' function to the shared file so that it could be used by other scripts. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email-test-patchset: move config handling to email-sh-functionsArtem Bityutskiy2-76/+106
We are going to need configuration file parsing functions in the email-lda script, so move them to the shared file. Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
2013-11-29email.cfg: refine the configuration file exampleArtem Bityutskiy1-9/+17
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>