| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
By default, we continue running tests even after a failure, to make
diagnostics easier. If a chdir command fails, there is a chance that
subsequent chdir commands could accidentally move outside the
temporary directory where the test is being run, and then we start
messing up with the host's files.
In general, the consequence is to leave garbage files and directories
behind. However, some of the files can have side effects (for example
a "series" file or a "patches" directory could confuse quilt later),
and in theory this could also lead to the corruption or deletion of
existing files, which is pretty bad.
So add a safety check after every chdir command that we are still
inside the test case's working directory. If not, stop the test
immediately.
Note: this is not about being 100% safe and bullet-proof. The only
way to achieve this would be to use chroot or even containers. We
still need to trust the test cases to not do anything nasty on
purpose. This is only protecting against good test cases going wild on
failure.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
If the user hits Ctrl+C while a test is running, don't leave our
working directory behind.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
| |
Being a little more verbose when mkdir or chdir fails, can't hurt.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
| |
/bin/sh may not include a line number in its error messages, fix the
filtering when it does not.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
|
|
| |
Curly braces in perl regex are supposed to be escaped, recent
versions of perl complain when they aren't:
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE (\w+)}/ at ./run line 114.
Unescaped left brace in regex is deprecated, passed through in regex; marked by <-- HERE in m/%{ <-- HERE \?}/ at ./run line 290.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
Add an option to keep the working directory after a test has failed.
Also include the test name in the working directory name to make it
easier to figure out which test failed later.
Signed-off-by: Jean Delvare <jdelvare@suse.de>
|
|
|
|
|
|
|
|
| |
* Don't set $needs_shell before we need it. When handling commands
internally, we don't care about $needs_shell.
* Use a single regexp to set $use_re.
* Clear $good as soon as a test fails, instead of grepping for
failures later.
|
|
|
|
|
| |
* Command lines containing "&" need /bin/sh.
* "*" and "?" need not be escaped inside brackets in regular expressions.
|
|
|
|
|
| |
Declare all global variables with qw() and stop passing them as
arguments to some functions.
|
|
|
|
|
| |
Move functions before they are called, so that we no longer need forward
declarations.
|
|
|
|
|
| |
Code indentation in this file is inconsistent, this makes editing it
difficult. Use tabulations everywhere.
|
|
|
|
|
|
| |
The su and sg commands can only work if running as root. The quilt
test cases do not use these commands and I certainly wouldn't
recommend running the test suite as root, so drop the feature.
|
|
|
|
|
|
|
|
| |
Perl has a standard module which can split shell command lines for
us, so use it. Function shellwords can deal with quoted parameters
too so we no longer need to pass commands to /bin/sh just because
they contain quoted parameters. This lowers the ratio of commands
passed to /bin/sh from 34% to 31%.
|
|
|
|
|
| |
Delay command line splitting until it's actually needed. This avoids
having to join it again to log it or to pass it to /bin/sh.
|
|
|
|
|
|
|
| |
* Delete blank lines at end of files.
* Delete white space at end of lines.
* Delete spaces before tab.
* Replace 8 spaces by a tab where it makes sense.
|
|
|
|
|
| |
* Remove the implemented features from the to-do list.
* Document the command line interface.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Variable substitution on command lines was happening too early so
setting a variable only took effect with the second next line of the
test case.
Additionally, there was no check that the environment variable was
actually set. This resulted in perl warnings during the test suite if
a variable is ever used before having been set.
Fix both issues.
Also add a test case for this feature, to avoid a future breakage.
Some of the tester script features are tricky and easy to get wrong,
so test them independently of quilt in a dedicated test case.
|
|
|
|
|
|
|
| |
Rewrite the main parsing loop of the tester scripts, in a way which
is easier to understand and avoids redundant tests.
No functional change here.
|
|
|
|
|
|
|
| |
- test/run: Record the status returned by every command, so that test
cases can check them.
- test/*.text: Test the status returned by all commands in 4 test
cases.
|
| |
|
|
|
|
|
| |
There is no need to have two ways to access environment variables
from test cases, one is enough.
|
|
|
|
|
|
|
|
|
|
|
| |
Add an option to the test case runner script to generate an output
suitable for parallel runs:
* Print the full output at the end of the test case, all at once.
* Only output the detailed commands on failed test cases.
This makes it possible and convenient to run the test suite in
parallel on SMP systems.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Let the test suite runner script create a separate working
directory for each test. This makes it possible to run several
tests in parallel, speeding up testing on SMP systems. It also
ensures that a broken test case can no longer cause another test
case to fail.
At this point, it is possible to run the test suite in parallel,
the final result (success or failure) will be correct, however
the output is hardly readable because the progress of all tests
are interlaced. This will be improved later.
As a nice side effect, this means we can drop the setup and
clean-up steps that were present in all test cases.
|
|
|
|
|
| |
- Only run test/patch-wrapper.test if the --with-patch-wrapper
config option is used.
|
|
|
|
|
| |
put such comments in our test cases, and it prevents legitimate uses of
the "#" character (e.g. in a string, inside quotes) in commands.
|
| |
|
| |
|
|
|
|
|
|
|
| |
with `+'.
- test/run: Adjust $ENV{PWD} in cd command; add FIXME comment in
export command: in commands like `export foo=$var/bar', $var is
not evaluated.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
| |
caused a subsequent ``quilt diff -z'' to fail: we must mark
the patch as dirty after removing files.
- test/run: adjust to terminal width.
- Bump version to 0.39.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
will show up in file globs as well. Bug reported by James Rowe.
- Add a missing tab to the patch header of files that are removed.
Bug reported by James Rowe.
- Push command: Without -f or --leave-rejects, when applying a
patch failed, the *.rej files were not removed properly. Change
the code so that they won't be created in the working tree in
the first place this case.
- test/run script: Oops, the previouos commit was not the latest
version.
- Bump version to 0.36.
|
|
|
|
|
| |
$QUILT_PATCHES_PREFIX is set.
- test/run script: Add export and unset statements.
|
|
|
|
| |
- Fix a few bugs introduced while merging Chris's patch.
|
|
|
|
|
|
| |
was run through (sort | uniq) to remove duplicate entries.)
- Update test script to new format, and add regression test
cases.
|
|
|