Commit f574014a authored by Michal Berger's avatar Michal Berger Committed by Tomasz Zawadzki
Browse files

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: default avatarMichal Berger <michalx.berger@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3916


Community-CI: Mellanox Build Bot
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Reviewed-by: default avatarTomasz Zawadzki <tomasz.zawadzki@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent 3797a38d
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -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))}"