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

Set TEST_RUN_DATA_PATH for test-framework base tests #36

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions core/test_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class TestRun:
plugin_manager = None
duts = None
disks = None
TEST_RUN_DATA_PATH = None

@classmethod
@contextmanager
Expand Down
1 change: 1 addition & 0 deletions core/test_run_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
from test_utils.dut import Dut

TestRun = core.test_run.TestRun
TestRun.TEST_RUN_DATA_PATH = "/tmp/test_data"


@classmethod
Expand Down
3 changes: 2 additions & 1 deletion log/logger.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@

import logging
import os
import posixpath
import sys
from contextlib import contextmanager
from datetime import datetime
Expand Down Expand Up @@ -193,7 +194,7 @@ def get_additional_logs(self):
if not check_if_file_exists(messages_log):
messages_log = "/var/log/syslog"
log_files = {"messages.log": messages_log,
"dmesg.log": "/tmp/dmesg"}
"dmesg.log": posixpath.join(TestRun.TEST_RUN_DATA_PATH, "dmesg")}
extra_logs = TestRun.config.get("extra_logs", {})
log_files.update(extra_logs)

Expand Down
2 changes: 1 addition & 1 deletion test_tools/peach_fuzzer/peach_fuzzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class PeachFuzzer:

peach_fuzzer_3_0_url = "https://sourceforge.net/projects/peachfuzz/files/Peach/3.0/" \
"peach-3.0.202-linux-x86_64-release.zip"
base_dir = "/root/Fuzzy"
base_dir = posixpath.join(TestRun.TEST_RUN_DATA_PATH, "Fuzzy")
peach_dir = "peach-3.0.202-linux-x86_64-release"
xml_config_template = os.path.join(os.path.dirname(__file__), "config_template.xml")
xml_config_file = posixpath.join(base_dir, "fuzzerConfig.xml")
Expand Down