Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix do_init function in telemetry/conftest.py #16546

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions tests/telemetry/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,12 @@ def setup_streaming_telemetry(request, duthosts, enum_rand_one_per_hwsku_hostnam
def do_init(duthost):
for i in [BASE_DIR, DATA_DIR]:
try:
os.mkdir(i)
os.makedirs(i, exist_ok=True)
except OSError as e:
logger.info("Dir/file already exists: {}, skipping mkdir".format(e))
logger.error("Unexpected error while creating directory: {}".format(e))

duthost.copy(src="telemetry/validate_yang_events.py", dest="~/")
# Copy validate_yang_events.py from sonic-mgmt to DUT
duthost.copy(src="telemetry/validate_yang_events.py", dest="~/")


@pytest.fixture(scope="module")
Expand Down
Loading