mirror of https://github.com/ARMmbed/mbed-os.git
Correct resources API usage in dupe test
parent
7a26cd8da8
commit
f143019e9a
|
|
@ -16,7 +16,7 @@ from tools.toolchains import (
|
||||||
TOOLCHAIN_PATHS,
|
TOOLCHAIN_PATHS,
|
||||||
mbedToolchain,
|
mbedToolchain,
|
||||||
)
|
)
|
||||||
from tools.resources import LEGACY_TOOLCHAIN_NAMES, Resources
|
from tools.resources import LEGACY_TOOLCHAIN_NAMES, Resources, FileType
|
||||||
from tools.targets import TARGET_MAP, set_targets_json_location
|
from tools.targets import TARGET_MAP, set_targets_json_location
|
||||||
from tools.notifier.mock import MockNotifier
|
from tools.notifier.mock import MockNotifier
|
||||||
|
|
||||||
|
|
@ -247,9 +247,9 @@ def test_detect_duplicates(filenames):
|
||||||
cpp_sources = [os.path.join(name, "dupe.cpp") for name in filenames]
|
cpp_sources = [os.path.join(name, "dupe.cpp") for name in filenames]
|
||||||
notify = MockNotifier()
|
notify = MockNotifier()
|
||||||
res = Resources(notify)
|
res = Resources(notify)
|
||||||
res.c_sources = c_sources
|
res.add_files_to_type(FileType.C_SRC, c_sources)
|
||||||
res.s_sources = s_sources
|
res.add_files_to_type(FileType.ASM_SRC, s_sources)
|
||||||
res.cpp_sources = cpp_sources
|
res.add_files_to_type(FileType.CPP_SRC, cpp_sources)
|
||||||
assert res.detect_duplicates() == 1,\
|
assert res.detect_duplicates() == 1,\
|
||||||
"Not Enough duplicates found"
|
"Not Enough duplicates found"
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue