Unit test object/build files can appear in source tree
Issue #1
resolved
Given part with unit test and unit test sources are pulled in via both pattern and directly:
this part is in #/myprog/common/common.parts
utest_files = Pattern(src_dir='.',
includes=['*-test.cc',
'*-testhelper.cc',
],
excludes=[],
recursive=True).files()
#warning this currently creates an obj file in the test dir
utest_main = ['#/myprog/test/unit/main-testhelper.cc']
testenv.UnitTest("utest",
utest_main + utest_files,)
This creates main-testhelper.obj in #/myprog/test/unit.
The desired behavior is that the file is created in #build/utest/common-/utest/main-testhelper.obj
Comments (5)
-
-
- attached parts-issue-1.zip
This should be an sample reproducer of this problem
-
- changed status to open
working on fix
-
- changed status to resolved
Add new BUILD_DIR Variables to allow mapping of files not in the source directory tree to be mapped to the build directory Add AbsXXXNode() API to allow the mappings to happen correctly by the user Add fixes to unit test to map files out of tree better Add test cases Should resolve issue 1
→ <<cset e68f1182f2b8>>
-
- Log in to comment
Thanks for the bug report. Let me look into this and see why this is happening. I agree this should only make a obj file in the BUILD_DIR area for the given Part.