Fix multiple invocations of the before function and before tracing#23
Fix multiple invocations of the before function and before tracing#23sttts wants to merge 1 commit intobmizerany:masterfrom dfs-sh:before_tracing_fix
before function and before tracing#23Conversation
1. The `before` function had been called twice, once with proper tracing and error
output redirection and once directly. This is fixed now.
2. The result output was moved out of the inner subshell. This is necessary
because: in case the `before` function has an error, roundup's error trap is
triggered and the inner subshell is left. Still, we need a proper result ouput.
3. A test case with a broken `before` function was added which gives
the following output:
roundup before trace
it_works: [FAIL]
+ false
exit code 1
for the following before function:
before () {
false
}
|
There are many things I now think are not as neccessary to roundup as I once thought. |
|
We use If you look at my branch now, you will even find an However, coming back to this commit: this patch fixes the before mechanism as it is in your master right now. The only complexity it adds is the |
|
This is an embarrassing bug. :( I keep using commit a8a175a before this function was broken. |
|
So...I just found roundup, and it seemed awesome, but then my test setup/teardown didn't seem to be working correctly. I think it's this same issue; if I log execution of my before/after functions, I see this for a testplan with two tests: ...so yeah, it's running the |
See the comments for a fuller explanation of the changes. This should obsolete bmizerany#23 (though the test cases from it should still be merged). This should fix bmizerany#29 . This should fix bmizerany#44 .
Fix multiple invocation of the `before` function and `before` tracing
1. The `before` function had been called twice, once with proper tracing and error
output redirection and once directly. This is fixed now.
2. The result output was moved out of the inner subshell. This is necessary
because: in case the `before` function has an error, roundup's error trap is
triggered and the inner subshell is left. Still, we need a proper result ouput.
3. A test case with a broken `before` function was added which gives
the following output:
roundup before trace
it_works: [FAIL]
+ false
exit code 1
for the following before function:
before () {
false
}
See the comments for a fuller explanation of the changes. This should obsolete bmizerany#23 (though the test cases from it should still be merged). This should fix bmizerany#29 . This should fix bmizerany#44 .
Fix multiple invocation of the `before` function and `before` tracing
1. The `before` function had been called twice, once with proper tracing and error
output redirection and once directly. This is fixed now.
2. The result output was moved out of the inner subshell. This is necessary
because: in case the `before` function has an error, roundup's error trap is
triggered and the inner subshell is left. Still, we need a proper result ouput.
3. A test case with a broken `before` function was added which gives
the following output:
roundup before trace
it_works: [FAIL]
+ false
exit code 1
for the following before function:
before () {
false
}
The
beforefunction had been called twice, once with proper tracing and erroroutput redirection and once directly. This is fixed now.
The result output was moved out of the inner subshell. This is necessary
because: in case the
beforefunction has an error, roundup's error trap istriggered and the inner subshell is left. Still, we need a proper result ouput.
A test case with a broken
beforefunction was added which givesthe following output:
roundup before trace
it_works: [FAIL]
+ false
exit code 1
for the following before function:
before () {
false
}