VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /proc/self/root/usr/local/lib/node_modules/mediasoup/worker/deps/lcov/test/lcov_diff/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/local/lib/node_modules/mediasoup/worker/deps/lcov/test/lcov_diff/diff_test
#!/usr/bin/env bash
#
# Copyright IBM Corp. 2017
#
# Usage: diff_test
#
# Check lcov's diff function:
# - Compile two slightly different test programs
# - Run the programs and collect coverage data
# - Generate a patch containing the difference between the source code
# - Apply the patch to the coverage data
# - Compare the resulting patched coverage data file with the data from the
#   patched source file
#

function die()
{
	echo "Error: $@" >&2
	exit 1
}

make -C old || die "Failed to compile old source"
make -C new || die "Failed to compile new source"
diff -u $PWD/old/prog.c $PWD/new/prog.c > diff

$LCOV --diff old/prog.info diff --convert-filenames -o patched.info -t bla || \
	die "Failed to apply patch to coverage data file"
norminfo new/prog.info > new_normalized.info
norminfo patched.info > patched_normalized.info
sed -i -e 's/^TN:.*$/TN:/' patched_normalized.info

diff -u patched_normalized.info new_normalized.info || \
	die "Mismatch in patched coverage data file"

echo "Patched coverage data file matches expected file"

VaKeR 2022