Skip to content

Commit

Permalink
Merge pull request #4884 from wlemkows/py-cache-disable
Browse files Browse the repository at this point in the history
test: disable bytecode on module import (py)
  • Loading branch information
lplewa authored Jul 2, 2020
2 parents 3a77b8f + 3868006 commit cd31d7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/test/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,6 @@ clean clobber: $(TESTS_BUILD)
$(RM) *.$(SYNC_EXT)
$(RM) $(FILE_MAX_DAX_DEVICES)
$(RM) envconfig.sh envconfig.py
$(RM) -r __pycache__ */__pycache__

$(TESTS) $(OBJ_DEPS) $(LIBPMEMPOOL_DEPS) $(LIBPMEMPOOL_MOD_DEPS): $(TEST_DEPS)

Expand Down
5 changes: 5 additions & 0 deletions src/test/testframework.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@

import sys
from os import path

# Don't create cache files on the import of test modules.
# Improvement using bytecode in python tf code is insignificant.
# It is workaround for a pycache clobber issue in our tangled Makefiles.
sys.dont_write_bytecode = True
sys.path.insert(1, path.abspath(path.join(path.dirname(__file__), 'unittest')))

# flake8 issues silenced:
Expand Down

0 comments on commit cd31d7e

Please sign in to comment.