-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from ni/v0.1.10_get_remove_entries_from_data_pane
v0.1.10: Get and remove entries from the data files pane
- Loading branch information
Showing
8 changed files
with
235 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import os | ||
import sys | ||
|
||
from flexlogger.automation import Application, LogFileType | ||
|
||
|
||
def main(project_path): | ||
"""Launch FlexLogger, open a project, run a test session, and show log file.""" | ||
with Application.launch() as app: | ||
project = app.open_project(path=project_path) | ||
logging_specification = project.open_logging_specification_document() | ||
logging_specification.remove_log_files(delete_files=True) | ||
test_session = project.test_session | ||
test_session.start() | ||
print("Test started. Press Enter to stop the test and close the project...") | ||
input() | ||
test_session.stop() | ||
log_files = logging_specification.get_log_files(LogFileType.TDMS) | ||
project.close() | ||
print("The following TDMS log files were created during the test session:") | ||
for log_file in log_files: | ||
print(log_file) | ||
return 0 | ||
|
||
|
||
if __name__ == "__main__": | ||
argv = sys.argv | ||
if len(argv) < 2: | ||
print("Usage: %s <path of project to open>" % os.path.basename(__file__)) | ||
sys.exit() | ||
project_path_arg = argv[1] | ||
sys.exit(main(project_path_arg)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
from enum import Enum | ||
|
||
class LogFileType(Enum): | ||
"""An enumeration describing the different log file types.""" | ||
|
||
TDMS = 0 | ||
"""TDMS files""" | ||
|
||
TDMS_BACKUP_FILES = 1 | ||
"""TDMS backup files""" | ||
|
||
CSV = 2 | ||
"""CSV files""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters