test/common: Add small function for printing and purging files
The main use case is to make sure that files, which are normally purged upon exiting from the tests (regardless if the test finished successfully or not) are also printed out to stdout - this is done for the sake of debugging any potential failures that might have been hidden out in said tmp files which we don't want to keep around. Change-Id: I294c3bdc8f45be49e414bf45f80848be89355360 Signed-off-by: Michal Berger <michalx.berger@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3916 Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
3797a38dc6
commit
f574014a24
@ -1335,6 +1335,17 @@ function opal_revert_cleanup() {
|
||||
killprocess $spdk_tgt_pid
|
||||
}
|
||||
|
||||
function pap() {
|
||||
while read -r file; do
|
||||
cat <<- FILE
|
||||
--- $file ---
|
||||
$(<"$file")
|
||||
--- $file ---
|
||||
FILE
|
||||
rm -f "$file"
|
||||
done < <(find "$@" -type f | sort -u)
|
||||
}
|
||||
|
||||
# Define temp storage for all the tests. Look for 2GB at minimum
|
||||
set_test_storage "${TEST_MIN_STORAGE_SIZE:-$((1 << 31))}"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user