mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Relocate temporary script coverage files
So they don't clutter the top-level of unit test .tmp/ dir.
This commit is contained in:
parent
f9e5777e6f
commit
55f14c2eb8
6 changed files with 21 additions and 8 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.5-619 | 2018-06-01 11:29:15 -0500
|
||||||
|
|
||||||
|
* Relocate temporary script coverage files (Corelight)
|
||||||
|
|
||||||
2.5-618 | 2018-06-01 10:03:24 -0500
|
2.5-618 | 2018-06-01 10:03:24 -0500
|
||||||
|
|
||||||
* BIT-1635: fix `make doc` warnings (Corelight)
|
* BIT-1635: fix `make doc` warnings (Corelight)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.5-618
|
2.5-619
|
||||||
|
|
|
@ -50,10 +50,18 @@ bool Brofiler::WriteStats()
|
||||||
char* bf = getenv("BRO_PROFILER_FILE");
|
char* bf = getenv("BRO_PROFILER_FILE");
|
||||||
if ( ! bf ) return false;
|
if ( ! bf ) return false;
|
||||||
|
|
||||||
FILE* f;
|
SafeDirname dirname{bf};
|
||||||
const char* p = strstr(bf, ".XXXXXX");
|
|
||||||
|
|
||||||
if ( p && ! p[7] )
|
if ( ! ensure_intermediate_dirs(dirname.result.data()) )
|
||||||
|
{
|
||||||
|
reporter->Error("Failed to open BRO_PROFILER_FILE destination '%s' for writing", bf);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
FILE* f;
|
||||||
|
const char* p = strstr(bf, "XXXXXX");
|
||||||
|
|
||||||
|
if ( p && ! p[6] )
|
||||||
{
|
{
|
||||||
mode_t old_umask = umask(S_IXUSR | S_IRWXO | S_IRWXG);
|
mode_t old_umask = umask(S_IXUSR | S_IRWXO | S_IRWXG);
|
||||||
int fd = mkstemp(bf);
|
int fd = mkstemp(bf);
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
|
|
||||||
DIAG=diag.log
|
DIAG=diag.log
|
||||||
BTEST=../../aux/btest/btest
|
BTEST=../../aux/btest/btest
|
||||||
|
SCRIPT_COV=.tmp/script-coverage
|
||||||
|
|
||||||
all: cleanup btest-verbose coverage
|
all: cleanup btest-verbose coverage
|
||||||
|
|
||||||
|
@ -15,11 +16,11 @@ btest-brief:
|
||||||
@$(BTEST) -j -b -f $(DIAG)
|
@$(BTEST) -j -b -f $(DIAG)
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
@../scripts/coverage-calc ".tmp/script-coverage*" coverage.log `pwd`/../../scripts
|
@../scripts/coverage-calc "$(SCRIPT_COV)/*" coverage.log `pwd`/../../scripts
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
@rm -f $(DIAG)
|
@rm -f $(DIAG)
|
||||||
@rm -f .tmp/script-coverage*
|
@rm -rf $(SCRIPT_COV)*
|
||||||
|
|
||||||
distclean: cleanup
|
distclean: cleanup
|
||||||
@rm -rf .btest.failed.dat \
|
@rm -rf .btest.failed.dat \
|
||||||
|
|
|
@ -22,6 +22,6 @@ DIST=%(testbase)s/../..
|
||||||
BUILD=%(testbase)s/../../build
|
BUILD=%(testbase)s/../../build
|
||||||
TEST_DIFF_CANONIFIER=%(testbase)s/../scripts/diff-canonifier
|
TEST_DIFF_CANONIFIER=%(testbase)s/../scripts/diff-canonifier
|
||||||
TMPDIR=%(testbase)s/.tmp
|
TMPDIR=%(testbase)s/.tmp
|
||||||
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage.XXXXXX
|
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage/XXXXXX
|
||||||
BTEST_RST_FILTER=$SCRIPTS/rst-filter
|
BTEST_RST_FILTER=$SCRIPTS/rst-filter
|
||||||
BRO_DNS_FAKE=1
|
BRO_DNS_FAKE=1
|
||||||
|
|
2
testing/external/subdir-btest.cfg
vendored
2
testing/external/subdir-btest.cfg
vendored
|
@ -18,7 +18,7 @@ SCRIPTS=%(testbase)s/../scripts
|
||||||
SCRIPTS_LOCAL=%(testbase)s/scripts
|
SCRIPTS_LOCAL=%(testbase)s/scripts
|
||||||
DIST=%(testbase)s/../../..
|
DIST=%(testbase)s/../../..
|
||||||
BUILD=%(testbase)s/../../../build
|
BUILD=%(testbase)s/../../../build
|
||||||
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage.XXXXXX
|
BRO_PROFILER_FILE=%(testbase)s/.tmp/script-coverage/XXXXXX
|
||||||
BRO_DNS_FAKE=1
|
BRO_DNS_FAKE=1
|
||||||
# For fedora 21 - they disable MD5 for certificate verification and need setting an environment variable to permit it.
|
# For fedora 21 - they disable MD5 for certificate verification and need setting an environment variable to permit it.
|
||||||
OPENSSL_ENABLE_MD5_VERIFY=1
|
OPENSSL_ENABLE_MD5_VERIFY=1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue