Skip to content

Commit

Permalink
Set TEST_RUN_DATA_PATH for test-framework base tests
Browse files Browse the repository at this point in the history
Signed-off-by: Katarzyna Treder <[email protected]>
  • Loading branch information
Katarzyna Treder committed Feb 27, 2025
1 parent cb50633 commit fe060c9
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 2 deletions.
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

0 comments on commit fe060c9

Please sign in to comment.